]> git.tdb.fi Git - r2c2.git/blobdiff - source/network/protocol.cpp
Ensure that remaining estimate is negative if the waypoint is unreachable
[r2c2.git] / source / network / protocol.cpp
index 623eadb334eff2b89666c085333fb63af516be9c..2cd893e7a55689ed8f4b52649cfa9c1ed41255d9 100644 (file)
@@ -1,17 +1,13 @@
-/* $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>() (&DriverStatePacket::power)
+               (&DriverStatePacket::halt);
+       add<EmergencyPacket>() (&EmergencyPacket::message);
        add<TrainInfoPacket>() (&TrainInfoPacket::address)
                (&TrainInfoPacket::loco_type) (&TrainInfoPacket::name);
        add<TrainControlPacket>() (&TrainControlPacket::address)
@@ -26,4 +22,4 @@ Protocol::Protocol()
        add<ErrorPacket>() (&ErrorPacket::message);
 }
 
-} // namespace Marklin
+} // namespace R2C2