#ifndef MSP_IO_SERIAL_H_
#define MSP_IO_SERIAL_H_
-#include "base.h"
+#include "eventobject.h"
+#include "eventreader.h"
+#include "handle.h"
namespace Msp {
namespace IO {
-class Serial: public Base
+class Serial: public EventObject
{
public:
enum Parity
};
private:
+ struct DeviceState;
+
Handle handle;
+ EventReader reader;
public:
Serial(const std::string &);
+private:
+ void platform_init(const std::string &);
+public:
virtual ~Serial();
private:
virtual unsigned do_read(char *, unsigned);
public:
- virtual Handle get_event_handle();
+ virtual const Handle &get_event_handle() { return reader.get_event(); }
};
} // namespace IO