1 #ifndef MSP_IO_SERIAL_H_
2 #define MSP_IO_SERIAL_H_
4 #include "eventobject.h"
5 #include "eventreader.h"
11 class Serial: public EventObject
28 Serial(const std::string &);
30 void platform_init(const std::string &);
38 virtual void set_block(bool);
40 void set_baud_rate(unsigned);
41 void set_data_bits(unsigned);
42 void set_parity(Parity);
43 void set_stop_bits(unsigned);
44 void set_parameters(const std::string &);
47 virtual unsigned do_write(const char *, unsigned);
48 virtual unsigned do_read(char *, unsigned);
51 virtual const Handle &get_event_handle() { return reader.get_event(); }