#include <golioth/client.h>
#include <golioth/golioth_status.h>
#include <stdint.h>
#include <zcbor_encode.h>
Go to the source code of this file.
◆ golioth_net_info_create()
struct golioth_net_info * golioth_net_info_create |
( |
| ) |
|
Create network information
- Returns
- pointer to golioth_net_info struct
-
NULL - Error initializing
◆ golioth_net_info_destroy()
enum golioth_status golioth_net_info_destroy |
( |
struct golioth_net_info * | info | ) |
|
Destroy network information
Free the network information after no longer in use.
- Parameters
-
info | pointer to golioth_net_info struct |
- Returns
- GOLIOTH_OK - Network information successfully deinitialized
-
otherwise - Error deinitializing the network information
◆ golioth_net_info_finish()
enum golioth_status golioth_net_info_finish |
( |
struct golioth_net_info * | info | ) |
|
Finish building network information
Needs to be called after filling data with golioth_net_info_*_append() APIs
- Parameters
-
- Return values
-
GOLIOTH_OK | Network information encoding finished successfully |
GOLIOTH_ERR_NULL | No network information encoded within request |
GOLIOTH_ERR_MEM_ALLOC | Not enough memory in network information buffer |
◆ golioth_net_info_get_buf()
const uint8_t * golioth_net_info_get_buf |
( |
const struct golioth_net_info * | info | ) |
|
Get serialized CBOR network information
Needs to be called after filling data with golioth_net_info_*_append() APIs, and finishing with golioth_net_info_finish()
- Parameters
-
- Returns
- buffer containing serialized network information
◆ golioth_net_info_get_buf_len()
size_t golioth_net_info_get_buf_len |
( |
const struct golioth_net_info * | info | ) |
|
Get length of serialized CBOR network information
Needs to be called after filling data with golioth_net_info_*_append() APIs, and finishing with golioth_net_info_finish()
- Parameters
-
- Returns
- length of buffer containing serialized network information