openMSX
RS232Connector.hh
Go to the documentation of this file.
1#ifndef RS232CONNECTOR_HH
2#define RS232CONNECTOR_HH
3
4#include "Connector.hh"
6#include "serialize_meta.hh"
7
8namespace openmsx {
9
10class RS232Device;
11
13{
14public:
15 [[nodiscard]] RS232Device& getPluggedRS232Dev() const;
16
17 // Connector
18 [[nodiscard]] std::string_view getDescription() const final;
19 [[nodiscard]] std::string_view getClass() const final;
20
21 // input (SerialDataInterface)
22 void setDataBits(DataBits bits) override = 0;
23 void setStopBits(StopBits bits) override = 0;
24 void setParityBit(bool enable, Parity parity) override = 0;
25 void recvByte(byte value, EmuTime::param time) override = 0;
26 [[nodiscard]] virtual bool ready() = 0;
27 [[nodiscard]] virtual bool acceptsData() = 0;
28
29 template<typename Archive>
30 void serialize(Archive& ar, unsigned version);
31
32protected:
33 RS232Connector(PluggingController& pluggingController,
34 std::string name);
35 ~RS232Connector() = default;
36};
37
39
40} // namespace openmsx
41
42#endif
Represents something you can plug devices into.
Definition Connector.hh:21
Central administration of Connectors and Pluggables.
virtual bool ready()=0
std::string_view getClass() const final
A Connector belong to a certain class.
void setParityBit(bool enable, Parity parity) override=0
void recvByte(byte value, EmuTime::param time) override=0
virtual bool acceptsData()=0
RS232Device & getPluggedRS232Dev() const
std::string_view getDescription() const final
Get a description for this connector.
void serialize(Archive &ar, unsigned version)
void setDataBits(DataBits bits) override=0
void setStopBits(StopBits bits) override=0
This file implemented 3 utility functions:
Definition Autofire.cc:11
#define REGISTER_BASE_CLASS(CLASS, NAME)