Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Impossible to keep snml as response format. Using smaller json representation. Real world, real rules.

...

Parameters (link list)

 

GET /d

...

 
 
 
 
GET
DescriptionExampleAnswerPossible Answers
Sensor Board Interface Version</d/itf_ver>;rt="simple.dev.itfv";if="core.rp"GET /d/iter_ver{"e": [ {  "n": "version", "sv": "123" } ] }Sensor Board Identification</d/brd_id>;rt="simple.dev.brdid";if="core.rp"GET /d/brd_id{"e":
        [
           { "n": "model", "sv": "model_name" },
           { "n": "manufacturer", "sv": "manufacturer_name" },
           { "n": "id", "sv": Identification (summary)
GET /d
{ "itfv": "123", "model":"model_name", "id": "sensor_board_ID", "npts":10 }
Interface Version
GET /d/itfv
{ "itfv": "123" }
Model Name
GET /d/model
{ "model": "model_name" }
Manufacturer Name
GET /d/manuf
{ "manuf": "manufacturer name" }
Sensor Board ID
GET /d/id
{ "id": "sensor_board_ID"
},
           { "n":
 }
Hardware Revision
GET /d/hw_rev
{ "hw_rev
",
"
sv"
: "hardware_revision"
},
           { "n": "has_display", "bv": true/false },
           { "n": "has_battery", "bv": true/false },
           { "n": "num_points", "v":10 }
    ]
}
Sensor Board Status</d/brd_status>;rt="simple.dev.brdst";if="core.rp"
 }
Display Capability
GET /d/has_dsp
{ "has_dsp": "yes" }
Battery Capability
GET /d/has_bat
{ "has_bat": "no" }
Number of Points
GET /d/npts
{ "npts": 10 }
Sensor Board Status
GET /d/brd_status
{
"e": [ {  "n": "status", "sv": "status_result" } ] }
 "status": 1 }
Sensor board Command (send)<
PUT /d/
cmd>;rt="simple.dev.
cmd
";if="core.p"PUT /d
/
cmd?id=
cmd_id
 
{ "status": "status_result" }
Sensor board Command (answer)</d/cmd>;rt="simple.dev.cmd";if="core.p"
GET /d/cmd
{ "
e
result":
[ {  "n": "cmd", "sv":
 "cmd_result" }
] }
 
Battery Status</d/bat_status>;rt="simple.dev.batst";if="core.rp"
GET /d/bat_status
{
"e": [ {  "n": "status", "sv":
 "status": "Discharging"
} ]
 }
Battery Charge </d/bat_charge>;rt="simple.dev.batcg";if="core.rp"GET (0 to 100%)
GET /d/bat_charge
{
"e": [ {  "n": "charge", "v": 50 "u":"%EL" } ]
 "charge": "75" }
Wireless Status</d/wl_status>;rt="simple.dev.wlst";if="core.rp"GET
GET /d/wl_status
{
"e": [ {  "n": "status", "sv
 "status": "Connected" }
] }
Wireless Strength</d/wl_strength>;rt="simple.dev.wlstg";if="core.rp"GET
GET /d/wl_strength
{
"e": [ {  "n": "strength", "v": 50 "u":"%EL" } ] }
Display</d/dsp>;rt="simple.dev.dsp";if="core.p"PUT /d/dsp?l1=line1&l2=line2 
 "strength": "-10dBm" }
Display
PUT /d/dsp/line1
PUT /d/dsp/line1/line2
{ "result": 1 }

 

Sensors parameters (batch)

...

GET /s

DescriptionResourceExamplesAnswer
Get list of sensors all sensor values 
GET /s
{"e":
       
[

           { "n":
 { "sensor1"
, "v"
:
  val1, "u": "unity1" },
           { "n": "sensor2", "v":  val2, "u": "unity2" },
           { "n": "sensor3", "v":  val3, "u": "unity3" },
           { "n": "sensor4", "v":  val4, "u": "unity4" }
     ]
}
 val1 }, { "sensor2": val2 }, { "sensor3": val3 } ]
Get sensor1
GET /s/sensor1
{ "
e
val":
[ {  "n": "sensor1", "v": val1 "u":"unit1" } ]
 val1 }
Put sensor1 sensor1
PUT /s/sensor1
?v=
/val1
 
{ "result": 0 }


References


...