CSP Basic Types

File: csp/csp_types.h

Description: Basic types

CSP_ANY
[source]

Listen on all ports, primarily used with csp_bind()

CSP_FRES1
[source]

@defgroup CSP_HEADER_FLAGS CSP header flags. @{

CSP_HOSTNAME_LEN
[source]

Max length of host name - including zero termination

CSP_MODEL_LEN
[source]

Max length of model name - including zero termination

CSP_O_NONE
[source]

CSP Connect options

CSP_REBOOT_MAGIC
[source]

Magic number for reboot request, for service-code #CSP_REBOOT

CSP_REBOOT_SHUTDOWN_MAGIC
[source]

Magic number for shutdown request, for service-code #CSP_REBOOT

CSP_SO_NONE
[source]

@defgroup CSP_SOCKET_OPTIONS CSP Socket options. @{

CSP_STATIC_ASSERT(condition, name)
[source]

Compile check/asserts.

struct __packed
[source]

CSP identifier/header.

uint8_t dport
[source]
uint16_t dst
[source]
uint8_t flags
[source]
uint8_t pri
[source]
uint8_t sport
[source]
uint16_t src
[source]
typedef struct csp_conn_s csp_conn_t
[source]

Forward declaration of connection structure

typedef const void *csp_const_memptr_t
[source]

Const memory pointer

struct csp_id_t
[source]

CSP identifier/header.

uint8_t dport
[source]
uint16_t dst
[source]
uint8_t flags
[source]
uint8_t pri
[source]
uint8_t sport
[source]
uint16_t src
[source]
typedef struct csp_iface_s csp_iface_t
[source]

Forward declaration of CSP interface, see #csp_iface_s for details.

typedef csp_memptr_t (*csp_memcpy_fnc_t)(csp_memptr_t, csp_const_memptr_t, size_t)
[source]

Platform specific memory copy function.

typedef void *csp_memptr_t
[source]

Memory pointer

struct csp_packet_s
[source]

CSP Packet.

This structure is constructed to fit with all interface and protocols to prevent the need to copy data (zero copy).

Note

In most cases a CSP packet cannot be reused in case of send failure, because the lower layers may add additional data causing increased length (e.g. CRC32), convert the CSP id to different endian (e.g. I2C), etc.

uint8_t header[8]
[source]

Additional header bytes, to prepend packed data before transmission This must be minimum 6 bytes to accomodate CSP 2.0. But some implementations require much more scratch working area for encryption for example. Ultimately after csp_id_pack() this area will be filled with the CSP header

csp_id_t id
[source]
uint16_t length
[source]
struct csp_packet_s *next
[source]
struct csp_packet_t
[source]

CSP Packet.

This structure is constructed to fit with all interface and protocols to prevent the need to copy data (zero copy).

Note

In most cases a CSP packet cannot be reused in case of send failure, because the lower layers may add additional data causing increased length (e.g. CRC32), convert the CSP id to different endian (e.g. I2C), etc.

uint8_t header[8]
[source]

Additional header bytes, to prepend packed data before transmission This must be minimum 6 bytes to accomodate CSP 2.0. But some implementations require much more scratch working area for encryption for example. Ultimately after csp_id_pack() this area will be filled with the CSP header

csp_id_t id
[source]
uint16_t length
[source]
struct csp_packet_s *next
[source]
enum csp_prio_t
[source]

Message priority.

enumerator CSP_PRIO_CRITICAL
[source]

Critical

enumerator CSP_PRIO_HIGH
[source]

High

enumerator CSP_PRIO_LOW
[source]

Low

enumerator CSP_PRIO_NORM
[source]

Normal (default)

enum csp_service_port_t
[source]

Reserved ports for CSP services.

struct csp_socket_s
[source]

@brief Connection struct

uint32_t opts
[source]
csp_queue_handle_t rx_queue
[source]
csp_static_queue_t rx_queue_static
[source]
char rx_queue_static_data
[source]
typedef struct csp_socket_s csp_socket_t
[source]

Forward declaration of socket structure