Difference between revisions of "IoTGateway/CoAP-like"

From ESS-WIKI
Jump to: navigation, search
(IPSO for CoAP-like)
(CoAP-like Command)
Line 109: Line 109:
  
 
=CoAP-like Command=
 
=CoAP-like Command=
 +
 +
{| class="wikitable"
 +
|-
 +
! Group !! Description
 +
|-
 +
| /dev/info|| Information of Sensor Hub
 +
|-
 +
| /net/info|| Information of Net Communication
 +
|-
 +
| /net/status|| Status of Network
 +
|-
 +
| /sen/info || Information of Sensor
 +
|-
 +
| /sen/status || Status of Sensors
 +
|}
 +
 +
 +
 +
 +
 +
 
 +
 +
 +
{| style="border-spacing:0;width:17cm;"
 +
|-
 +
| style="background-color:#dddddd;border:1pt solid #000000;padding:0.049cm;" | Key
 +
| style="background-color:#dddddd;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:none;border-right:1pt solid #000000;padding-top:0.049cm;padding-bottom:0.049cm;padding-left:0cm;padding-right:0.049cm;" | Value
 +
| style="background-color:#dddddd;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:none;border-right:1pt solid #000000;padding-top:0.049cm;padding-bottom:0.049cm;padding-left:0cm;padding-right:0.049cm;" | Description
 +
| style="background-color:#dddddd;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:none;border-right:1pt solid #000000;padding-top:0.049cm;padding-bottom:0.049cm;padding-left:0cm;padding-right:0.049cm;" | Group
 +
|-
 +
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding-top:0cm;padding-bottom:0.049cm;padding-left:0.049cm;padding-right:0.049cm;" | action=
 +
| style="border-top:none;border-bottom:1pt solid #000000;border-left:none;border-right:1pt solid #000000;padding-top:0cm;padding-bottom:0.049cm;padding-left:0cm;padding-right:0.049cm;" | list
 +
| style="border-top:none;border-bottom:1pt solid #000000;border-left:none;border-right:1pt solid #000000;padding-top:0cm;padding-bottom:0.049cm;padding-left:0cm;padding-right:0.049cm;" | List detail information
 +
| style="border-top:none;border-bottom:1pt solid #000000;border-left:none;border-right:1pt solid #000000;padding-top:0cm;padding-bottom:0.049cm;padding-left:0cm;padding-right:0.049cm;" | /sen/info, /dev/info, /net/info
 +
|-
 +
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding-top:0cm;padding-bottom:0.049cm;padding-left:0.049cm;padding-right:0.049cm;" | action=
 +
| style="border-top:none;border-bottom:1pt solid #000000;border-left:none;border-right:1pt solid #000000;padding-top:0cm;padding-bottom:0.049cm;padding-left:0cm;padding-right:0.049cm;" | observe
 +
| style="border-top:none;border-bottom:1pt solid #000000;border-left:none;border-right:1pt solid #000000;padding-top:0cm;padding-bottom:0.049cm;padding-left:0cm;padding-right:0.049cm;" | Observe status
 +
| style="border-top:none;border-bottom:1pt solid #000000;border-left:none;border-right:1pt solid #000000;padding-top:0cm;padding-bottom:0.049cm;padding-left:0cm;padding-right:0.049cm;" | /sen/status, /net/status
 +
|-
 +
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding-top:0cm;padding-bottom:0.049cm;padding-left:0.049cm;padding-right:0.049cm;" | action=
 +
| style="border-top:none;border-bottom:1pt solid #000000;border-left:none;border-right:1pt solid #000000;padding-top:0cm;padding-bottom:0.049cm;padding-left:0cm;padding-right:0.049cm;" | cancel
 +
| style="border-top:none;border-bottom:1pt solid #000000;border-left:none;border-right:1pt solid #000000;padding-top:0cm;padding-bottom:0.049cm;padding-left:0cm;padding-right:0.049cm;" | Cancel observe
 +
| style="border-top:none;border-bottom:1pt solid #000000;border-left:none;border-right:1pt solid #000000;padding-top:0cm;padding-bottom:0.049cm;padding-left:0cm;padding-right:0.049cm;" | /sen/status, /net/status
 +
|-
 +
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding-top:0cm;padding-bottom:0.049cm;padding-left:0.049cm;padding-right:0.049cm;" | field=
 +
| style="border-top:none;border-bottom:1pt solid #000000;border-left:none;border-right:1pt solid #000000;padding-top:0cm;padding-bottom:0.049cm;padding-left:0cm;padding-right:0.049cm;" | id
 +
| style="border-top:none;border-bottom:1pt solid #000000;border-left:none;border-right:1pt solid #000000;padding-top:0cm;padding-bottom:0.049cm;padding-left:0cm;padding-right:0.049cm;" | List all sensor id
 +
| style="border-top:none;border-bottom:1pt solid #000000;border-left:none;border-right:1pt solid #000000;padding-top:0cm;padding-bottom:0.049cm;padding-left:0cm;padding-right:0.049cm;" | /sen/info
 +
|-
 +
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding-top:0cm;padding-bottom:0.049cm;padding-left:0.049cm;padding-right:0.049cm;" | field=
 +
| style="border-top:none;border-bottom:1pt solid #000000;border-left:none;border-right:1pt solid #000000;padding-top:0cm;padding-bottom:0.049cm;padding-left:0cm;padding-right:0.049cm;" | All
 +
| style="border-top:none;border-bottom:1pt solid #000000;border-left:none;border-right:1pt solid #000000;padding-top:0cm;padding-bottom:0.049cm;padding-left:0cm;padding-right:0.049cm;" | Get all sensor’s data
 +
| style="border-top:none;border-bottom:1pt solid #000000;border-left:none;border-right:1pt solid #000000;padding-top:0cm;padding-bottom:0.049cm;padding-left:0cm;padding-right:0.049cm;" | /sen/info, /sen/status
 +
|-
 +
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding-top:0cm;padding-bottom:0.049cm;padding-left:0.049cm;padding-right:0.049cm;" | field=
 +
| style="border-top:none;border-bottom:1pt solid #000000;border-left:none;border-right:1pt solid #000000;padding-top:0cm;padding-bottom:0.049cm;padding-left:0cm;padding-right:0.049cm;" | 0,1,2…
 +
| style="border-top:none;border-bottom:1pt solid #000000;border-left:none;border-right:1pt solid #000000;padding-top:0cm;padding-bottom:0.049cm;padding-left:0cm;padding-right:0.049cm;" | Get one of sensor data
 +
| style="border-top:none;border-bottom:1pt solid #000000;border-left:none;border-right:1pt solid #000000;padding-top:0cm;padding-bottom:0.049cm;padding-left:0cm;padding-right:0.049cm;" | /sen/info, /sen/status
 +
|-
 +
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding-top:0cm;padding-bottom:0.049cm;padding-left:0.049cm;padding-right:0.049cm;" | field=
 +
| style="border-top:none;border-bottom:1pt solid #000000;border-left:none;border-right:1pt solid #000000;padding-top:0cm;padding-bottom:0.049cm;padding-left:0cm;padding-right:0.049cm;" | health
 +
| style="border-top:none;border-bottom:1pt solid #000000;border-left:none;border-right:1pt solid #000000;padding-top:0cm;padding-bottom:0.049cm;padding-left:0cm;padding-right:0.049cm;" | Network health status
 +
| style="border-top:none;border-bottom:1pt solid #000000;border-left:none;border-right:1pt solid #000000;padding-top:0cm;padding-bottom:0.049cm;padding-left:0cm;padding-right:0.049cm;" | /net/status
 +
|-
 +
|}

