openMSX
PrinterPortSimpl.hh
Go to the documentation of this file.
1#ifndef PRINTERPORTSIMPLE_HH
2#define PRINTERPORTSIMPLE_HH
3
5#include "DACSound8U.hh"
6#include <optional>
7
8namespace openmsx {
9
10class HardwareConfig;
11
13{
14public:
15 explicit PrinterPortSimpl(const HardwareConfig& hwConf);
16
17 // PrinterPortDevice
18 [[nodiscard]] bool getStatus(EmuTime::param time) override;
19 void setStrobe(bool strobe, EmuTime::param time) override;
20 void writeData(uint8_t data, EmuTime::param time) override;
21
22 // Pluggable
23 [[nodiscard]] std::string_view getName() const override;
24 [[nodiscard]] std::string_view getDescription() const override;
25 void plugHelper(Connector& connector, EmuTime::param time) override;
26 void unplugHelper(EmuTime::param time) override;
27
28 template<typename Archive>
29 void serialize(Archive& ar, unsigned version);
30
31private:
32 void createDAC();
33
34private:
35 const HardwareConfig& hwConf;
36 std::optional<DACSound8U> dac;
37};
38
39} // namespace openmsx
40
41#endif
Represents something you can plug devices into.
Definition Connector.hh:21
void unplugHelper(EmuTime::param time) override
bool getStatus(EmuTime::param time) override
Returns the STATUS signal: false = low = ready, true = high = not ready.
void serialize(Archive &ar, unsigned version)
void plugHelper(Connector &connector, EmuTime::param time) override
std::string_view getDescription() const override
Description for this pluggable.
void setStrobe(bool strobe, EmuTime::param time) override
Sets the strobe signal: false = low, true = high.
void writeData(uint8_t data, EmuTime::param time) override
Sets the data signals.
std::string_view getName() const override
Name used to identify this pluggable.
This file implemented 3 utility functions:
Definition Autofire.cc:11