mirror of
https://github.com/BotChain-Robots/firmware.git
synced 2026-07-08 09:37:21 +02:00
link layer routing works
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
#define RIP_MAX_SEM_WAIT 30
|
||||
#define RIP_FLUSH_COUNT 8 //flush after 8*30 seconds = 240 seconds
|
||||
|
||||
#define RIP_DISCOVERY_MESSAGE_SIZE 1
|
||||
/**
|
||||
* @brief Routing data to a board
|
||||
* This struct will be sent to other boards
|
||||
@@ -28,9 +29,24 @@ typedef struct _rip_row{
|
||||
uint8_t channel; //rmt channel
|
||||
uint8_t ttl; //how long this entry is valid for. starting value is 180 seconds
|
||||
uint8_t valid; //is this a valid entry?
|
||||
uint8_t ttl_flush; //if hops is invalid, this would count the amount of time until this entry would be invalid (in multiples of 30 seconds)
|
||||
uint8_t ttl_flush; //if hops is invalid, this would count the amount of time until this entry would be invalid (max is in multiples of 30 seconds) but can vary
|
||||
StaticSemaphore_t mutex_buf; //where mutex state is stored
|
||||
SemaphoreHandle_t row_sem; //mutex sem handle of mutex_buf
|
||||
} RIPRow;
|
||||
|
||||
/**
|
||||
* @brief Public facing RIP table row
|
||||
*
|
||||
*/
|
||||
typedef struct _rip_public_row{
|
||||
RIPHop info;
|
||||
uint8_t channel; //rmt channel
|
||||
} RIPRow_public;
|
||||
|
||||
typedef struct _rip_public_matrix{
|
||||
RIPRow_public* table;
|
||||
size_t size;
|
||||
uint8_t board_id; //Board ID's routing table
|
||||
} RIPRow_public_matrix;
|
||||
|
||||
#endif //DATA_LINK
|
||||
|
||||
Reference in New Issue
Block a user