X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fnetwork%2Fprotocol.cpp;h=ee0a1b07c5e9674f04aaa6649a8a4b4b1ae256fb;hb=2d44923e135a119fde31a7a50e5fcd3e400e4f41;hp=5801d375eb2c99a769eacd8f2c8a4483a6ab86af;hpb=010d8321e982d1684fcbff5bf6fc2bdec7cb7bae;p=r2c2.git diff --git a/source/network/protocol.cpp b/source/network/protocol.cpp index 5801d37..ee0a1b0 100644 --- a/source/network/protocol.cpp +++ b/source/network/protocol.cpp @@ -1,25 +1,32 @@ /* $Id$ -This file is part of the MSP Märklin suite -Copyright © 2009 Mikkosoft Productions, Mikko Rasa +This file is part of R²C² +Copyright © 2009-2011 Mikkosoft Productions, Mikko Rasa Distributed under the GPL */ #include "packets.h" #include "protocol.h" -namespace Marklin { +namespace R2C2 { Protocol::Protocol() { + add() (&DriverStatePacket::power) + (&DriverStatePacket::halt); + add() (&EmergencyPacket::message); add() (&TrainInfoPacket::address) (&TrainInfoPacket::loco_type) (&TrainInfoPacket::name); - add() (&TrainSpeedPacket::address) - (&TrainSpeedPacket::speed) (&TrainSpeedPacket::reverse); + add() (&TrainControlPacket::address) + (&TrainControlPacket::control) (&TrainControlPacket::value); add() (&TrainFunctionPacket::address) (&TrainFunctionPacket::functions); add() (&TrainStatusPacket::address) (&TrainStatusPacket::status); + add() (&RouteInfoPacket::name); + add() (&TrainRoutePacket::address) + (&TrainRoutePacket::route); + add() (&ErrorPacket::message); } -} // namespace Marklin +} // namespace R2C2