X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fnetwork%2Fpackets.h;h=1982eea5966525e07d4978b45e182daf0ab41af8;hb=3b37ee041af581e47646c2487e7e302c55bd8cd7;hp=8bbaf8e239d4b8d3dd946f5c3e0817d1098df496;hpb=9ddcd066e37e4c72685817c042c30897786ece05;p=r2c2.git diff --git a/source/network/packets.h b/source/network/packets.h index 8bbaf8e..1982eea 100644 --- a/source/network/packets.h +++ b/source/network/packets.h @@ -1,21 +1,25 @@ -/* $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 -#ifndef MARKLINNET_PACKETS_H_ -#define MARKLINNET_PACKETS_H_ +namespace R2C2 { -#include +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; }; @@ -32,6 +36,13 @@ struct TrainFunctionPacket unsigned functions; }; +struct TrainAIControlPacket +{ + unsigned address; + float target_speed; + char reverse; +}; + struct TrainStatusPacket { unsigned address; @@ -54,6 +65,6 @@ struct ErrorPacket std::string message; }; -} // namespace Marklin +} // namespace R2C2 #endif