13#define CATS_ROUTE_PAST 0xFF
14#define CATS_ROUTE_FUTURE 0xFD
15#define CATS_ROUTE_INET 0xFE
17#define CATS_NODEINFO_HARDWARE_ID 1
18#define CATS_NODEINFO_SOFTWARE_ID 2
19#define CATS_NODEINFO_UPTIME 4
20#define CATS_NODEINFO_ANTENNA_HEIGHT 8
21#define CATS_NODEINFO_ANTENNA_GAIN 16
22#define CATS_NODEINFO_TX_POWER 32
23#define CATS_NODEINFO_VOLTAGE 64
24#define CATS_NODEINFO_TEMP 128
25#define CATS_NODEINFO_BATTERY 256
26#define CATS_NODEINFO_ALTITUDE 512
27#define CATS_NODEINFO_IS_BALLOON 1024
28#define CATS_NODEINFO_AMBIENT_TEMP 2048
29#define CATS_NODEINFO_AMBIENT_HUMIDITY 4096
30#define CATS_NODEINFO_AMBIENT_PRESSURE 8192
32#define CATS_MAX_WHISKER_LEN 255
33#define CATS_MAX_WHISKERS 255
35typedef enum cats_whisker_type {
36 WHISKER_TYPE_IDENTIFICATION,
37 WHISKER_TYPE_TIMESTAMP,
41 WHISKER_TYPE_DESTINATION,
42 WHISKER_TYPE_ARBITRARY,
44 WHISKER_TYPE_REPEATER,
47#define CATS_NUM_WHISKER_TYPES 10
49typedef enum cats_modulation {
111 uint8_t callsign[252];
128 uint8_t callsign[16];
133 uint8_t max_digipeats;
141 uint8_t callsign[253];
cats_route_whisker_t cats_route_new(uint8_t max_digipeats)
Create a new route whisker.
Definition route.c:161
cats_route_hop_t * cats_route_add_future_hop(cats_route_whisker_t *route, const char *callsign, uint8_t ssid)
Add a future hop to a route whisker.
Definition route.c:135
cats_whisker_t * cats_whisker_new()
Create a new whisker.
Definition whisker.c:115
cats_route_hop_t * cats_route_add_past_hop(cats_route_whisker_t *route, const char *callsign, uint8_t ssid, float rssi)
Add a past hop to a route whisker.
Definition route.c:140
int cats_whisker_decode(const uint8_t *data, cats_whisker_t *out)
Decode a whisker from a byte array.
Definition whisker.c:92
cats_route_hop_t * cats_route_add_inet_hop(cats_route_whisker_t *route)
Add an internet hop to a route whisker.
Definition route.c:145
void cats_route_destroy(cats_route_whisker_t *route)
Destroy a route whisker.
Definition route.c:150
int cats_whisker_base_len(const cats_whisker_type_t type)
Get the length of a whisker base type.
Definition whisker.c:130
size_t cats_whisker_encode(const cats_whisker_t *whisker, uint8_t *out)
Encode a whisker into a byte array.
Definition whisker.c:71