POST api/Device/Ctrl/Regist

注册一个新的大棚控制器,手动注册或疑似大棚控制器的注册,均是调用这个API。 这个API对应的存储过程为Sp_Dev_Ctrl_Regist。

Request Information

URI Parameters

None.

Body Parameters

用于注册的大棚控制器的信息。

Dev_Controller_RegistParm
NameDescriptionTypeAdditional information
DAddress

设备地址。

string

Required

Max length: 12

MAddress

MODBUS地址,这个当前是没有用的

byte

None.

TypeId

型号的ID

string

Required

Max length: 4

Reserve1

保留一

string

Max length: 50

Reserve2

保留二

string

Max length: 50

Request Formats

application/json, text/json

Sample:
{
  "DAddress": "sample string 1",
  "MAddress": 64,
  "TypeId": "sample string 3",
  "Reserve1": "sample string 4",
  "Reserve2": "sample string 5"
}

application/xml, text/xml

Sample:
<Dev_Controller_RegistParm xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DigitalScience.DataTransfer.CleverFarmer.Parm">
  <DAddress>sample string 1</DAddress>
  <MAddress>64</MAddress>
  <Reserve1>sample string 4</Reserve1>
  <Reserve2>sample string 5</Reserve2>
  <TypeId>sample string 3</TypeId>
</Dev_Controller_RegistParm>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'Dev_Controller_RegistParm'.

application/bson

Sample:
Binary JSON content. See http://bsonspec.org for details.

Response Information

Resource Description

注册一个新的大棚控制器,手动注册或疑似大棚控制器的注册,均是调用这个API。 这个API对应的存储过程为Sp_Dev_Ctrl_Regist。

CommonOperationResultWithTagOfInt64
NameDescriptionTypeAdditional information
errcode

integer

None.

errmsg

string

None.

tag

integer

None.

Response Formats

application/json, text/json

Sample:
{
  "errcode": 1,
  "errmsg": "sample string 2",
  "tag": 3
}

application/xml, text/xml

Sample:
<CommonOperationResultWithTagOflong 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>3</tag>
</CommonOperationResultWithTagOflong>

application/bson

Sample:
Binary JSON content. See http://bsonspec.org for details.