Professional Documents
Culture Documents
(/en/ict/) (/en/ict/)
1. Summary
The gateway manages online and offline messages of sensors
Function prototype:
INT RiverAddSensor(CHAR *PhyId, CHAR *Name, CHAR *Type, CHAR *Manufacturer, CHAR *SubsId, CHAR *Location, CHAR *Status);
Parameter Description
PhyId Mandatory CHAR * Sensor ID, used to identify a sensor. The sensor ID
must be unique and can be set to the MAC address of
the sensor.
Execution Results
Field Description
OK Success
FAILED Failure
For example, if the gateway needs to register a smart lamp with the physical address 58bOK-35f7-6e65 in the IoT system, the following
function, of which the PhyId and Type fields are mandatory parameters and others are optional, is invoked:
http://developer.huawei.com/en/ict/Products/IoT2/Gateway/SensorMgnt/SDK 1/3
10/17/2017 Sensor Management
When the gateway detects that the sensor is inactive, for example, because no sensor battery is installed, the gateway invokes the
RiverUpdateSensor (CHAR *PhyId, CHAR *Data) interface to inform the SDK that the sensor is offline. After the gateway is restarted or the
sensor becomes online, the gateway invokes the RiverUpdateSensor interface to inform the SDK that the sensor is online.
Function prototype:
Parameter Description
Execution Results
Field Description
OK Success
FAILED Failure
For example, when an added smart lamp is offline, the following function is invoked:
RiverRmvSensor ("58bOK-35f7-6e65");
Quick Links
RemoteLab (http://developer.huawei.com/en/ict/remotelab)
Marketplace (http://developer.huawei.com/en/ict/marketplace/home/)
Training (http://developer.huawei.com/en/ict/training)
Information For
Enterprises (http://e.huawei.com/en/)
Carriers (http://carrier.huawei.com/en/)
Consumers (http://consumer.huawei.com/en/)
Friendship Links
Others
GitHub (https://github.com/esdk)
Contact Us (mailto:esdk@huawei.com?subject=I want to feedback. &body=Please drop your comments below: (Come from the page of
:http://developer.huawei.com/en/ict/Products/IoT2/Gateway/SensorMgnt/SDK))
Privacy (http://developer.huawei.com/en/ict/site-static/privacy) |
Terms of Use (http://developer.huawei.com/en/ict/site-static/terms_of_use)
http://developer.huawei.com/en/ict/Products/IoT2/Gateway/SensorMgnt/SDK 2/3
10/17/2017 Sensor Management
http://developer.huawei.com/en/ict/Products/IoT2/Gateway/SensorMgnt/SDK 3/3