capacitor-modbus
TypeScript icon, indicating that this package has built-in type declarations

0.0.7 • Public • Published

capacitor-modbus

Modbus client for capacitor

Sources

https://github.com/dhakerShiv/cordova-plugin-modbus-tcp https://capacitorjs.com/docs/plugins/workflow

Install

npm install capacitor-modbus
npx cap sync

API

setIpAddress(...)

setIpAddress(options: { ip: string; }) => Promise<void>
Param Type
options { ip: string; }

setPort(...)

setPort(options: { port: number; }) => Promise<void>
Param Type
options { port: number; }

connect()

connect() => Promise<void>

connectTo(...)

connectTo(options: { ip: string; port: number; }) => Promise<void>
Param Type
options { ip: string; port: number; }

disconnect()

disconnect() => Promise<void>

isConnected()

isConnected() => Promise<{ result: boolean; }>

Returns: Promise<{ result: boolean; }>


readHoldingRegisters(...)

readHoldingRegisters(options: { start: number; count: number; }) => Promise<{ result: number[]; }>
Param Type
options { start: number; count: number; }

Returns: Promise<{ result: number[]; }>


convertRegistersToFloat(...)

convertRegistersToFloat(options: { registers: number[]; order: 0 | 1; }) => Promise<{ result: number; }>
Param Type
options { registers: number[]; order: 0 | 1; }

Returns: Promise<{ result: number; }>


Readme

Keywords

Package Sidebar

Install

npm i capacitor-modbus

Weekly Downloads

1

Version

0.0.7

License

MIT

Unpacked Size

71 kB

Total Files

30

Last publish

Collaborators

  • nicolasroehm