11 commandController,
"printerlogfilename",
12 "filename of the file where the printer output is logged to",
31 if (file.
is_open() && !strobe && prevStrobe) {
33 file.
write(&toPrint, 1);
69 return "Log everything that is sent to the printer port to a "
70 "file. The filename can be set with the "
71 "'printerlogfilename' setting.";
74 template<
typename Archive>
Represents something you can plug devices into.
void close()
Close the current file.
bool is_open() const
Return true iff this file handle refers to an open file.
void write(const void *buffer, size_t num)
Write to file.
void flush()
Force a write of all buffered data to disk.
zstring_view getString() const noexcept
const std::string & getMessage() const &
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(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:
REGISTER_POLYMORPHIC_INITIALIZER(Pluggable, CassettePlayer, "CassettePlayer")
FileContext userFileContext(string_view savePath)
#define INSTANTIATE_SERIALIZE_METHODS(CLASS)