POST api/Far/MicroApp/Device/Monitor/ReadData/Any
根据指令,读取任意位置开如的,联续N个字节的数据并执行返回。
Request Information
URI Parameters
None.
Body Parameters
Dev_DeviceDataReadParm| Name | Description | Type | Additional information |
|---|---|---|---|
| DeviceAddress |
设备地址,0x01-0xff,当前设备一般是0x01. |
byte |
None. |
| StartAddress |
开始读取的位置。 |
unsigned integer |
Required |
| ReadLength |
读取数据的数量。 |
unsigned integer |
Required |
| SerialId |
被读取数据的大棚控制器的ID。 |
integer |
Required |
| TransactionId |
执行读取的实时控制事务的ID。 |
string |
Required Max length: 36 |
Request Formats
application/json, text/json
Sample:
{
"DeviceAddress": 64,
"StartAddress": 2,
"ReadLength": 3,
"SerialId": 4,
"TransactionId": "sample string 5"
}
application/xml, text/xml
Sample:
<Dev_DeviceDataReadParm xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DigitalScience.DataTransfer.CleverFarmer"> <DeviceAddress>64</DeviceAddress> <ReadLength>3</ReadLength> <SerialId>4</SerialId> <StartAddress>2</StartAddress> <TransactionId>sample string 5</TransactionId> </Dev_DeviceDataReadParm>
application/x-www-form-urlencoded
Sample:
application/bson
Sample:
Binary JSON content. See http://bsonspec.org for details.
Response Information
Resource Description
根据指令,读取任意位置开如的,联续N个字节的数据并执行返回。
CommonOperationResultWithTagOfIEnumerableOfDev_DeviceDataValueItem| Name | Description | Type | Additional information |
|---|---|---|---|
| errcode | integer |
None. |
|
| errmsg | string |
None. |
|
| tag | Collection of Dev_DeviceDataValueItem |
None. |
Response Formats
application/json, text/json
Sample:
{
"errcode": 1,
"errmsg": "sample string 2",
"tag": [
{
"DataKey": 1,
"DataValue": 2
},
{
"DataKey": 1,
"DataValue": 2
}
]
}
application/xml, text/xml
Sample:
<CommonOperationResultWithTagOfArrayOfDev_DeviceDataValueItemnMA5lUge xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DigitalScience.DataTransfer">
<errcode>1</errcode>
<errmsg>sample string 2</errmsg>
<tag xmlns:d2p1="http://schemas.datacontract.org/2004/07/DigitalScience.DataTransfer.CleverFarmer">
<d2p1:Dev_DeviceDataValueItem>
<d2p1:DataKey>1</d2p1:DataKey>
<d2p1:DataValue>2</d2p1:DataValue>
</d2p1:Dev_DeviceDataValueItem>
<d2p1:Dev_DeviceDataValueItem>
<d2p1:DataKey>1</d2p1:DataKey>
<d2p1:DataValue>2</d2p1:DataValue>
</d2p1:Dev_DeviceDataValueItem>
</tag>
</CommonOperationResultWithTagOfArrayOfDev_DeviceDataValueItemnMA5lUge>
application/bson
Sample:
Binary JSON content. See http://bsonspec.org for details.