Templates and SCHC Rules#
In FullSDK, the concept of Templates refers to the implementation of SCHC Rules for physical devices.
A template is essentially a SCHC compression rule or set of rules that accomodate common values accross devices, while giving the flexibility to set device-specific values. These device-specific values are referred to as template parameters.
For example, the IPv6/UDP stack template defines common SCHC rule fields allowing a device to compress and decompress IPv6/UDP packets, but does not contain information about the IPv6 addresses and UDP ports of the device or the destination application.
It is up to the developer to specify template parameter values.
Dynamic template#
By building the embedded application with a dynamic template (build parameter
-DTEMPLATE_ID=dynamic
), the developer can set their own SCHC rule template,
through the Management extension
interface
A binary sequence for a FullSDK template is composed as follows:
- Size (2-bytes): The length of the template itself, in bytes (n-bytes).
- Template (n-bytes): The CBOR sequence representing the template contents.
- CRC (2-bytes): Result of a CRC-16/CCITT-FALSE check on the
size
+template
data content.