Golioth Firmware SDK
|
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include "golioth_status.h"
#include "golioth_sys.h"
Go to the source code of this file.
Data Structures | |
struct | golioth_response_t |
Response status and CoAP class/code. More... | |
struct | golioth_psk_credentials_t |
struct | golioth_pki_credentials_t |
struct | golioth_tls_credentials_t |
TLS Authentication Credentials. More... | |
struct | golioth_client_config_t |
Golioth client configuration, passed into golioth_client_create. More... | |
Typedefs | |
typedef void * | golioth_client_t |
Opaque handle to the Golioth client. More... | |
typedef void(* | golioth_client_event_cb_fn) (golioth_client_t client, golioth_client_event_t event, void *arg) |
typedef void(* | golioth_get_cb_fn) (golioth_client_t client, const golioth_response_t *response, const char *path, const uint8_t *payload, size_t payload_size, void *arg) |
typedef void(* | golioth_get_block_cb_fn) (golioth_client_t client, const golioth_response_t *response, const char *path, const uint8_t *payload, size_t payload_size, bool is_last, void *arg) |
typedef void(* | golioth_set_cb_fn) (golioth_client_t client, const golioth_response_t *response, const char *path, void *arg) |
Enumerations | |
enum | golioth_client_event_t { GOLIOTH_CLIENT_EVENT_CONNECTED , GOLIOTH_CLIENT_EVENT_DISCONNECTED } |
Golioth client events. More... | |
enum | golioth_tls_auth_type_t { GOLIOTH_TLS_AUTH_TYPE_PSK , GOLIOTH_TLS_AUTH_TYPE_PKI } |
TLS authentication type. More... | |
Functions | |
golioth_client_t | golioth_client_create (const golioth_client_config_t *config) |
bool | golioth_client_wait_for_connect (golioth_client_t client, int timeout_ms) |
golioth_status_t | golioth_client_start (golioth_client_t client) |
golioth_status_t | golioth_client_stop (golioth_client_t client) |
void | golioth_client_destroy (golioth_client_t client) |
bool | golioth_client_is_running (golioth_client_t client) |
bool | golioth_client_is_connected (golioth_client_t client) |
void | golioth_client_register_event_callback (golioth_client_t client, golioth_client_event_cb_fn callback, void *arg) |
uint32_t | golioth_client_num_items_in_request_queue (golioth_client_t client) |
void | golioth_client_set_packet_loss_percent (uint8_t percent) |
bool | golioth_client_has_allocation_leaks (void) |
golioth_sys_thread_t | golioth_client_get_thread (golioth_client_t client) |