UNPKG

@zandor300/jsmodbus

Version:

Implementation for the Serial/TCP Modbus protocol.

16 lines 942 B
import { ErrorCode, FunctionCode } from '../codes'; import ExceptionRequestBody from '../request/exception.js'; import ModbusResponseBody from './response-body.js'; export default class ExceptionResponseBody extends ModbusResponseBody { get code(): ErrorCode; get message(): "ILLEGAL FUNCTION" | "ILLEGAL DATA ADDRESS" | "ILLEGAL DATA VALUE" | "SLAVE DEVICE FAILURE" | "ACKNOWLEDGE" | "SLAVE DEVICE BUSY" | "MEMORY PARITY ERROR" | "GATEWAY PATH UNAVAILABLE" | "GATEWAY TARGET DEVICE FAILED TO RESPOND"; get byteCount(): number; get isException(): boolean; static fromBuffer(buffer: Buffer): ExceptionResponseBody; static fromRequest(requestBody: ExceptionRequestBody): ExceptionResponseBody; private _code; constructor(fc: FunctionCode, code: ErrorCode); createPayload(): Buffer; } export declare function isExceptionResponseBody(x: any): x is ExceptionResponseBody; //# sourceMappingURL=exception.d.ts.map