SocketDriver
Functions | |
int | socket_init (csp_socket_handle_t *socket_iface, uint8_t mode, uint16_t port) |
Initializes and connects a unix socket, returns socket handle. More... | |
int | socket_close (csp_socket_handle_t *socket_driver) |
int | socket_status (const csp_socket_handle_t *socket_iface) |
Attempts to check open/closed status of socket. More... | |
bool | cbor_parse_csp_packet (csp_packet_t *packet, void *buffer, int buffer_size) |
int | cbor_encode_csp_packet (csp_packet_t *packet, uint8_t *buffer) |
Function Documentation
int cbor_encode_csp_packet | ( | csp_packet_t * | packet, |
uint8_t * | buffer | ||
) |
bool cbor_parse_csp_packet | ( | csp_packet_t * | packet, |
void * | buffer, | ||
int | buffer_size | ||
) |
int socket_close | ( | csp_socket_handle_t * | socket_driver | ) |
int socket_init | ( | csp_socket_handle_t * | socket_iface, |
uint8_t | mode, | ||
uint16_t | port | ||
) |
Initializes and connects a unix socket, returns socket handle.
- Parameters
-
socket_iface socket interface to store handle in mode CSP_SOCKET_CLIENT or CSP_SOCKET_SERVER, which type of connection is created port socket interface port number
- Returns
- int CSP_ERR_NONE if successful, otherwise CSP_ERR_DRIVER
int socket_status | ( | const csp_socket_handle_t * | socket_iface | ) |
Attempts to check open/closed status of socket.
- Parameters
-
socket_iface socket interface containing socket handle
- Returns
- int CSP_ERR_NONE if socket open, otherwise CSP_ERR_DRIVER