Command penetration transmission
Parameter | Description | Required |
---|---|---|
action | sendCmdToDevice | True |
pn | Datalogger number | True |
devaddr | Address(485 bus) | True |
cmd | The instruction to be sent to the address (485 bus) in an uppercase hexadecimal string format, such as "AA BB CC DD EE FF". The system will not distinguish the business attributes of instructions and will directly pass them through | True |
response:
Parameter | Description | Required |
---|---|---|
dat | The response after the instruction is issued, formatted as an uppercase hexadecimal string, such as "AA BB CC DD EE FF". The system will not parse or modify this response, and will directly pass a callback to the user. Additionally, some instructions do not bring a response and return 'null' at this time |
True |
{
"err":0,
"desc":"ERR_NONE",
"dat":{
"dat":"AA BB CC DD EE FF"
}
}
Possible errors:
Response error code | Description | Details |
---|---|---|
0x0001 | ERR_FAIL | Fail |
0x0002 | ERR_TIMEOUT | Timed out (instruction issued for a long time without response) |
0x0006 | ERR_FORMAT_ERROR | Parameter error |
0x0101 | ERR_NOT_FOUND_COLLECTOR | Unable to find Datalogger |
0x0106 | ERR_DEVICE_OFFLINE | Device is offline |