-
-
Notifications
You must be signed in to change notification settings - Fork 208
Open
Milestone
Description
We store the transfer-ID counter per remote sender:
Lines 658 to 667 in 4d46208
typedef struct CanardInternalRxSession | |
{ | |
CanardMicrosecond transfer_timestamp_usec; ///< Timestamp of the last received start-of-transfer. | |
size_t total_payload_size; ///< The payload size before the implicit truncation, including the CRC. | |
struct CanardMutablePayload payload; ///< Dynamically allocated and handed off to the application when done. | |
TransferCRC calculated_crc; ///< Updated with the received payload in real time. | |
CanardTransferID transfer_id; | |
uint8_t redundant_iface_index; ///< Arbitrary value in [0, 255]. | |
bool toggle; | |
} CanardInternalRxSession; |
We can easily extend it to 64 bits and thus eliminate the differences in transfer deduplication between cyclic- and monotonic transfer-ID transfers.
The transfer-ID timeout then could default to ~2 seconds and the corresponding parameter could be removed from the API. The user could still change it if necessary directly in the subscription struct, but this is only for arcane use cases. In the worst case, if the remote node restarts and loses the transfer-ID state, prior to the expiration of the transfer-ID timeout we could lose up to 16 transfers.
Metadata
Metadata
Assignees
Labels
No labels