saul
only.Expand description
This is a CoAP server application that exposes SAUL entries.
For discovery, this exposes all entries as rt=“tag:chrysn@fsfe.org,2020-10-02:saul”;saul=ACT_LED_RGB or similar.
For GETs, the supported formats are:
-
text/plain;encoding=utf-8 – renders through the phydat’s Display implementation, or uses the command-line listing on the index
-
application/cbor (individuals only) – renders CBOR equivalent to RIOT’s phydat_to_json output
The implementation of the CBOR serialization doubles as a playground for comparing individual embedded CBOR libraries (serde_cbor, minicbor, ciborium-ll); all are implemented, but all but minicbor are commented out in the renderer.
-
application/link-format (index only) – gives the index as produced by the
saul.rs
command line output
For actor PUTs, the supported formats are:
- text/plain;charset=utf-8 – only single integer values and no units are supported.
- application/cbor – like in GETs (but with limited units support). Numerics are accepted as integers or decimal fractions; unlike fractions are processed to the GCD.
- 65362 (experimental) – RGB hex color codes in ‘#rrggbb’ format as used with CSS (but without the named colors or alternative forms); those are fed in without units.
Structs§
- An extended phydat that almost behaves like phydat_to_json but with CBOR
- A handler for SAUL requests, using SAUL_MATCH_SUBTREE to manage its resources.