X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fnetwork%2Fprotocol.cpp;h=2cd893e7a55689ed8f4b52649cfa9c1ed41255d9;hb=862d8bea6d31e6fe9a60747e0b9559f77e72bf44;hp=f8e13beb4ac5f4156780a415d9b24cecfd7be2fb;hpb=2fe7cbcb761487bc7409b93b372da6f8ab3c581e;p=r2c2.git diff --git a/source/network/protocol.cpp b/source/network/protocol.cpp index f8e13be..2cd893e 100644 --- a/source/network/protocol.cpp +++ b/source/network/protocol.cpp @@ -1,21 +1,17 @@ -/* $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() (&TrainStatusPacket::address) @@ -26,4 +22,4 @@ Protocol::Protocol() add() (&ErrorPacket::message); } -} // namespace Marklin +} // namespace R2C2