JSD: method reference
Methods you can use in your application. A void promise confirms command submission; device data and rejections arrive through events. Operations returning boolean or arrays wait for their specific results.
start
public start(): void;Starts the serial service.
Initiates connection to the Device if not already connected.
devicePortStatus
public devicePortStatus(): SerialStatus;Gets the current status of the serial service.
stop
public async stop(): Promise<void>;Stops the relay service and closes the serial connection.
listPorts
public static listPorts(filter: PortFilter = {}): Promise<SerialPortInfo[]>;Enumerate ports with exact AND-combined filters, without opening or reserving them.
findPorts
public static findPorts(filter: PortFilter = {}): Promise<SerialPortInfo[]>;Find all matching ports; equivalent to listPorts(). Enumeration errors reject.
listPorts
public listPorts(filter: PortFilter = {}): Promise<SerialPortInfo[]>;Enumerate ports independently of this client's connection configuration.
findPorts
public findPorts(filter: PortFilter = {}): Promise<SerialPortInfo[]>;Find matching ports without changing this client's session.
getPortPath
public getPortPath(): string | null;Current physical port path, or null before opening and after cleanup.
transport
public get transport(): string;Get the name of current transport strategy.
Advanced internal integration reference
Use the methods above in your application. These hooks are reserved for low-level integrations.
connection
public connection(): number[];Generate connection packet.
_toQueue
public _toQueue(
data: BuildPacketResult,
options?: {
alias?: string;
timeout?: number;
waitResponse?: boolean;
}
): void;Internal submission hook used by the JSD applications.