]> git.tdb.fi Git - r2c2.git/blobdiff - source/network/protocol.cpp
Pass sensor events through blocks
[r2c2.git] / source / network / protocol.cpp
index cfbc0fdc2a1eac66c53205ef8475468129f33a60..ee0a1b07c5e9674f04aaa6649a8a4b4b1ae256fb 100644 (file)
@@ -1,7 +1,7 @@
 /* $Id$
 
 This file is part of R²C²
-Copyright © 2009  Mikkosoft Productions, Mikko Rasa
+Copyright © 2009-2011  Mikkosoft Productions, Mikko Rasa
 Distributed under the GPL
 */
 
@@ -12,6 +12,9 @@ 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)