Data Structures | |
struct | BotaTransferRequest |
Structure defining the TRANSFER.request packet. More... | |
struct | BotaTransferConfirmation |
Structure defining the TRANSFER.confirmation packet. More... | |
struct | BotaBulkWriteRequest |
Structure defining the BULK_WRITE.request packet. More... | |
struct | BotaBulkMissingRequest |
Structure defining the BULK_MISSING.request packet. More... | |
struct | BotaBulkMissingConfirmation |
Structure defining the BULK_MISSING.confirmation packet. More... | |
struct | BotaValidateRequest |
Structure defining the VALIDATE.request packet. More... | |
struct | BotaValidateConfirmation |
Structure defining the VALIDATE.confirmation packet. More... | |
Macros | |
#define | BOTA_PACKED __attribute__((packed)) |
#define | BOTA_STATIC_ASSERT(...) static_assert(__VA_ARGS__) |
#define | BOTA_SENDER_MAX_TRANSFERS 2 |
Maximum number of simultaneous transfers that is supported. | |
#define | BOTA_SENDER_MAX_MISSING_CHUNKS 100 |
Maximum number of missing data chunks that can be tracked at once per transfer. | |
#define | BOTA_RECIPIENT_MAX_TRANSFERS 2 |
Maximum number of simultaneous transfers that is supported. | |
#define | BOTA_RECIPIENT_MAX_MISSING_CHUNKS 50 |
Maximum number of missing data chunks that can be tracked at once per transfer. | |
#define | BOTA_RECIPIENT_BULK_MISSING_REQUEST_SEND_INTERVAL_MS 45000 |
#define | BOTA_RECIPIENT_BULK_MISSING_REQUEST_SEND_RANDOMIZATION_MS 15000 |
#define | BOTA_RECIPIENT_BULK_MISSING_REQUEST_SEND_RETRIES 20 |
how many times BULK_MISSING.request will be send until transfer abort | |
#define | BOTA_RECIPIENT_TRANSFER_CONFIRMATION_SEND_RANDOMIZATION_MS 5000 |
TRANSFER.confirmation randomization. | |
#define | BOTA_RECIPIENT_VALIDATE_CONFIRMATION_SEND_RANDOMIZATION_MS 5000 |
VALIDATE.confirmation randomization. | |
#define | BOTA_RECIPIENT_TRANSFER_TIMEOUT_MS (24 * 3600 * 1000) |
inactivity timeout during transfer that leads to aborting the transfer | |
#define | BOTA_RECIPIENT_TRANSFER_OVERWRITE_TIMEOUT_MS (5 * 60 * 1000) |
inactivity timeout during transfer that makes it possible to overwrite the transfer with new one. | |
#define | BOTA_SENDER_DEFAULT_BULK_WRITE_SENDING_INTERVAL_MS 3000 |
Default BULK_WRITE.request sending delay (in ms), limits the overall data transfer. | |
#define | BOTA_SENDER_DEFAULT_TRANSFER_REQUEST_SENDING_DELAY_SEC 20 |
Default TRANSFER.request sending delay (in seconds) after last TRANSFER.confirmation was received. | |
#define | BOTA_SENDER_DEFAULT_TRANSFER_VALIDATE_REQUEST_PAUSE_SEC 60 |
Default value of how long to wait (in seconds) from last BULK_WRITE.request to the first VALIDATE.request. | |
#define | BOTA_SENDER_DEFAULT_TRANSFER_VALIDATE_REQUEST_SENDING_DELAY_SEC 20 |
Default VALIDATE.request sending delay (in seconds) after last VALIDATE.confirmation was received. | |
#define | BOTA_SENDER_DEFAULT_TRANSFER_REQUEST_RETRIES 3 |
Default setting of how many times TRANSFER.request will be sent. | |
#define | BOTA_SENDER_DEFAULT_TRANSFER_VALIDATE_REQUEST_RETRIES 3 |
Default setting of how many times VALIDATE.request will be sent. | |
#define | BOTA_TRANSFER_INVALID 0 |
Invalid transfer identifier. | |
#define | BOTA_MAX_TRANSFER_INFO_SIZE 32 |
Maximum size of the user data associated with the transfer. | |
#define | BOTA_CHUNK_SIZE 72 |
Size of a single data chunk sent in a single UDP packet. | |
#define | BOTA_MAX_OFFSETS_IN_BULK_MISSING_REQUEST 18 |
Maximum number of offsets in BULK_MISSING.request packet. | |
#define | BOTA_DEFAULT_PORT (0xf0b2) |
Default UDP port number for the BOTA service. | |
#define | BOTA_SENDER_ESTIMATED_TRANSFER_DURATION(bulkSize) |
Helper macro to estimate total transfer duration (in ms) | |
Typedefs | |
typedef uint16_t | BotaTransferId |
BOTA transfer identifier used to identify and distinguish the transfers. | |
typedef uint32_t | BotaMemoryAddr |
Address in the Bulk memory. | |
typedef void(* | BotaReadFunc) (BotaMemoryAddr addr, void *dst, size_t size, BotaTransferId transferId) |
typedef void(* | BotaWriteFunc) (BotaMemoryAddr addr, void const *src, size_t size, BotaTransferId transferId) |
typedef uint64_t(* | BotaTimeFunc) (void) |
Enumerations | |
enum | BotaResult { BOTA_RESULT_OK = 0 , BOTA_RESULT_INVALID_INPUT_ARGUMENT = 1 , BOTA_RESULT_FAILED_TO_REGISTER_UDP_SOCKET = 2 , BOTA_RESULT_FAILED_TO_REGISTER_NEW_TRANSFER = 3 } |
Possible BOTA function results. More... | |
enum | BotaTransferReaction { BOTA_TRANSFER_REACTION_ACCEPT , BOTA_TRANSFER_REACTION_REJECT , BOTA_TRANSFER_REACTION_MARK_AS_RECEIVED } |
Possible recipient reactions to a new BOTA transfer. More... | |
enum | BotaPacketType { BOTA_PACKET_TYPE_TRANSFER_REQUEST = 0xB0 , BOTA_PACKET_TYPE_TRANSFER_CONFIRMATION = 0xB1 , BOTA_PACKET_TYPE_BULK_WRITE_REQUEST = 0xB4 , BOTA_PACKET_TYPE_BULK_MISSING_REQUEST = 0xB8 , BOTA_PACKET_TYPE_BULK_MISSING_CONFIRMATION = 0xB9 , BOTA_PACKET_TYPE_VALIDATE_REQUEST = 0xBC , BOTA_PACKET_TYPE_VALIDATE_CONFIRMATION = 0xBD } |
Possible BOTA packet types. More... | |
#define BOTA_PACKED __attribute__((packed)) |
#define BOTA_STATIC_ASSERT | ( | ... | ) | static_assert(__VA_ARGS__) |
#define BOTA_SENDER_MAX_TRANSFERS 2 |
Maximum number of simultaneous transfers that is supported.
#define BOTA_SENDER_MAX_MISSING_CHUNKS 100 |
Maximum number of missing data chunks that can be tracked at once per transfer.
#define BOTA_RECIPIENT_MAX_TRANSFERS 2 |
Maximum number of simultaneous transfers that is supported.
#define BOTA_RECIPIENT_MAX_MISSING_CHUNKS 50 |
Maximum number of missing data chunks that can be tracked at once per transfer.
#define BOTA_RECIPIENT_BULK_MISSING_REQUEST_SEND_INTERVAL_MS 45000 |
#define BOTA_RECIPIENT_BULK_MISSING_REQUEST_SEND_RANDOMIZATION_MS 15000 |
#define BOTA_RECIPIENT_BULK_MISSING_REQUEST_SEND_RETRIES 20 |
how many times BULK_MISSING.request will be send until transfer abort
#define BOTA_RECIPIENT_TRANSFER_CONFIRMATION_SEND_RANDOMIZATION_MS 5000 |
TRANSFER.confirmation randomization.
#define BOTA_RECIPIENT_VALIDATE_CONFIRMATION_SEND_RANDOMIZATION_MS 5000 |
VALIDATE.confirmation randomization.
#define BOTA_RECIPIENT_TRANSFER_TIMEOUT_MS (24 * 3600 * 1000) |
inactivity timeout during transfer that leads to aborting the transfer
#define BOTA_RECIPIENT_TRANSFER_OVERWRITE_TIMEOUT_MS (5 * 60 * 1000) |
inactivity timeout during transfer that makes it possible to overwrite the transfer with new one.
#define BOTA_SENDER_DEFAULT_BULK_WRITE_SENDING_INTERVAL_MS 3000 |
Default BULK_WRITE.request sending delay (in ms), limits the overall data transfer.
#define BOTA_SENDER_DEFAULT_TRANSFER_REQUEST_SENDING_DELAY_SEC 20 |
Default TRANSFER.request sending delay (in seconds) after last TRANSFER.confirmation was received.
#define BOTA_SENDER_DEFAULT_TRANSFER_VALIDATE_REQUEST_PAUSE_SEC 60 |
Default value of how long to wait (in seconds) from last BULK_WRITE.request to the first VALIDATE.request.
#define BOTA_SENDER_DEFAULT_TRANSFER_VALIDATE_REQUEST_SENDING_DELAY_SEC 20 |
Default VALIDATE.request sending delay (in seconds) after last VALIDATE.confirmation was received.
#define BOTA_SENDER_DEFAULT_TRANSFER_REQUEST_RETRIES 3 |
Default setting of how many times TRANSFER.request will be sent.
#define BOTA_SENDER_DEFAULT_TRANSFER_VALIDATE_REQUEST_RETRIES 3 |
Default setting of how many times VALIDATE.request will be sent.
#define BOTA_TRANSFER_INVALID 0 |
Invalid transfer identifier.
#define BOTA_MAX_TRANSFER_INFO_SIZE 32 |
Maximum size of the user data associated with the transfer.
#define BOTA_CHUNK_SIZE 72 |
Size of a single data chunk sent in a single UDP packet.
#define BOTA_MAX_OFFSETS_IN_BULK_MISSING_REQUEST 18 |
Maximum number of offsets in BULK_MISSING.request packet.
#define BOTA_DEFAULT_PORT (0xf0b2) |
Default UDP port number for the BOTA service.
#define BOTA_SENDER_ESTIMATED_TRANSFER_DURATION | ( | bulkSize | ) |
Helper macro to estimate total transfer duration (in ms)
typedef uint16_t BotaTransferId |
BOTA transfer identifier used to identify and distinguish the transfers.
typedef uint32_t BotaMemoryAddr |
Address in the Bulk memory.
typedef void(* BotaReadFunc) (BotaMemoryAddr addr, void *dst, size_t size, BotaTransferId transferId) |
Function that reads the destination memory for the BOTA service (callback).
[in] | addr | address from which to read |
[in] | dst | place to store the read data |
[in] | size | size of the data to read (in number of bytes) |
[in] | transferId | id of the transfer that requests the data |
typedef void(* BotaWriteFunc) (BotaMemoryAddr addr, void const *src, size_t size, BotaTransferId transferId) |
Function that writes the destination memory for the BOTA service (callback).
[in] | addr | address to which to write |
[in] | src | data to be written |
[in] | size | size of the data to write (in number of bytes) |
[in] | transferId | id of the transfer that provides the data |
typedef uint64_t(* BotaTimeFunc) (void) |
BOTA time provider callback function.
enum BotaResult |
Possible BOTA function results.
enum BotaTransferReaction |
enum BotaPacketType |
Possible BOTA packet types.
Any question or remarks? Just write us a message!
Feel free to get in touch