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 void set_block(bool) override;
39 void set_inherit(bool) override;
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 std::size_t do_write(const char *, std::size_t) override;
49 std::size_t do_read(char *, std::size_t) override;
52 const Handle &get_handle(Mode) override;
53 const Handle &get_event_handle() override { return reader.get_event(); }