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);
39 virtual void set_inherit(bool);
41 void set_baud_rate(unsigned);
42 void set_data_bits(unsigned);
43 void set_parity(Parity);
44 void set_stop_bits(unsigned);
45 void set_parameters(const std::string &);
48 virtual std::size_t do_write(const char *, std::size_t);
49 virtual std::size_t do_read(char *, std::size_t);
52 virtual const Handle &get_handle(Mode);
53 virtual const Handle &get_event_handle() { return reader.get_event(); }