X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fnetwork%2Fprotocol.cpp;h=f7a690997088b12d07fa831250a8265dfdc4d630;hb=3b37ee041af581e47646c2487e7e302c55bd8cd7;hp=f8e13beb4ac5f4156780a415d9b24cecfd7be2fb;hpb=2fe7cbcb761487bc7409b93b372da6f8ab3c581e;p=r2c2.git diff --git a/source/network/protocol.cpp b/source/network/protocol.cpp index f8e13be..f7a6909 100644 --- a/source/network/protocol.cpp +++ b/source/network/protocol.cpp @@ -1,23 +1,21 @@ -/* $Id$ - -This file is part of the MSP Märklin suite -Copyright © 2009 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() (&TrainAIControlPacket::address) + (&TrainAIControlPacket::target_speed) (&TrainAIControlPacket::reverse); add() (&TrainStatusPacket::address) (&TrainStatusPacket::status); add() (&RouteInfoPacket::name); @@ -26,4 +24,4 @@ Protocol::Protocol() add() (&ErrorPacket::message); } -} // namespace Marklin +} // namespace R2C2