openMSX
PrinterPortLogger.hh
Go to the documentation of this file.
1 #ifndef MSXPRINTERPORTLOGGER_HH
2 #define MSXPRINTERPORTLOGGER_HH
3 
4 #include "PrinterPortDevice.hh"
5 #include "FilenameSetting.hh"
6 #include "File.hh"
7 
8 namespace openmsx {
9 
10 class CommandController;
11 
13 {
14 public:
15  explicit PrinterPortLogger(CommandController& commandController);
16 
17  // PrinterPortDevice
18  [[nodiscard]] bool getStatus(EmuTime::param time) override;
19  void setStrobe(bool strobe, EmuTime::param time) override;
20  void writeData(byte 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 
31 private:
32  FilenameSetting logFilenameSetting;
33  File file;
34  byte toPrint;
35  bool prevStrobe;
36 };
37 
38 } // namespace openmsx
39 
40 #endif
Represents something you can plug devices into.
Definition: Connector.hh:21
void unplugHelper(EmuTime::param time) override
void setStrobe(bool strobe, EmuTime::param time) override
Sets the strobe signal: false = low, true = high.
void serialize(Archive &ar, unsigned version)
void plugHelper(Connector &connector, EmuTime::param time) override
PrinterPortLogger(CommandController &commandController)
std::string_view getName() const override
Name used to identify this pluggable.
void writeData(byte data, EmuTime::param time) override
Sets the data signals.
bool getStatus(EmuTime::param time) override
Returns the STATUS signal: false = low = ready, true = high = not ready.
std::string_view getDescription() const override
Description for this pluggable.
This file implemented 3 utility functions:
Definition: Autofire.cc:9