XRT-4009: update put/get commands on device service examples - #334
BenthicWolf wants to merge 2 commits into
Conversation
| '{ | ||
| "metrics": | ||
| [ | ||
| { "name": "Random", "is_null": true }, |
There was a problem hiding this comment.
"Counter" missing when comparing to the old get_multi_request
| }' | ||
| "metrics": | ||
| [ | ||
| { "name": "change_friendly_name", "value": {"from": "0x7cb03eaa00a9b799", "to": "LED_new_friendly_name"}, "datatype": 19 } |
There was a problem hiding this comment.
Just want to check, how did you get datatype: 19 here?
There was a problem hiding this comment.
We're writing to coordinator_device, which uses coordinator_profile, which has resource "change_friendly_name" of type object.
In data.h the enum iot_data_type_t has IOT_DATA_MULTI as 19 and is used for "Multiple data types, used for array, map, vector and list contained type"
The sparkplug spec defines:
Text = 14;
// Additional Metric Types
UUID = 15;
DataSet = 16;
Bytes = 17;
File = 18;
Template = 19
Can't find anything definitive but it seemed the most likely
| "id": "0x000d6ffffe400162", "cluster": "msIlluminanceMeasurement", "attribute": "measuredValue", | ||
| "minimum_report_interval":8,"maximum_report_interval":"8","reportable_change":1 | ||
| }, | ||
| "datatype": 19 } |
There was a problem hiding this comment.
Here too.
Also, maybe it's just the differ but would be good to clean up the formatting on this file.
| "brightness": 254, | ||
| "transition": 1, | ||
| "state": true, | ||
| "color_hs": {"hue": 100, "saturation": 100} No newline at end of file |
| "metrics": | ||
| [ | ||
| { "name": "brightness", "value": 254, "datatype": 9 } | ||
| { "name": "transition", "value": 1, "datatype": 9 } |
There was a problem hiding this comment.
brightness and transition are float64 in the profile, so their datatypes should be 10
| '{ | ||
| "metrics": | ||
| [ | ||
| { "name": "brightness", "value": 150, "datatype": 9 } |
No description provided.