11 commandController,
"printerlogfilename",
12 "filename of the file where the printer output is logged to",
24 if (file.
is_open() && !strobe && prevStrobe) {
26 file.
write(std::span{&toPrint, 1});
62 return "Log everything that is sent to the printer port to a "
63 "file. The filename can be set with the "
64 "'printerlogfilename' setting.";
67template<
typename Archive>
Represents something you can plug devices into.
void close()
Close the current file.
void write(std::span< const uint8_t > buffer)
Write to file.
bool is_open() const
Return true iff this file handle refers to an open file.
void flush()
Force a write of all buffered data to disk.
zstring_view getString() const noexcept
Thrown when a plug action fails.
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(uint8_t 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:
const FileContext & userFileContext()
#define INSTANTIATE_SERIALIZE_METHODS(CLASS)