]> git.tdb.fi Git - r2c2.git/blob - source/network/packets.h
Add networking library and a remote control program
[r2c2.git] / source / network / packets.h
1 /* $Id$
2
3 This file is part of the MSP Märklin suite
4 Copyright © 2009  Mikkosoft Productions, Mikko Rasa
5 Distributed under the GPL
6 */
7
8 #ifndef MARKLINNET_PACKETS_H_
9 #define MARKLINNET_PACKETS_H_
10
11 #include <string>
12
13 namespace Marklin {
14
15 struct TrainInfoPacket
16 {
17         unsigned address;
18         unsigned loco_type;
19         std::string name;
20 };
21
22 struct TrainSpeedPacket
23 {
24         unsigned address;
25         unsigned speed;
26         char reverse;
27 };
28
29 struct TrainFunctionPacket
30 {
31         unsigned address;
32         unsigned functions;
33 };
34
35 struct TrainStatusPacket
36 {
37         unsigned address;
38         std::string status;
39 };
40
41 } // namespace Marklin
42
43 #endif