Revision as of 05:39, 8 March 2016

Advantech CoAP-like Packet Structure


CoAP-like Packet Format
CoAP-like-PacketFormat.jpg

CoAP-like Header
CoAP-like-Header.jpg

Name Size ( bits )
Ver 2
Type (T) 2
TKL: Token Length 4
Code 8
Message ID 16
Length 32

Type (T) : 2-bit unsigned integer Transaction Type field. Indicates if this message is

  • Confirmable (0): Some messages require an acknowledgment
  • Non-Confirmable (1): Some other messages do not require an acknowledgment
  • Acknowledgment (2): An Acknowledgment message acknowledges that a specific Confirmable message (identified by its Transaction ID) arrived
  • Reset (3): A Reset message indicates that a specific Confirmable message was received, but some context is missing to properly process it. This condition is usually caused when
the receiving node has rebooted and has forgotten some state that would be required to interpret the message

Code : : 8-bit unsigned integer
Request

  • GET(0.01): 1
  • PUT(0.03): 3

Response

  • Change(2.04): 68
  • Content(2.05): 69
  • Bad Request(4.00): 128
  • Unauthorized(4.01): 129
  • Not Found(4.04): 132
  • Method Not Allowed(4.05): 133
  • Not Implemented(5.01): 161


IPSO for CoAP-like

IPSO RESTful API Rule: /{Object ID}/{Object Instance}/{Resource ID}/


IPSO Smart Object ID

Sensor Object ID
Temperature 3303
Humidity 3304
Magnetic 3314
Accelerometer 3313
Light Sensor 3301
Digital Output 3201
Digital Input 3200
CO2 9001
CO 9002
Ultrasonic 9200


IPSO Smart Resource ID

Resource Object ID
DI Status 5500
DO Status 5550
Min Range Value 5603
Max Range Value 5604
Sensor Value 5700
Sensor Units 5701
X Value 5702
Y Value 5703
Z Value 5704
Compass Direction 5705

CoAP-like Command

Group Description
/dev/info Information of Sensor Hub
/net/info Information of Net Communication
/net/status Status of Network
/sen/info Information of Sensor
/sen/status Status of Sensors



 


Key Value Description Group
action= list List detail information /sen/info, /dev/info, /net/info
action= observe Observe status /sen/status, /net/status
action= cancel Cancel observe /sen/status, /net/status
field= id List all sensor id /sen/info
field= All Get all sensor’s data /sen/info, /sen/status
field= 0,1,2… Get one of sensor data /sen/info, /sen/status
field= health Network health status /net/status