Skip to content

Home > resol-vbus-core-nodejs > NetLiveTransceiverBridge

NetLiveTransceiverBridge class

A helper class that pumps data between a socket and a VBus live transceiver.

Signature:

typescript
export declare class NetLiveTransceiverBridge

Constructors

Constructor

Modifiers

Description

(constructor)(socket, liveTransceiver)

Construct a new bridge.

Properties

Property

Modifiers

Type

Description

buffer

Buffer

A temporary buffer.

liveTransceiver

LiveTransceiver

The live transceiver.

mode

'command' | 'data' | 'destroyed'

The current mode.

readLineReject

((err: unknown) => void) | null

The function to reject the active readLine promise.

readLineResolve

((line: string) => void) | null

The function to resolve the active readLine promise.

socket

net.Socket

The socket.

socketOnReadable

(() => void) | null

The event handler for the socket's readable event.

Methods

Method

Modifiers

Description

_processBuffer()

Process the data from the internal buffer.

destroy(err)

Destroy the bridge.

readLine()

Read a line from the socket's incoming data.

switchToDataMode()

Switch from command to data mode.