]> git.tdb.fi Git - r2c2.git/blob - source/network/protocol.cpp
Add networking library and a remote control program
[r2c2.git] / source / network / protocol.cpp
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 #include "packets.h"
9 #include "protocol.h"
10
11 namespace Marklin {
12
13 Protocol::Protocol()
14 {
15         add<TrainInfoPacket>() (&TrainInfoPacket::address)
16                 (&TrainInfoPacket::loco_type) (&TrainInfoPacket::name);
17         add<TrainSpeedPacket>() (&TrainSpeedPacket::address)
18                 (&TrainSpeedPacket::speed) (&TrainSpeedPacket::reverse);
19         add<TrainFunctionPacket>() (&TrainFunctionPacket::address)
20                 (&TrainFunctionPacket::functions);
21         add<TrainStatusPacket>() (&TrainStatusPacket::address)
22                 (&TrainStatusPacket::status);
23 }
24
25 } // namespace Marklin