Readonly
abstractionProtected
debugProtected
infoProtected
mutexProtected
packetStatic
prefixedOptional
context: anyConnect to printer port.
Optional
options: NiimbotCapacitorBleClientConnectOptionsDisconnect from printer port.
Calls each of the listeners registered for a given event.
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.
Determine print task version if any.
Protected
initialSend "connect" packet and fetch the protocol version.
Check if the client is connected.
Checks if the heartbeat timer has been started.
Return 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>]) => voidOptional
context: anyOptional
once: booleanAdd a listener for a given event.
Optional
context: anyAdd a one-time listener for a given event.
Optional
context: anyProtected
processConvert raw bytes to packet objects and fire events. Defragmentation included.
Bytes to process.
Remove all listeners, or those of the specified event.
Optional
event: keyof ClientEventMapRemove the listeners of a given event.
Optional
fn: (...args: ArgumentMap<ClientEventMap>[Extract<T, keyof ClientEventMap>]) => voidOptional
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.
Packet object.
PrintError when ResponseCommandId.In_PrintError or ResponseCommandId.In_NotSupported received.
Send raw bytes to the printer port.
Bytes to send.
Optional
force: booleanIgnore mutex lock. It used internally and you should avoid using it.
Enable some debug information logging.
Set interval for startHeartbeat.
Heartbeat interval, default is 1000ms
Set the interval between packets in milliseconds.
Starts the heartbeat timer, "heartbeat" is emitted after packet received.
If you need to change interval, call setHeartbeatInterval before.
Stops the heartbeat by clearing the interval timer.
Send wait for response for timeoutMs milliseconds.
If ids is set, it will wait for packet with this command ids.
Packet object.
PrintError when ResponseCommandId.In_PrintError or ResponseCommandId.In_NotSupported received and catchErrorPackets is true.
Uses @capacitor-community/bluetooth-le