-/* $Id$
-
-This file is part of R²C²
-Copyright © 2010 Mikkosoft Productions, Mikko Rasa
-Distributed under the GPL
-*/
-
#ifndef LIBR2C2_INTELLIBOX_H_
#define LIBR2C2_INTELLIBOX_H_
#include <map>
+#include <msp/io/serial.h>
#include <msp/time/timestamp.h>
#include "driver.h"
ERR_NO_I2C_SPACE,
ERR_LOW_TURNOUT_SPACE=0x40,
ERR_LOK_HALTED,
- ERR_LOK_POWER_OFF,
+ ERR_LOK_POWER_OFF
};
enum Protocol
unsigned bits;
unsigned state;
bool active;
+ bool synced;
unsigned pending;
Msp::Time::TimeStamp off_timeout;
unsigned length;
};
- int serial_fd;
+ Msp::IO::Serial serial;
bool power;
bool halted;
std::map<unsigned, Locomotive> locos;