K-FSW v1.2.1-59-gcaca356
KFSW: modular flight software on Zephyr, for small satellites
Loading...
Searching...
No Matches
csp.h File Reference
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>

Data Structures

struct  kfsw_csp_info
 
struct  kfsw_csp_interface_info
 
struct  kfsw_csp_counters
 
struct  kfsw_csp_route_info
 
struct  kfsw_csp_interface_stats
 
struct  kfsw_csp_clock
 
struct  kfsw_csp_identity
 

Macros

#define KFSW_CSP_AUTHENTICATED_CONNECTION   0U
 
#define KFSW_CSP_AUTHENTICATED_SOCKET   0U
 
#define KFSW_CSP_HOST_BITS   14U
 
#define KFSW_CSP_BROADCAST_ADDRESS   ((1U << KFSW_CSP_HOST_BITS) - 1U)
 
#define KFSW_CSP_ROUTE_TABLE_MAX_LENGTH   99U
 
#define KFSW_CSP_SECURE_OVERHEAD   32U
 
#define KFSW_CSP_PAYLOAD_MAX   (CONFIG_CSP_BUFFER_SIZE - KFSW_CSP_SECURE_OVERHEAD)
 
#define KFSW_CSP_INTERFACE_NAME_SIZE   11U
 
#define KFSW_CSP_IDENTITY_HOSTNAME_SIZE   21U
 
#define KFSW_CSP_IDENTITY_MODEL_SIZE   31U
 
#define KFSW_CSP_IDENTITY_REVISION_SIZE   21U
 
#define KFSW_CSP_IDENTITY_DATE_SIZE   13U
 
#define KFSW_CSP_IDENTITY_TIME_SIZE   10U
 

Types

typedef bool(* kfsw_csp_interface_visitor_t) (const struct kfsw_csp_interface_info *interface_info, void *context)
 
typedef bool(* kfsw_csp_route_visitor_t) (const struct kfsw_csp_route_info *route_info, void *context)
 

Functions

void kfsw_csp_set_packet_trace (bool enabled)
 
bool kfsw_csp_get_packet_trace (void)
 
int kfsw_csp_set_rdp_trace (uint8_t level)
 
uint8_t kfsw_csp_get_rdp_trace (void)
 
void kfsw_csp_set_revision (const char *revision)
 
int kfsw_csp_init (void)
 
int kfsw_csp_start (void)
 
void kfsw_csp_get_info (struct kfsw_csp_info *info)
 
void kfsw_csp_visit_interfaces (kfsw_csp_interface_visitor_t visitor, void *context)
 
void kfsw_csp_visit_routes (kfsw_csp_route_visitor_t visitor, void *context)
 
int kfsw_csp_route_lookup (uint16_t address, struct kfsw_csp_route_info *info)
 
void kfsw_csp_get_counters (struct kfsw_csp_counters *counters)
 
void kfsw_csp_clear_counters (void)
 
const char * kfsw_csp_error_name (uint8_t code)
 
const char * kfsw_csp_can_error_name (uint8_t code)
 
int kfsw_csp_route_table_check (const char *route_table, size_t *entry_count)
 
int kfsw_csp_route_table_apply (const char *route_table)
 
int kfsw_csp_ping (uint16_t node, uint32_t timeout_ms, size_t payload_size, uint32_t *round_trip_us)
 
int kfsw_csp_interface_stats_read (uint16_t node, const char *name, uint32_t timeout_ms, struct kfsw_csp_interface_stats *stats)
 
void kfsw_csp_clock_get (struct kfsw_csp_clock *clock)
 
bool kfsw_csp_clock_is_set (const struct kfsw_csp_clock *clock)
 
int kfsw_csp_clock_set (const struct kfsw_csp_clock *clock)
 
int kfsw_csp_clock_read (uint16_t node, uint32_t timeout_ms, struct kfsw_csp_clock *clock)
 
int kfsw_csp_clock_write (uint16_t node, uint32_t timeout_ms, struct kfsw_csp_clock *clock)
 
int kfsw_csp_identify (uint16_t node, uint32_t timeout_ms, struct kfsw_csp_identity *identity)
 

Description

CSP setup, routes, interfaces and ping.