]> git.tdb.fi Git - r2c2.git/blobdiff - source/network/packets.h
Strip Id tags and copyright notices from files
[r2c2.git] / source / network / packets.h
index d6efafc666d4cf49d746f27ec3a985654a61ee2b..f720dcc63029b933024270415a5f13d17cf0caf9 100644 (file)
@@ -1,29 +1,33 @@
-/* $Id$
+#ifndef R2C2_NET_PACKETS_H_
+#define R2C2_NET_PACKETS_H_
 
-This file is part of the MSP Märklin suite
-Copyright © 2009  Mikkosoft Productions, Mikko Rasa
-Distributed under the GPL
-*/
+#include <string>
 
-#ifndef MARKLINNET_PACKETS_H_
-#define MARKLINNET_PACKETS_H_
+namespace R2C2 {
 
-#include <string>
+struct DriverStatePacket
+{
+       char power;
+       char halt;
+};
 
-namespace Marklin {
+struct EmergencyPacket
+{
+       std::string message;
+};
 
 struct TrainInfoPacket
 {
        unsigned address;
-       unsigned loco_type;
+       std::string loco_type;
        std::string name;
 };
 
-struct TrainSpeedPacket
+struct TrainControlPacket
 {
        unsigned address;
-       unsigned speed;
-       char reverse;
+       std::string control;
+       float value;
 };
 
 struct TrainFunctionPacket
@@ -38,6 +42,22 @@ struct TrainStatusPacket
        std::string status;
 };
 
-} // namespace Marklin
+struct RouteInfoPacket
+{
+       std::string name;
+};
+
+struct TrainRoutePacket
+{
+       unsigned address;
+       std::string route;
+};
+
+struct ErrorPacket
+{
+       std::string message;
+};
+
+} // namespace R2C2
 
 #endif