Whisker handling.
More...
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
Go to the source code of this file.
|
#define | CATS_ROUTE_PAST 0xFF |
|
#define | CATS_ROUTE_FUTURE 0xFD |
|
#define | CATS_ROUTE_INET 0xFE |
|
#define | CATS_NODEINFO_HARDWARE_ID 1 |
|
#define | CATS_NODEINFO_SOFTWARE_ID 2 |
|
#define | CATS_NODEINFO_UPTIME 4 |
|
#define | CATS_NODEINFO_ANTENNA_HEIGHT 8 |
|
#define | CATS_NODEINFO_ANTENNA_GAIN 16 |
|
#define | CATS_NODEINFO_TX_POWER 32 |
|
#define | CATS_NODEINFO_VOLTAGE 64 |
|
#define | CATS_NODEINFO_TEMP 128 |
|
#define | CATS_NODEINFO_BATTERY 256 |
|
#define | CATS_NODEINFO_ALTITUDE 512 |
|
#define | CATS_NODEINFO_IS_BALLOON 1024 |
|
#define | CATS_NODEINFO_AMBIENT_TEMP 2048 |
|
#define | CATS_NODEINFO_AMBIENT_HUMIDITY 4096 |
|
#define | CATS_NODEINFO_AMBIENT_PRESSURE 8192 |
|
#define | CATS_MAX_WHISKER_LEN 255 |
|
#define | CATS_MAX_WHISKERS 255 |
|
#define | CATS_NUM_WHISKER_TYPES 10 |
|
|
enum | cats_whisker_type {
WHISKER_TYPE_IDENTIFICATION
, WHISKER_TYPE_TIMESTAMP
, WHISKER_TYPE_GPS
, WHISKER_TYPE_COMMENT
,
WHISKER_TYPE_ROUTE
, WHISKER_TYPE_DESTINATION
, WHISKER_TYPE_ARBITRARY
, WHISKER_TYPE_SIMPLEX
,
WHISKER_TYPE_REPEATER
, WHISKER_TYPE_NODEINFO
} |
|
enum | cats_modulation {
MOD_UNK
, MOD_CATS
, MOD_FM
, MOD_AM
,
MOD_USB
, MOD_LSB
, MOD_CW
, MOD_FREEDV
,
MOD_M17
, MOD_DSTAR
, MOD_DMR
, MOD_FUSION
,
MOD_P25
} |
|
◆ cats_route_add_future_hop()
Add a future hop to a route whisker.
- Parameters
-
route | The route whisker to add to |
callsign | The callsign of the hop |
ssid | The SSID of the hop |
- Returns
- A pointer to the new hop
◆ cats_route_add_inet_hop()
Add an internet hop to a route whisker.
- Parameters
-
route | The route whisker to add to |
- Returns
- A pointer to the new hop
◆ cats_route_add_past_hop()
Add a past hop to a route whisker.
- Parameters
-
route | The route whisker to add to |
callsign | The callsign of the hop |
ssid | The SSID of the hop |
rssi | The RSSI of the hop |
- Returns
- A pointer to the new hop
◆ cats_route_destroy()
Destroy a route whisker.
- Parameters
-
route | The route whisker to destroy |
- Note
- This function must be used rather than free()
◆ cats_route_new()
Create a new route whisker.
- Parameters
-
max_digipeats | The maximum number of digipeats |
- Returns
- The new route whisker
◆ cats_whisker_base_len()
int cats_whisker_base_len |
( |
const cats_whisker_type_t | type | ) |
|
Get the length of a whisker base type.
- Parameters
-
- Returns
- The length of the whisker base type
◆ cats_whisker_decode()
int cats_whisker_decode |
( |
const uint8_t * | data, |
|
|
cats_whisker_t * | out ) |
Decode a whisker from a byte array.
- Parameters
-
data | The byte array to decode |
out | The whisker to write to |
- Returns
- CATS_SUCCESS on success, CATS_FAIL on failure
◆ cats_whisker_encode()
size_t cats_whisker_encode |
( |
const cats_whisker_t * | whisker, |
|
|
uint8_t * | out ) |
Encode a whisker into a byte array.
- Parameters
-
whisker | The whisker to encode |
out | The byte array to write to |
- Returns
- The number of bytes written to out
◆ cats_whisker_new()
Create a new whisker.
- Returns
- A pointer to the new whisker