#include "pal_log.h"
#include <stdint.h>
#include <stdio.h>
#include <stdbool.h>
#include <stdatomic.h>
#include "esp_random.h"
#include "rom/crc.h"
Go to the source code of this file.
|
| enum | domain_t : uint8_t { DOMAIN_TM = 0x00
, DOMAIN_TC = 0x01
, DOMAIN_TEST = 0x02
} |
| |
| enum | tm_category_t : uint8_t { TM_SDATA = 0x00
, TM_BDATA = 0x01
, TM_EVENT = 0x02
} |
| |
| enum | tm_sdata_type_t : uint8_t { TM_SDATA_SENSORS = 0x00
, TM_SDATA_STATUS = 0x01
} |
| |
| enum | tm_bdata_type_t : uint8_t { TM_BDATA_IMAGE = 0x00
, TM_BDATA_VIDEO = 0x01
} |
| |
| enum | tm_event_type_t : uint8_t { TM_EVENT_LOG = 0x00
, TM_EVENT_ERROR = 0x01
, TM_EVENT_CRASH = 0x02
} |
| |
| enum | tc_category_t : uint8_t { TC_CTRL = 0x00
, TC_REQ = 0x01
} |
| |
| enum | tc_req_type_t : uint8_t {
TC_REQ_SENSORS = 0x00
, TC_REQ_STATUS = 0x01
, TC_REQ_IMAGE = 0x02
, TC_REQ_VIDEO = 0x03
,
TC_REQ_LOG = 0x04
, TC_REQ_ERROR = 0x05
, TC_REQ_CRASH = 0x06
} |
| |
| enum | tc_ctrl_type_t : uint8_t { TC_CTRL_REBOOT = 0x00
} |
| |
| enum | test_category_t : uint8_t { TEST_WIMG = 0x00
, TEST_FRM = 0x01
, TEST_MSG = 0x02
} |
| |
| enum | pkt_err_t {
PKT_OK = 0
, PKT_FAIL
, PKT_ERR_INVALID_ARG
, PKT_ERR_SYNC
,
PKT_ERR_CRC
} |
| |
|
| packet_t * | pkt_create (void) |
| |
| void | pkt_destroy (packet_t *restrict pkt) |
| |
| pkt_enc_pool_t * | enc_pool_create (void) |
| |
| void | enc_pool_destroy (pkt_enc_pool_t *restrict pool) |
| |
| pkt_dec_pool_t * | dec_pool_create (void) |
| |
| void | dec_pool_destroy (pkt_dec_pool_t *restrict pool) |
| |
| pkt_err_t | pkt_encode (packet_t *restrict pkt, pkt_enc_pool_t *restrict pool) |
| |
| pkt_err_t | pkt_decode (const packet_t *restrict pkt, pkt_dec_pool_t *restrict pool, int8_t *restrict relative_loc) |
| |
| pkt_err_t | dec_pool_get_pkt_from_relative_loc (const pkt_dec_pool_t *restrict pool, int8_t relative_loc, packet_t *restrict pkt) |
| |
| pkt_err_t | pkt_get_id (const packet_t *restrict pkt, uint16_t *id) |
| |
| pkt_err_t | header_sensor_config (header_t *restrict header) |
| |
| pkt_err_t | header_old_sensor_config (header_t *restrict header, uint16_t old_id) |
| |
| pkt_err_t | pkt_get_header (const packet_t *restrict pkt, header_t *header) |
| |
| pkt_err_t | pkt_set_header (packet_t *restrict pkt, const header_t *restrict header) |
| |
| pkt_err_t | pkt_get_payload (const packet_t *restrict pkt, uint8_t *payload, size_t len) |
| |
| pkt_err_t | pkt_set_payload (packet_t *restrict pkt, const uint8_t *restrict payload, size_t len) |
| |
| bool | pkt_is_chunked (const packet_t *restrict pkt) |
| |
| pkt_err_t | pkt_log (const packet_t *restrict pkt) |
| |
| pkt_err_t | pkt_test_random_set_sync8 (packet_t *restrict pkt, bool *failed) |
| |
| pkt_err_t | pkt_test_random_set_crc16 (packet_t *restrict pkt) |
| |
◆ category_t
◆ type_t
◆ header_t
◆ PACKET_BYTES
| #define PACKET_BYTES (111) |
◆ PAYLOAD_BYTES
| #define PAYLOAD_BYTES (48) |
◆ PKT_NO_LOCATION
| #define PKT_NO_LOCATION (-1) |
◆ packet_t
◆ pkt_dec_pool_t
◆ pkt_enc_pool_t
◆ domain_t
| Enumerator |
|---|
| DOMAIN_TM | Telemetry domain (CubeSat to Ground).
|
| DOMAIN_TC | Telecommand domain (Ground to CubeSat).
|
| DOMAIN_TEST | Test domain (Ground to CubeSat, for tests only).
|
◆ pkt_err_t
| Enumerator |
|---|
| PKT_OK | |
| PKT_FAIL | |
| PKT_ERR_INVALID_ARG | |
| PKT_ERR_SYNC | |
| PKT_ERR_CRC | |
◆ tc_category_t
◆ tc_ctrl_type_t
◆ tc_req_type_t
| Enumerator |
|---|
| TC_REQ_SENSORS | |
| TC_REQ_STATUS | |
| TC_REQ_IMAGE | |
| TC_REQ_VIDEO | |
| TC_REQ_LOG | |
| TC_REQ_ERROR | |
| TC_REQ_CRASH | |
◆ test_category_t
| Enumerator |
|---|
| TEST_WIMG | Write an image to OBC memory.
|
| TEST_FRM | Remove a file from OBC file system.
|
| TEST_MSG | Send a text message.
|
◆ tm_bdata_type_t
| Enumerator |
|---|
| TM_BDATA_IMAGE | |
| TM_BDATA_VIDEO | |
◆ tm_category_t
| Enumerator |
|---|
| TM_SDATA | |
| TM_BDATA | |
| TM_EVENT | |
◆ tm_event_type_t
| Enumerator |
|---|
| TM_EVENT_LOG | |
| TM_EVENT_ERROR | |
| TM_EVENT_CRASH | |
◆ tm_sdata_type_t
| Enumerator |
|---|
| TM_SDATA_SENSORS | |
| TM_SDATA_STATUS | |
◆ dec_pool_create()
◆ dec_pool_destroy()
◆ dec_pool_get_pkt_from_relative_loc()
◆ enc_pool_create()
◆ enc_pool_destroy()
◆ header_old_sensor_config()
◆ header_sensor_config()
◆ pkt_create()
◆ pkt_decode()
◆ pkt_destroy()
| void pkt_destroy |
( |
packet_t *restrict | pkt | ) |
|
◆ pkt_encode()
◆ pkt_get_header()
◆ pkt_get_id()
◆ pkt_get_payload()
| pkt_err_t pkt_get_payload |
( |
const packet_t *restrict | pkt, |
|
|
uint8_t * | payload, |
|
|
size_t | len ) |
◆ pkt_is_chunked()
| bool pkt_is_chunked |
( |
const packet_t *restrict | pkt | ) |
|
|
inline |
◆ pkt_log()
◆ pkt_set_header()
◆ pkt_set_payload()
| pkt_err_t pkt_set_payload |
( |
packet_t *restrict | pkt, |
|
|
const uint8_t *restrict | payload, |
|
|
size_t | len ) |
◆ pkt_test_random_set_crc16()
◆ pkt_test_random_set_sync8()