-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
Protocols as JSON Schema allow us to validate messages — not only their structure but also their content and limits.
example of a auto-generated jsonschema part:
....
"gain_setting": {
"description": "Analog gain setting (0 = low, 1 = normal, 2 = high)",
"type": "integer",
"format": "uint8",
"maximum": 255,
"minimum": 0
},
....
The maximum and minimum could be set directly to 2 and 0,
but the current definitions/ping360 doesn't contain the min/max fields,
which would allow us to automate protocol definitions like this.
Current definitions:
....
{
"name": "gain_setting",
"type": "u8",
"description": "Analog gain setting (0 = low, 1 = normal, 2 = high)"
},
....
Metadata
Metadata
Assignees
Labels
No labels