openMSX
RS232Device.hh
Go to the documentation of this file.
1#ifndef RS232DEVICE_HH
2#define RS232DEVICE_HH
3
4#include "Pluggable.hh"
6
7namespace openmsx {
8
10{
11public:
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, Parity parity) override;
22
23 // control
24 [[nodiscard]] virtual std::optional<bool> getCTS(EmuTime::param time) const;
25 [[nodiscard]] virtual std::optional<bool> getDSR(EmuTime::param time) const;
26 [[nodiscard]] virtual std::optional<bool> getDCD(EmuTime::param time) const;
27 [[nodiscard]] virtual std::optional<bool> getRI(EmuTime::param time) const;
28 virtual void setDTR(bool status, EmuTime::param time);
29 virtual void setRTS(bool status, EmuTime::param time);
30};
31
32} // namespace openmsx
33
34#endif
virtual std::optional< bool > getRI(EmuTime::param time) const
virtual void setRTS(bool status, EmuTime::param time)
void setStopBits(StopBits bits) override
virtual void signal(EmuTime::param time)=0
virtual std::optional< bool > getDSR(EmuTime::param time) const
virtual std::optional< bool > getCTS(EmuTime::param time) const
void setDataBits(DataBits bits) override
std::string_view getClass() const final
A pluggable belongs to a certain class.
Definition RS232Device.cc:5
void setParityBit(bool enable, Parity parity) override
virtual std::optional< bool > getDCD(EmuTime::param time) const
virtual void setDTR(bool status, EmuTime::param time)
This file implemented 3 utility functions:
Definition Autofire.cc:11