]> git.tdb.fi Git - r2c2.git/blob - source/network/protocol.cpp
Emit signals from loco status command only when all data has been gathered
[r2c2.git] / source / network / protocol.cpp
1 /* $Id$
2
3 This file is part of R²C²
4 Copyright © 2009  Mikkosoft Productions, Mikko Rasa
5 Distributed under the GPL
6 */
7
8 #include "packets.h"
9 #include "protocol.h"
10
11 namespace R2C2 {
12
13 Protocol::Protocol()
14 {
15         add<TrainInfoPacket>() (&TrainInfoPacket::address)
16                 (&TrainInfoPacket::loco_type) (&TrainInfoPacket::name);
17         add<TrainControlPacket>() (&TrainControlPacket::address)
18                 (&TrainControlPacket::control) (&TrainControlPacket::value);
19         add<TrainFunctionPacket>() (&TrainFunctionPacket::address)
20                 (&TrainFunctionPacket::functions);
21         add<TrainStatusPacket>() (&TrainStatusPacket::address)
22                 (&TrainStatusPacket::status);
23         add<RouteInfoPacket>() (&RouteInfoPacket::name);
24         add<TrainRoutePacket>() (&TrainRoutePacket::address)
25                 (&TrainRoutePacket::route);
26         add<ErrorPacket>() (&ErrorPacket::message);
27 }
28
29 } // namespace R2C2