]> git.tdb.fi Git - r2c2.git/blob - source/network/packets.h
Halt all trains in various unexpected situations
[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 TrainControlPacket
23 {
24         unsigned address;
25         std::string control;
26         float value;
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 struct RouteInfoPacket
42 {
43         std::string name;
44 };
45
46 struct TrainRoutePacket
47 {
48         unsigned address;
49         std::string route;
50 };
51
52 struct ErrorPacket
53 {
54         std::string message;
55 };
56
57 } // namespace Marklin
58
59 #endif