Abstract
Readonly
abstractionProtected
debugProtected
infoProtected
mutexProtected
packetStatic
prefixedRest
...args: ArgumentMap<ClientEventMap>[Extract<T, keyof ClientEventMap>]Optional
context: anyAbstract
connectConnect to printer port.
Abstract
disconnectCalls each of the listeners registered for a given event.
Rest
...args: ArgumentMap<ClientEventMap>[Extract<T, keyof ClientEventMap>]Return an array listing the events for which the emitter has registered listeners.
Fetches printer information and stores it.
Get printer capabilities based on the printer model. Model library is hardcoded.
Get the stored information about the printer.
Protected
initialAbstract
isReturn the number of listeners listening to a given event.
Return the listeners registered for a given event.
Optional
fn: ((...args: ArgumentMap<ClientEventMap>[Extract<T, keyof ClientEventMap>]) => void)Rest
...args: ArgumentMap<ClientEventMap>[Extract<T, keyof ClientEventMap>]Optional
context: anyOptional
once: booleanAdd a listener for a given event.
Rest
...args: ArgumentMap<ClientEventMap>[Extract<T, keyof ClientEventMap>]Optional
context: anyAdd a one-time listener for a given event.
Rest
...args: ArgumentMap<ClientEventMap>[Extract<T, keyof ClientEventMap>]Optional
context: anyRemove the listeners of a given event.
Optional
fn: ((...args: ArgumentMap<ClientEventMap>[Extract<T, keyof ClientEventMap>]) => void)Rest
...args: ArgumentMap<ClientEventMap>[Extract<T, keyof ClientEventMap>]Optional
context: anyOptional
once: booleanOptional
force: booleanSend packet and wait for response for timeoutMs milliseconds.
If () validResponseIds is defined, it will wait for packet with this command id.
Printer response object.
PrintError when ResponseCommandId.In_PrintError or ResponseCommandId.In_NotSupported received.
Abstract
sendSet interval for startHeartbeat.
Heartbeat interval, default is 1000ms
Starts the heartbeat timer, "heartbeat" is emitted after packet received.
If you need to change interval, call setHeartbeatInterval before.
Abstract class representing a client with common functionality for interacting with a printer. Hardware interface must be defined after extending this class.