UNPKG

njs-modbus

Version:

A pure JavaScript implemetation of Modbus for NodeJS.

21 lines (20 loc) 961 B
import type { ApplicationDataUnit } from '../../types'; import type { TcpClientPhysicalLayer, TcpServerPhysicalLayer, UdpPhysicalLayer } from '../physical'; import type { SerialPhysicalLayer } from '../physical'; import { AbstractApplicationLayer } from './abstract-application-layer'; export declare class AsciiApplicationLayer extends AbstractApplicationLayer { private _waitingResponse?; private _status; private _frame; private _removeAllListeners; constructor(physicalLayer: SerialPhysicalLayer | TcpServerPhysicalLayer | TcpClientPhysicalLayer | UdpPhysicalLayer); private framing; startWaitingResponse(preCheck: ((frame: ApplicationDataUnit & { buffer: Buffer; }) => boolean | number | undefined)[], callback: (error: Error | null, frame?: ApplicationDataUnit & { buffer: Buffer; }) => void): void; stopWaitingResponse(): void; encode(data: ApplicationDataUnit): Buffer; destroy(): void; }