Fix RIP bugs, add in UART

This commit is contained in:
Johnathon Slightham
2026-03-31 14:26:37 -04:00
committed by Johnathon Slightham
parent d4602012f1
commit 548e8db484
26 changed files with 704 additions and 434 deletions

View File

@@ -7,7 +7,7 @@
#define RIP_INVALID_ROW 0
#define RIP_VALID_ROW 1
#define RIP_NEW_ROW 2
#define RIP_BROADCAST_INTERVAL 30000 //broadcast every 30 seconds (30000ms)
#define RIP_BROADCAST_INTERVAL 15000 //broadcast every 30 seconds (15000ms)
// #define RIP_BROADCAST_INTERVAL 3000 //temp broadcast every 3 seconds (3000ms)
#define RIP_TTL_START 180 //seconds
#define RIP_MS_TO_SEC 1000 //1000 ms to 1 sec
@@ -15,13 +15,15 @@
#define RIP_FLUSH_COUNT 8 //flush after 8*30 seconds = 240 seconds
#define RIP_DISCOVERY_MESSAGE_SIZE 1
#define RIP_WIRE_STRIDE 3 // bytes per entry on the wire: board_id, hops, sum_of_hops
/**
* @brief Routing data to a board
* This struct will be sent to other boards
*/
typedef struct _rip_hops{
uint8_t board_id; //ID of the destination
uint8_t hops; //hop count to `board_id`
uint8_t board_id; //ID of the destination
uint8_t hops; //hop count to `board_id`
uint8_t sum_of_hops; //sum of hops from `board_id` to all other known boards (centrality score)
} RIPHop;
typedef struct _rip_row{
@@ -36,7 +38,7 @@ typedef struct _rip_row{
/**
* @brief Public facing RIP table row
*
*
*/
typedef struct _rip_public_row{
RIPHop info;