JSD client
ts
import { JSD, type JSDConfig, type JSDOptions } from '@danidoble/serial-node-jsd';
const config: JSDConfig = {
path: '/dev/ttyUSB0', baudRate: 9600,
autoConnect: false, reconnectInterval: 1_000
};
const options: JSDOptions = { transport: 'rs232' };
const jsd = new JSD(config, options);Constructor and properties
new JSD(config: SerialConfig, options?: JSDOptions) accepts serial-core configuration. transport defaults to rs232; tcpip selects outgoing framing only. options.machine is reserved and does not affect routing.
| Member | Contract |
|---|---|
| start() | void; initiates connection without awaiting readiness |
| stop() | Promise<void>; delegates disconnection |
| devicePortStatus() | SerialStatus; current serial service state |
| listPorts(filter?) / findPorts(filter?) | Static and instance metadata enumeration; no open/reservation |
| getPortPath() | Current tracked physical path or null |
| transport | string; active framing strategy name |
| vision | Vision application |
| licensing | Licensing application |
| manifest | Manifest application |
| mdbCardHolder | MDB application |
Use start() to connect and stop() to close. Invoke operations through the application properties above and subscribe to their events on the JSD instance. You do not need to construct frames, call routing hooks or access internal queues.
See every method signature, configuration, and all serial events.