Defines the SDK's transmission callbacks available for user implementation.
More...
#include <stddef.h>
Go to the source code of this file.
Defines the SDK's transmission callbacks available for user implementation.
◆ sternum_error_callback_t
typedef void(* sternum_error_callback_t) (int error_code, const char *error_message) |
Typedef for the error callback function. This function will be implemented by the user and registered with the SDK. It will be invoked when an error occurs during the transmission process.
- Parameters
-
error_code | STERNUM_CODE_FILE_CACHE_ACCESS_FAILURE 100 STERNUM_CODE_FILE_CACHE_RECOVERY_CLEAR 101 |
error_message | A null-terminated string containing a description of the error. |
- Note
- It is not allowed to call Sternum SDK API functions from this callback.
◆ sternum_packets_lost_callback_t
typedef void(* sternum_packets_lost_callback_t) (size_t packets_count, size_t bytes_count) |
Typedef for the packets lost callback function. This function will be implemented by the user and registered with the SDK.
Packets are considered lost when they fail to be stored in cache and thus not transmitted, or when the transmission is impossible permanently. Transmission failure itself is not considered packet lost because it will be retried until success.
- Parameters
-
packets_lost_count | The number of packets that were lost. |
bytes_count | The number of bytes that were lost. |
- Note
- It is not allowed to call Sternum SDK API functions from this callback.
◆ sternum_transmission_finished_callback_t
typedef void(* sternum_transmission_finished_callback_t) (size_t packets_count, size_t bytes_count) |
Typedef for the transmission finished callback function. This function will be implemented by the user and registered with the SDK. It will be invoked after the data transmission finishes.
- Parameters
-
packets_count | The number of packets that were successfully transmitted. |
bytes_count | The number of bytes that were successfully transmitted. |
- Note
- It is not allowed to call Sternum SDK API functions from this callback.
◆ sternum_transmission_started_callback_t
typedef void(* sternum_transmission_started_callback_t) (void) |
Typedef for the transmission started callback function. This function will be implemented by the user and registered with the SDK. It will be invoked before the data transmission starts.
- Note
- It is not allowed to call Sternum SDK API functions from this callback.