UNPKG

simple-modbus

Version:

A simple library for working with Modbus with Typescript bindings.

29 lines (28 loc) 1.13 kB
/// <reference types="node" /> import { ModbusCommand } from './modbus-commands'; export declare class ModbusCommandFactoryOptions { /** * @default: true * If this option is set, the server will use 0 based coil, input status, and register addresses. * For instance, register 40001 will be 0, 40002 will be 1, etc. * * ``` * | | simple | modbus | * |------------------|--------|--------| * | Coil | 0 | 1 | * | Coil | 1 | 2 | * | Input | 0 | 10001 | * | Input | 1 | 10002 | * | Holding Register | 0 | 30001 | * | Holding Register | 1 | 30002 | * | Input Register | 0 | 40001 | * | Input Register | 1 | 40002 | * ``` */ simpleAddressing?: boolean; } export declare abstract class ModbusCommandFactory { protected readonly simpleAddressing: boolean; protected constructor(options?: ModbusCommandFactoryOptions); abstract fromPacket(packet: Buffer): ModbusCommand<any>; }