RS485F
1.RS485F.getState
Get Current RS485F State
Param | Value | Desc |
---|---|---|
method | RS485F.getState | Get Current State |
targetDevice | <String,Necessary> | DeviceId of the RS485F you use; |
token | <String,Necessary> | Net token of the RS485F you use; |
Param | Value | Desc |
---|---|---|
data.baudRate | <Integer,Necessary> | The BaudRate of RS485, Default:9600 |
data.parity | <String,Necessary> | The Parity of RS485;["None","Even","Odd"];Default:None |
data.stopBits | <Integer,Necessary> | The StopBits of RS485;[0.5,1,1.5,2];Default:1 |
2.RS485F.setState
Open RS485F
Param | Value | Desc |
---|---|---|
method | RS485F.setState | Config RS485 |
targetDevice | <String,Necessary> | DeviceId of the RS485F you use; |
token | <String,Necessary> | Net token of the RS485F you use; |
params.baudRate | <Integer,Necessary> | The BaudRate of RS485, Default:9600 |
params.parity | <Integer,Necessary> | The Parity of RS485;["None","Even","Odd"];Default:None |
params.stopBits | <Integer,Necessary> | The StopBits of RS485;[0.5,1,1.5,2];Default:1 |
BUDP*
Same as RS485F.getState
3.RS485F.sendDatas
Send Datas
Param | Value | Desc |
---|---|---|
method | RS485F.sendCode | Send Datas |
targetDevice | <String,Necessary> | DeviceId of the RS485F you use; |
token | <String,Necessary> | Net token of the RS485F you use; |
params.datas | <Buffer,Necessary> | The Bytes you want to send; |
BUDP*
Param | Value | Desc |
---|---|---|
data.isSuccess | <Boolean,Necessary> | Result |
4.RS485F.getVersion
Get firmware info
Param | Value | Desc |
---|---|---|
method | RS485F.getVersion | Get firmware info; |
targetDevice | <String,Necessary> | DeviceId of this device; |
token | <String,Necessary> | Net Token of this device; |
Param | Value | Desc |
---|---|---|
data.version | <String,Necessary> | Current Version; |
data.newVersion.versionId | <String,Optional> | Id of the newest version; |
data.newVersion.versionCode | <String,Optional> | Code of the newest version; |
data.newVersion.fileSize | <String,Optional> | File Size of the newest version; |
5.RS485F.startUpgrade
Start Upgrade
Param | Value | Desc |
---|---|---|
method | RS485F.startUpgrade | Start Upgrade |
targetDevice | <String,Necessary> | DeviceId of this device; |
token | <String,Necessary> | Net Token of this device; |
params.versionId | <String,Necessary> | Version Id you want to upgrade; |
Param | Value | Desc |
---|---|---|
data.isStarted | <Boolean,Necessary> | Is upgrading started; |
6.Callbacks
You can receive it with Http Callback API or MQTT report topic
Param | Value | Desc |
---|---|---|
data.type | <RS485Get> | Datas received from RS485 |
data.datas | <Buffer,Necessary> | Data Buffer |