modbus-lib-angular
v1.0.2
Published
A library that provide communication to devices through modbuc protocol in Angular apps
Downloads
4
Readme
Coder Gyan colorify library
Usage
import { PublicCommServiceModbus } from 'modbus-lib-angular';
PublicCommServiceModbus.connect(params: any): Promise<IAPIResponse>;
comport: string = params.body.commSettings.comport;
baudRate: number = params.body.commSettings.baudrate;
PublicCommServiceModbus.read(params: any): Promise<IAPIResponse>;
addressMaps = params.body.payLoad; //[{address: 40001,length: 31 },{address: 40201, length: 5}]
response: {status: 200, data [{status:200, data:[]}, {status:200, data:[]}]} // multiple Buffer values
PublicCommServiceModbus.write(params: any): Promise<IAPIResponse>;
addressMaps = params.body.payLoad; //[{address: 40001, value: },{address: 40201 ,value: }]
response: {status: 200, data [{status:200, data:[]}, {status:200, data:[]}]} // multiple Buffer values
PublicCommServiceModbus.disconnect(params: any): Promise<IAPIResponse> // params not required