Extension of the Management Interface
The header file for the extension of the Management interface is fullsdkextapi.h
.
First call mgt_initialize
before using any function of the extension API.
- Rules in the SCHC by Acklio page.
- Template Commmands in the SCHC Management interface section for information on error messages.
Provision Rules​
The extension API provision SCHC compression rules in a binary format.
Header Rules​
This function should be called only when the FullSDK library is supporting dynamic rule loading.
The library can be compiled without this feature being present. In this case, the function returns an error code indicating that the function is not implemented.
This functionnality is available in the Demo examples.
The mgt_provision_header_rules()
function provisions the header rules.
The compression rule (rules.bin
in the CBOR package) can be downloaded from the SCHC Template on Acklio IPCore.
The function must be provided with the following parameters:
Parameter | Description |
---|---|
bin_rules | SCHC rules in a binary format. |
bin_rules_len | The length of bin_rules , in bytes. |
memory | A memory area that can be used by the parser. |
memory_len | The length of the memory area. |
Payload Rules​
This function must be called after mgt_provision_header_rules
.
This function should be called only when the FullSDK library is supporting dynamic payload patterns loading.
The mgt_status_t mgt_provision_payload_rules()
function provisions payload pattern rules in a binary format.
The payload compression rule (payload_pattern.bin
in the CBOR package) can be downloaded from the SCHC Template on Acklio IPCore when it is present (this rule being optional).
The function must be provided with the following parameters:
Parameter | Description |
---|---|
bin_rules | Payload pattern rules in a binary format. |
bin_rules_len | The length of bin_rules , in bytes. |
memory | A memory area that can be used by the parser. |
memory_len | The length of the memory area. |
Templates​
Get the Template ID​
The mgt_status_t mgt_get_template_id()
function returns the template ID of the current template and the operation status MGT_SUCCESS
.
Possible error statuses are the following:
MGT_NOT_INIT_ERR
that means that the SDK is not yet initialized.MGT_TPL_NOT_INIT_ERR
that means that the template is not yet initialized.
Set Template Parameters​
The mgt_status_t mgt_set_template_param()
function sets the parameter to the corresponding index in the template.
The function must be provided with the following parameters:
Parameter | Description |
---|---|
index | 0-based index corresponding to the template parameters to set. Check the documentation provided in the rules_usage.txt file from the CBOR package that you download when creating a template in Acklio IPCore. |
value | The value to associate to the index. |
size | The size of the given value in bytes. |
Get Template Parameters​
The mgt_status_t mgt_get_template_param()
function gets the parameter to the corresponding index in the template.
The function must be provided with the following parameters:
Parameter | Description |
---|---|
index | 0-based index corresponding to the template parameters to retrieve. Check the documentation given along the rules binary file for more information. |
value | The value to associate to the index. |
size | The size of the given value in bytes. |
Configurable Parameters​
The mgt_get_nb_template_params()
functions returns the number of configurable parameters.
Reset Template Parameters​
The mgt_reset_template_params()
functions clears the template parameters in the memory. This function is typically called when the mgt_set_template_param
returns a MGT_MEM_ERR
error.
The user will need to set all the template parameters again after. If calling this function is not enough, it means that the provided memory_ptr
to mgt_provision_header_rules
is too small (see above).
This function might not be implemented.
Network Configuration​
The mgt_get_network_protocol()
function returns the network protocol. It must be provided with a type
parameter.
The mgt_get_ipv6_address()
function returns the IPv6 address set for the datagram layer. It must be provided with the following parameters:
Parameter | Description |
---|---|
addr | The address of a buffer where the 16-byte IPv6 address will be written. |
size | The size of addr buffer in bytes. |