]> git.tdb.fi Git - r2c2.git/blobdiff - source/network/packets.h
Add networking library and a remote control program
[r2c2.git] / source / network / packets.h
diff --git a/source/network/packets.h b/source/network/packets.h
new file mode 100644 (file)
index 0000000..d6efafc
--- /dev/null
@@ -0,0 +1,43 @@
+/* $Id$
+
+This file is part of the MSP Märklin suite
+Copyright © 2009  Mikkosoft Productions, Mikko Rasa
+Distributed under the GPL
+*/
+
+#ifndef MARKLINNET_PACKETS_H_
+#define MARKLINNET_PACKETS_H_
+
+#include <string>
+
+namespace Marklin {
+
+struct TrainInfoPacket
+{
+       unsigned address;
+       unsigned loco_type;
+       std::string name;
+};
+
+struct TrainSpeedPacket
+{
+       unsigned address;
+       unsigned speed;
+       char reverse;
+};
+
+struct TrainFunctionPacket
+{
+       unsigned address;
+       unsigned functions;
+};
+
+struct TrainStatusPacket
+{
+       unsigned address;
+       std::string status;
+};
+
+} // namespace Marklin
+
+#endif