Difference between revisions of "IoTGW/SDK/SampleCodeUseCase"

From ESS-WIKI
Jump to: navigation, search
(Get all of IoTGW network interfaces' value)
 
(26 intermediate revisions by one other user not shown)
Line 1: Line 1:
=Get the IoTGW's capabilities (resources)=
+
=WSN API SDK Manager SOP=
  Call the SN_Manager_GetCapability to get capability of IoT gateway network interface in JSON format.
+
# Get IoTGW capabilities
Input "1" and Enter:
+
# Get each IoTGW's network interface's "SenHubList"
 +
# Get each SenHub's capability
 +
# Start auto report of each SenHub
 +
 
 +
=Get=
 +
==Get the IoTGW's capabilities (resources)==
 +
  '''Description''': First, you need to get the capability of IoTGW network interfaces.
 +
        '''How''': Call the SN_Manager_GetCapability to get capability of IoTGW network interface in JSON format.
 +
        '''Step''': Select "0" & Enter:
 
  [[File:Sample WSN SDK 1.jpg|1200x400px]]
 
  [[File:Sample WSN SDK 1.jpg|1200x400px]]
  
=Get all of IoTGW network interfaces' value=
+
==Get all of IoTGW network interfaces' value==
  Call the SN_Manager_GetData and pass "IoTGW" to pszInURI.
+
  '''Description:''' Get all latest data of IoTGW's network interfaces.
  Description: Get all latest data of IoTGW's network interfaces.
+
        '''How:''' Call the '''SN_Manager_GetData''' and pass "'''IoTGW'''" to pszInURI then return all latest IoTGW network interfaces' status in JSON.
  Select "1" and type "IoTGW" then Enter:
+
        '''Step:''' Select "'''1'''" and type "'''IoTGW'''" then Enter:
  [[File:Sample WSN SDK 2.jpg|600x1000px]]
+
[[File:Sample WSN SDK 2.jpg|800x1200px]]
 +
 
 +
==Get the Health status of the WSN network interface==
 +
'''Description:''' Only to get the "Health" status of dust link network interface (UID:00170d0000582cca)
 +
        '''How:''' Call the '''SN_Manager_GetData''' and pass "'''IoTGW/WSN/00170d0000582cca/Info/Health'''" to pszInURI. then return the "Health" status in JSON format.
 +
        '''Step:''' Select "'''1'''" and type "'''IoTGW/WSN/00170d0000582cca/Info/Health'''" then Enter:
 +
[[File:Sample WSN SDK 4.jpg|1200x250px]]
 +
 
 +
==Get which SenHubs are connecting to the IoTGW?==
 +
  '''Description:''' Get the "SenHubList" status of dust link network interface (MAC:00170d0000582cca)
 +
        '''How:''' Call the SN_Manager_GetData and pass "IoTGW/WSN/00170d0000582cca/Info/SenHubList" to pszInURI then return SenHub list in JSON format.
 +
        '''Step:''' Select "1" and type "IoTGW/WSN/00170d0000582cca/Info/SenHubList" then Enter:
 +
[[File:Sample WSN SDK 3.jpg|1200x250px]]
 +
 
 +
==Get all value of a SenHub (UID:00170d0000306265)==
 +
  '''Description:''' Get all values of a SenHub ( UID: 00170d0000306265)
 +
        '''How:''' Call the SN_Manager_GetData and pass "00170d0000306265/SenHub" to pszInURI then return result in JSON format.
 +
        '''Step:''' Select "1" and type "00170d0000306265/SenHub" then Enter:
 +
  [[File:Sample WSN SDK 5.jpg|600x1000px]]
 +
 
 +
==Get a sensor(Ultrasonic) value of SenHub( UID: 00170d0000306265)==
 +
'''Description:''' Get a sensor's(Ultrasonic) value of SenHub ( UID: 00170d0000306265)
 +
        '''How:''' Call the SN_Manager_GetData and pass "00170d0000306265/SenHub/SenData/Ultrasonic" to pszInURI then return result in JSON format.
 +
        '''Step:''' Select "1" and type "00170d0000306265/SenHub/SenData/Ultrasonic" then Enter:
 +
[[File:Sample WSN SDK 6.jpg|1200x250px]]
  
=Get the Health status of the WSN network interface=
+
=Set=
 +
==Set "AutoReport" to "1" then "SenHub" will start auto report sensor data==
 +
'''Description:''' Set "AutoReoprt" to "1" of the SenHub ( UID: 00170d0000306265)
 +
        '''How:''' Call the SN_Manager_SetData and pass "00170d0000306265/SenHub/Action/AutoReport" to pszInURI and "{"bv":1}" to pszValue.
 +
        '''Step:''' Select "2" and type "00170d0000306265/SenHub/Action/AutoReport" then Enter:
 +
[[File:Sample WSN SDK 7.jpg|1200x300px]]
  
=Get which SenHubs are connecting to the IoTGW?=
+
==Set "reset" to "1" then "SenHub" will reboot==
 +
'''Description:''' Set "reset" to "1" of SenHub ( UID: 00170d0000306265)
 +
        '''How:''' Call the SN_Manager_SetData and pass "00170d0000306265/SenHub/Info/reset" to pszInURI and "{"bv":1}" to pszValue.
 +
        '''Step:''' Select "2" and type "00170d0000306265/SenHub/Info/reset" then Enter:
 +
[[File:Sample WSN SDK 8.jpg|1200x300px]]

Latest revision as of 09:08, 25 February 2016

WSN API SDK Manager SOP

  1. Get IoTGW capabilities
  2. Get each IoTGW's network interface's "SenHubList"
  3. Get each SenHub's capability
  4. Start auto report of each SenHub

Get

Get the IoTGW's capabilities (resources)

Description: First, you need to get the capability of IoTGW network interfaces.
        How: Call the SN_Manager_GetCapability to get capability of IoTGW network interface in JSON format.
       Step: Select "0" & Enter:
Sample WSN SDK 1.jpg

Get all of IoTGW network interfaces' value

Description: Get all latest data of IoTGW's network interfaces.
        How: Call the SN_Manager_GetData and pass "IoTGW" to pszInURI then return all latest IoTGW network interfaces' status in JSON.
       Step: Select "1" and type "IoTGW" then Enter:
Sample WSN SDK 2.jpg

Get the Health status of the WSN network interface

Description: Only to get the "Health" status of dust link network interface (UID:00170d0000582cca)
        How: Call the SN_Manager_GetData and pass "IoTGW/WSN/00170d0000582cca/Info/Health" to pszInURI. then return the "Health" status in JSON format.
       Step: Select "1" and type "IoTGW/WSN/00170d0000582cca/Info/Health" then Enter:
Sample WSN SDK 4.jpg

Get which SenHubs are connecting to the IoTGW?

Description: Get the "SenHubList" status of dust link network interface (MAC:00170d0000582cca)
        How: Call the SN_Manager_GetData and pass "IoTGW/WSN/00170d0000582cca/Info/SenHubList" to pszInURI then return SenHub list in JSON format.
       Step: Select "1" and type "IoTGW/WSN/00170d0000582cca/Info/SenHubList" then Enter:
Sample WSN SDK 3.jpg

Get all value of a SenHub (UID:00170d0000306265)

Description: Get all values of a SenHub ( UID: 00170d0000306265)
        How: Call the SN_Manager_GetData and pass "00170d0000306265/SenHub" to pszInURI then return result in JSON format.
       Step: Select "1" and type "00170d0000306265/SenHub" then Enter:
Sample WSN SDK 5.jpg

Get a sensor(Ultrasonic) value of SenHub( UID: 00170d0000306265)

Description: Get a sensor's(Ultrasonic) value of SenHub ( UID: 00170d0000306265)
        How: Call the SN_Manager_GetData and pass "00170d0000306265/SenHub/SenData/Ultrasonic" to pszInURI then return result in JSON format.
       Step: Select "1" and type "00170d0000306265/SenHub/SenData/Ultrasonic" then Enter:
Sample WSN SDK 6.jpg

Set

Set "AutoReport" to "1" then "SenHub" will start auto report sensor data

Description: Set "AutoReoprt" to "1" of the SenHub ( UID: 00170d0000306265)
        How: Call the SN_Manager_SetData and pass "00170d0000306265/SenHub/Action/AutoReport" to pszInURI and "{"bv":1}" to pszValue.
       Step: Select "2" and type "00170d0000306265/SenHub/Action/AutoReport" then Enter:
Sample WSN SDK 7.jpg

Set "reset" to "1" then "SenHub" will reboot

Description: Set "reset" to "1" of SenHub ( UID: 00170d0000306265)
        How: Call the SN_Manager_SetData and pass "00170d0000306265/SenHub/Info/reset" to pszInURI and "{"bv":1}" to pszValue.
       Step: Select "2" and type "00170d0000306265/SenHub/Info/reset" then Enter:
Sample WSN SDK 8.jpg