openMSX
Public Member Functions | Protected Member Functions | List of all members
openmsx::PrinterCore Class Referenceabstract

#include <Printer.hh>

Inheritance diagram for openmsx::PrinterCore:
Inheritance graph
[legend]
Collaboration diagram for openmsx::PrinterCore:
Collaboration graph
[legend]

Public Member Functions

bool getStatus (EmuTime::param time) override
 Returns the STATUS signal: false = low = ready, true = high = not ready. More...
 
void setStrobe (bool strobe, EmuTime::param time) override
 Sets the strobe signal: false = low, true = high. More...
 
void writeData (byte data, EmuTime::param time) override
 Sets the data signals. More...
 
void plugHelper (Connector &connector, EmuTime::param time) override
 
void unplugHelper (EmuTime::param time) override
 
- Public Member Functions inherited from openmsx::PrinterPortDevice
std::string_view getClass () const final override
 A pluggable belongs to a certain class. More...
 
- Public Member Functions inherited from openmsx::Pluggable
virtual ~Pluggable ()=default
 
virtual const std::string & getName () const
 Name used to identify this pluggable. More...
 
virtual std::string_view getDescription () const =0
 Description for this pluggable. More...
 
void plug (Connector &connector, EmuTime::param time)
 This method is called when this pluggable is inserted in a connector. More...
 
void unplug (EmuTime::param time)
 This method is called when this pluggable is removed from a conector. More...
 
ConnectorgetConnector () const
 Get the connector this Pluggable is plugged into. More...
 
bool isPluggedIn () const
 Returns true if this pluggable is currently plugged into a connector. More...
 

Protected Member Functions

 PrinterCore ()=default
 
 ~PrinterCore () override=default
 
virtual void write (byte data)=0
 
virtual void forceFormFeed ()=0
 
- Protected Member Functions inherited from openmsx::Pluggable
 Pluggable ()
 
void setConnector (Connector *conn)
 

Detailed Description

Definition at line 25 of file Printer.hh.

Constructor & Destructor Documentation

◆ PrinterCore()

openmsx::PrinterCore::PrinterCore ( )
protecteddefault

◆ ~PrinterCore()

openmsx::PrinterCore::~PrinterCore ( )
overrideprotecteddefault

Member Function Documentation

◆ forceFormFeed()

virtual void openmsx::PrinterCore::forceFormFeed ( )
protectedpure virtual

Implemented in openmsx::ImagePrinter.

Referenced by unplugHelper().

◆ getStatus()

bool openmsx::PrinterCore::getStatus ( EmuTime::param  time)
overridevirtual

Returns the STATUS signal: false = low = ready, true = high = not ready.

Implements openmsx::PrinterPortDevice.

Definition at line 49 of file Printer.cc.

◆ plugHelper()

void openmsx::PrinterCore::plugHelper ( Connector connector,
EmuTime::param  time 
)
overridevirtual

Implements openmsx::Pluggable.

Definition at line 68 of file Printer.cc.

◆ setStrobe()

void openmsx::PrinterCore::setStrobe ( bool  strobe,
EmuTime::param  time 
)
overridevirtual

Sets the strobe signal: false = low, true = high.

Normal high, a short pulse (low, high) means data is valid.

Implements openmsx::PrinterPortDevice.

Definition at line 54 of file Printer.cc.

References write().

◆ unplugHelper()

void openmsx::PrinterCore::unplugHelper ( EmuTime::param  time)
overridevirtual

Implements openmsx::Pluggable.

Definition at line 73 of file Printer.cc.

References forceFormFeed().

◆ write()

virtual void openmsx::PrinterCore::write ( byte  data)
protectedpure virtual

Implemented in openmsx::ImagePrinter.

Referenced by setStrobe().

◆ writeData()

void openmsx::PrinterCore::writeData ( byte  data,
EmuTime::param  time 
)
overridevirtual

Sets the data signals.

Always use strobe to see wheter data is valid. As an optimization, this method might not be called when the new data is the same as the previous data.

Implements openmsx::PrinterPortDevice.

Definition at line 63 of file Printer.cc.


The documentation for this class was generated from the following files: