]> git.tdb.fi Git - r2c2.git/blob - source/network/packets.h
Rename the project to R²C²
[r2c2.git] / source / network / packets.h
1 /* $Id$
2
3 This file is part of R²C²
4 Copyright © 2009  Mikkosoft Productions, Mikko Rasa
5 Distributed under the GPL
6 */
7
8 #ifndef R2C2_NET_PACKETS_H_
9 #define R2C2_NET_PACKETS_H_
10
11 #include <string>
12
13 namespace R2C2 {
14
15 struct TrainInfoPacket
16 {
17         unsigned address;
18         std::string 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 R2C2
58
59 #endif