openMSX
RS232Device.hh
Go to the documentation of this file.
1 #ifndef RS232DEVICE_HH
2 #define RS232DEVICE_HH
3 
4 #include "Pluggable.hh"
5 #include "SerialDataInterface.hh"
6 
7 namespace openmsx {
8 
10 {
11 public:
12  // Pluggable (part)
13  [[nodiscard]] std::string_view getClass() const final;
14 
15  // input
16  virtual void signal(EmuTime::param time) = 0;
17 
18  // SerialDataInterface (part) (output)
19  void setDataBits(DataBits bits) override;
20  void setStopBits(StopBits bits) override;
21  void setParityBit(bool enable, ParityBit parity) override;
22 
23  // control
24  [[nodiscard]] virtual bool getCTS(EmuTime::param time) const;
25  [[nodiscard]] virtual bool getDSR(EmuTime::param time) const;
26  virtual void setDTR(bool status, EmuTime::param time);
27  virtual void setRTS(bool status, EmuTime::param time);
28 };
29 
30 } // namespace openmsx
31 
32 #endif
virtual bool getCTS(EmuTime::param time) const
Definition: RS232Device.cc:25
virtual void setRTS(bool status, EmuTime::param time)
Definition: RS232Device.cc:40
void setStopBits(StopBits bits) override
Definition: RS232Device.cc:15
virtual void signal(EmuTime::param time)=0
void setParityBit(bool enable, ParityBit parity) override
Definition: RS232Device.cc:20
void setDataBits(DataBits bits) override
Definition: RS232Device.cc:10
std::string_view getClass() const final
A pluggable belongs to a certain class.
Definition: RS232Device.cc:5
virtual void setDTR(bool status, EmuTime::param time)
Definition: RS232Device.cc:35
virtual bool getDSR(EmuTime::param time) const
Definition: RS232Device.cc:30
This file implemented 3 utility functions:
Definition: Autofire.cc:5