Golioth Zephyr SDK
net/golioth.h File Reference
#include <net/golioth/lightdb.h>
#include <net/golioth/rpc.h>
#include <net/golioth/settings.h>
#include <net/golioth/stream.h>
#include <stdint.h>
#include <zephyr/kernel.h>
#include <zephyr/net/coap.h>
#include <zephyr/net/tls_credentials.h>

Go to the source code of this file.

Data Structures

struct  golioth_tls
 (D)TLS credentials of Golioth client. More...
 
struct  golioth_client
 Represents a Golioth client instance. More...
 

Macros

#define GOLIOTH_COAP_MAX_NON_PAYLOAD_LEN   128
 
#define GOLIOTH_MAX_IDENTITY_LEN   32
 
#define GOLIOTH_EMPTY_PACKET_LEN   (16 + GOLIOTH_MAX_IDENTITY_LEN)
 

Enumerations

enum  golioth_content_format { GOLIOTH_CONTENT_FORMAT_APP_OCTET_STREAM = COAP_CONTENT_FORMAT_APP_OCTET_STREAM , GOLIOTH_CONTENT_FORMAT_APP_JSON = COAP_CONTENT_FORMAT_APP_JSON , GOLIOTH_CONTENT_FORMAT_APP_CBOR = COAP_CONTENT_FORMAT_APP_CBOR }
 Set of Content-Format option values for Golioth APIs. More...
 

Functions

static void golioth_lock (struct golioth_client *client)
 
static void golioth_unlock (struct golioth_client *client)
 
void golioth_init (struct golioth_client *client)
 Initialize golioth client instance. More...
 
bool golioth_is_connected (struct golioth_client *client)
 Check if client is connected to Golioth. More...
 
int golioth_connect (struct golioth_client *client, const char *host, uint16_t port)
 Connect to Golioth. More...
 
int golioth_disconnect (struct golioth_client *client)
 Disconnect from Golioth. More...
 
int golioth_set_proto_coap_dtls (struct golioth_client *client, sec_tag_t *sec_tag_list, size_t sec_tag_count)
 Set DTLS as transport protocol. More...
 
int golioth_send_coap (struct golioth_client *client, struct coap_packet *packet)
 Send CoAP packet to Golioth. More...
 
int golioth_send_coap_payload (struct golioth_client *client, struct coap_packet *packet, uint8_t *data, uint16_t data_len)
 Send CoAP packet with separate payload to Golioth. More...
 
int golioth_ping (struct golioth_client *client)
 Send PING message to Golioth. More...
 
int golioth_send_hello (struct golioth_client *client)
 Send Hello message to Golioth. More...
 
int golioth_process_rx (struct golioth_client *client)
 Process incoming data from Golioth. More...
 
void golioth_poll_prepare (struct golioth_client *client, int64_t now, int *fd, int64_t *timeout)
 Prepare for poll() system call on transport socket. More...