Skip to main content
Version: 5.0

Management Interface Functions

The header file for the Management interface is fullsdkmgt.h.

The management interface has two roles:

  • Configure the Acklio FullSDK stack.
  • Provide the stack with resources required at execution time: processing time, memory and timers.
Priority

The management interface functions must be used to configure the stack before any functions of any interface are called.

See

The SCHC Management interface section for information on error messages.

Initialization​

The first function that must be called is mgt_initialize().

This function must be provided with:

  • A list of callbacks
  • A pointer to a memory block
  • The maximum MTU size
  • The maximum payload size

List of Callbacks​

Each callback will be called for a specific event.

CallbackEvent
mgt_processing_requiredInforms the application that one of the layers in the Acklio FullSDK stack has to perform some processing.
The application must call the mgt_process() function as soon as possible but not from within the callback.
mgt_connectivity_stateInforms the application about any modification of the connectivity state.
The application should not try to send a message until connectivity is available.
mgt_start_timerInforms the application that a timer should be started.
Timer period and ID are specified by the callback parameters. When the timer period expires, the mgt_timer_timeout() function must be called with the same ID used for the start timer.
mgt_stop_timerInforms the application that a timer must be stopped.
Timer ID is specified by the callback parameter.
mgt_sync_bootstrap_result (optional)Informs the application about the result of the synchronization with the SCHC gateway.
This callback is triggered when a response is received following a call to mgt_sync_boostrap(). Note that synchronization is an extended feature of Acklio FullSDK.
This callback can be omitted (i.e. set to NULL) when sync is not used or when the SCHC gateway does not support it.

Pointer​

The initialization function must be provided with a pointer to a memory block allocated for the stack and the size of the memory block.

The application that integrates Acklio FullSDK stack has to allocate some memory (based on a formula, see below) from the volatile memory of the execution environment, and then provide it to the stack.

The formula is the following:

(4 * (max_mtu_size + max_app_payload_len + max_proto_size))

where:

  • max_mtu_size is the maximum MTU size of the L2 technology used;
  • max_app_payload_len is the maximum payload length that the application expects to send and receive;
  • max_proto_size is predefined as MGT_PROTO_SIZE in fullsdkmgt.h.

Maximum Sizes​

Finally, the initialization function must be completed with:

  • The maximum MTU size of the L2 technology used;
  • The maximum payload size that the application expects to send and receive.

Synchronization Bootstrap​

This function is used to synchronize the SDK with the SCHC gateway. It is optional.

mgt_sync_bootstrap() must be provided with the following parameters:

ParameterDescription
retransmission_delayThe delay (in ms) between each request retransmission.
max_retransThe maximum number of request retransmission before considering that the synchronization has failed.

See Layers and interfaces for a diagram with all the layers.

Processing​

This refers to the paradigm above.

Every time a layer of Acklio FullSDK stack needs to perform a processing as the result of some event, the mgt_processing_required callback is called.

It is then up to the application to call the mgt_process() function as soon as possible. but not from within the callback.

Callback Usage​

A general rule is that the mgt_processing_required callback must not call the mgt_process() function.

Actually, a callback called by the Acklio FullSDK stack must not call any Acklio FullSDK function.

Polling​

While using L2 technology having quasi-bidirectional links, which is the case with LoRaWAN in class A, polling packets must be send in order to trigger downlink packet reception.

Two functions are dedicated for that purpose:

  • mgt_enable_polling() function must be called once after mgt_initialize() to activate implicit polling mechanism inside the Acklio FullSDK stack. The aim being to retrieve the downlink packets, in particular when they are fragmented.
  • mgt_trigger_polling() function must be called every time the application want to trigger explicitly a polling frame. The aim being to generate a downlink possibility (fport: 0 with no payload for LoRaWAN, etc.).

These functions have no use for Class C and the Class B is not supported.

Version​

The mgt_get_version() function returns the version of the FullSDK library as a null-terminated string.

Quality of Service​

This function is available only with fragmentation, with the direction set to "uplink".

The mgt_set_qos() function sets the current class of service, that defines:

  • Which fragmentation profile is used
  • If the fragmentation has to be overridden

The supported QoS values are:

  • QOS_NO_RELIABILTY
  • QOS_NETWORK_RELIABILITY
  • QOS_SYSTEMATIC_REPORT

It returns the status of the service:MGT_SUCCESS if the service is as expected, else MGT_ERROR.