Loading...
Searching...
No Matches

Read, set, and add option accessors for IANA-defined options. More...

Detailed Description

Read, set, and add option accessors for IANA-defined options.

Content-Format values

enum  unicoap_content_format_t {
  UNICOAP_FORMAT_TEXT = 0 , UNICOAP_FORMAT_COSE_ENCRYPT0 = 16 , UNICOAP_FORMAT_COSE_MAC0 = 17 , UNICOAP_FORMAT_COSE_SIGN1 = 18 ,
  UNICOAP_FORMAT_ACE_CBOR = 19 , UNICOAP_FORMAT_IMAGE_GIF = 21 , UNICOAP_FORMAT_IMAGE_JPEG = 22 , UNICOAP_FORMAT_IMAGE_PNG = 23 ,
  UNICOAP_FORMAT_LINK = 40 , UNICOAP_FORMAT_XML = 41 , UNICOAP_FORMAT_OCTET_STREAM = 42 , UNICOAP_FORMAT_EXI = 47 ,
  UNICOAP_FORMAT_JSON = 50 , UNICOAP_FORMAT_JSON_PATCH_JSON = 51 , UNICOAP_FORMAT_MERGE_PATCH_JSON = 52 , UNICOAP_FORMAT_CBOR = 60 ,
  UNICOAP_FORMAT_CWT = 61 , UNICOAP_FORMAT_MULTIPART_CORE = 62 , UNICOAP_FORMAT_CBOR_SEQ = 63 , UNICOAP_FORMAT_EDHOC_CBOR_SEQ = 64 ,
  UNICOAP_FORMAT_CID_EDHOC_CBOR_SEQ = 65 , UNICOAP_FORMAT_COSE_ENCRYPT = 96 , UNICOAP_FORMAT_COSE_MAC = 97 , UNICOAP_FORMAT_COSE_SIGN = 98 ,
  UNICOAP_FORMAT_COSE_KEY = 101 , UNICOAP_FORMAT_COSE_KEY_SET = 102 , UNICOAP_FORMAT_SENML_JSON = 110 , UNICOAP_FORMAT_SENSML_JSON = 111 ,
  UNICOAP_FORMAT_SENML_CBOR = 112 , UNICOAP_FORMAT_SENSML_CBOR = 113 , UNICOAP_FORMAT_SENML_EXI = 114 , UNICOAP_FORMAT_SENSML_EXI = 115 ,
  UNICOAP_FORMAT_YANG_DATA_CBOR_SID = 140 , UNICOAP_FORMAT_COAP_GROUP_JSON = 256 , UNICOAP_FORMAT_CONCISE_PROBLEM_DETAILS_CBOR = 257 , UNICOAP_FORMAT_SWID_CBOR = 258 ,
  UNICOAP_FORMAT_PKIXCMP = 259 , UNICOAP_FORMAT_YANG_SID_JSON = 260 , UNICOAP_FORMAT_ACE_GROUPCOMM_CBOR = 261 , UNICOAP_FORMAT_ACE_TRL_CBOR = 262 ,
  UNICOAP_FORMAT_EAT_CWT = 263 , UNICOAP_FORMAT_EAT_JWT = 264 , UNICOAP_FORMAT_EAT_BUN_CBOR = 265 , UNICOAP_FORMAT_EAT_BUN_JSON = 266 ,
  UNICOAP_FORMAT_EAT_UCS_CBOR = 267 , UNICOAP_FORMAT_EAT_UCS_JSON = 268 , UNICOAP_FORMAT_COAP_EAP = 269 , UNICOAP_FORMAT_SUIT_REPORT_COSE = 270 ,
  UNICOAP_FORMAT_DOTS_CBOR = 271 , UNICOAP_FORMAT_MISSING_BLOCKS_CBOR_SEQ = 272 , UNICOAP_FORMAT_CMW_CBOR = 273 , UNICOAP_FORMAT_CMW_JSON = 274 ,
  UNICOAP_FORMAT_CMW_COSE = 275 , UNICOAP_FORMAT_CMW_JWS = 276 , UNICOAP_FORMAT_SCITT_STATEMENT_COSE = 277 , UNICOAP_FORMAT_SCITT_RECEIPT_COSE = 278 ,
  UNICOAP_FORMAT_STATUSLIST_CWT = 279 , UNICOAP_FORMAT_PKCS7_MIME_SERVER_GENERATED_KEY = 280 , UNICOAP_FORMAT_PKCS7_MIME_CERTS_ONLY = 281 , UNICOAP_FORMAT_PKCS8 = 284 ,
  UNICOAP_FORMAT_CSRATTRS = 285 , UNICOAP_FORMAT_PKCS10 = 286 , UNICOAP_FORMAT_PKIX_CERT = 287 , UNICOAP_FORMAT_AIF_CBOR = 290 ,
  UNICOAP_FORMAT_AIF_JSON = 291 , UNICOAP_FORMAT_AIF_CBOR_CRI_LOCAL_PART = 292 , UNICOAP_FORMAT_SD_CWT_ = 293 , UNICOAP_FORMAT_KB_CWT_ = 294 ,
  UNICOAP_FORMAT_MEASURED_COMPONENT_CBOR = 295 , UNICOAP_FORMAT_MEASURED_COMPONENT_JSON = 296 , UNICOAP_FORMAT_AIF_CBOR_OSCORE_GNAME_OSCORE_GPERM = 297 , UNICOAP_FORMAT_AIF_JSON_OSCORE_GNAME_OSCORE_GPERM = 298 ,
  UNICOAP_FORMAT_SENML_XML = 310 , UNICOAP_FORMAT_SENSML_XML = 311 , UNICOAP_FORMAT_SENML_ETCH_JSON = 320 , UNICOAP_FORMAT_SENML_ETCH_CBOR = 322 ,
  UNICOAP_FORMAT_YANG_DATA_CBOR = 340 , UNICOAP_FORMAT_YANG_DATA_CBOR_NAME = 341 , UNICOAP_FORMAT_TD_JSON = 432 , UNICOAP_FORMAT_TM_JSON = 433 ,
  UNICOAP_FORMAT_SDF_JSON = 434 , UNICOAP_FORMAT_DNS_MESSAGE = 553 , UNICOAP_FORMAT_UCCS_CBOR = 601 , UNICOAP_FORMAT_VOUCHER_COSE_ = 836 ,
  UNICOAP_FORMAT_OCF_CBOR = 10000 , UNICOAP_FORMAT_OSCORE = 10001 , UNICOAP_FORMAT_JAVASCRIPT = 10002 , UNICOAP_FORMAT_EAT_CWT_PSA2023_PROFILE = 10003 ,
  UNICOAP_FORMAT_EAT_CWT_PSA2019_PROFILE = 10004 , UNICOAP_FORMAT_EAT_CWT_PROFILE_PROFILE = 10005 , UNICOAP_FORMAT_OMS_CELLULAR_COSE_CONTENT_CBOR = 10006 , UNICOAP_FORMAT_SYSLOG_MSG = 10007 ,
  UNICOAP_FORMAT_TOC_CBOR = 10570 , UNICOAP_FORMAT_CE_CBOR = 10571 , UNICOAP_FORMAT_TOC_CBOR_PROFILE = 10572 , UNICOAP_FORMAT_CE_CBOR_PROFILE = 10573 ,
  UNICOAP_FORMAT_JSON_DEFLATE = 11050 , UNICOAP_FORMAT_CBOR_DEFLATE = 11060 , UNICOAP_FORMAT_OMA_LWM2M_TLV = 11542 , UNICOAP_FORMAT_OMA_LWM2M_JSON = 11543 ,
  UNICOAP_FORMAT_OMA_LWM2M_CBOR = 11544 , UNICOAP_FORMAT_TEXT_ZSTD = 12000 , UNICOAP_FORMAT_XML_ZSTD = 12041 , UNICOAP_FORMAT_JSON_ZSTD = 12050 ,
  UNICOAP_FORMAT_TEXT_CSS = 20000 , UNICOAP_FORMAT_AS207960_VAS_CONFIG_JER = 20001 , UNICOAP_FORMAT_AS207960_VAS_CONFIG_UPER = 20002 , UNICOAP_FORMAT_AS207960_VAS_TAP_JER = 20003 ,
  UNICOAP_FORMAT_AS207960_VAS_TAP_UPER = 20004 , UNICOAP_FORMAT_IMAGE_SVG_XML = 30000
}
 Content-Format option values More...
 
static bool unicoap_content_format_is_json (unicoap_content_format_t format)
 Determines whether the given Content-Format is based on JSON.
 
static bool unicoap_content_format_is_cbor (unicoap_content_format_t format)
 Determines whether the given Content-Format is based on CBOR.
 
static bool unicoap_content_format_is_xml (unicoap_content_format_t format)
 Determines whether the given Content-Format is based on XML.
 
static bool unicoap_content_format_is_human_readable (unicoap_content_format_t format)
 Determines whether the given Content-Format is human-readable.
 

Block-wise Transfers

typedef uint32_t unicoap_block_option_t
 Block1 and Block2 option value
 
static ssize_t unicoap_options_t::unicoap_options_get_block (const unicoap_options_t *options, unicoap_option_number_t number, unicoap_block_option_t *block)
 Retrieves a Block1 or Block2 option.
 
static int unicoap_options_t::unicoap_options_set_block (unicoap_options_t *options, unicoap_option_number_t number, unicoap_block_option_t block)
 Sets the Block1 or Block2 option.
 
static ssize_t unicoap_options_t::unicoap_options_get_block1 (const unicoap_options_t *options, unicoap_block_option_t *block)
 Retrieves the Block1 option, if present.
 
static ssize_t unicoap_options_t::unicoap_options_set_block1 (unicoap_options_t *options, unicoap_block_option_t block)
 Sets the Block1 option.
 
static int unicoap_options_t::unicoap_options_remove_block1 (unicoap_options_t *options)
 Removes the Block1 option, if present.
 
static ssize_t unicoap_options_t::unicoap_options_get_block2 (const unicoap_options_t *options, unicoap_block_option_t *block)
 Retrieves the Block2 option, if present.
 
static ssize_t unicoap_options_t::unicoap_options_set_block2 (unicoap_options_t *options, unicoap_block_option_t block)
 Sets the Block2 option.
 
static int unicoap_options_t::unicoap_options_remove_block2 (unicoap_options_t *options)
 Removes the Block2 option, if present.
 
static ssize_t unicoap_options_t::unicoap_options_get_size1 (const unicoap_options_t *options, uint32_t *size)
 Retrieves the Size1 option, if present.
 
static ssize_t unicoap_options_t::unicoap_options_set_size1 (unicoap_options_t *options, uint32_t size)
 Sets the Size1 option.
 
static int unicoap_options_t::unicoap_options_remove_size1 (unicoap_options_t *options)
 Removes the Size1 option, if present.
 
static ssize_t unicoap_options_t::unicoap_options_get_size2 (const unicoap_options_t *options, uint32_t *size)
 Retrieves the Size2 option, if present.
 
static ssize_t unicoap_options_t::unicoap_options_set_size2 (unicoap_options_t *options, uint32_t size)
 Sets the Size2 option.
 
static int unicoap_options_t::unicoap_options_remove_size2 (unicoap_options_t *options)
 Removes the Size2 option, if present.
 
#define UNICOAP_BLOCK_OPTION_NONE   (0x0f000000)
 Sentinel value for unicoap_block_option_t indicating an uninitialized value.
 

Uri-Host

static ssize_t unicoap_options_t::unicoap_options_get_uri_host (const unicoap_options_t *options, const char **host)
 Retrieves the Uri-Host option, if present.
 
static ssize_t unicoap_options_t::unicoap_options_set_uri_host (unicoap_options_t *options, const char *host, size_t length)
 Sets the Uri-Host option.
 
static ssize_t unicoap_options_t::unicoap_options_set_uri_host_string (unicoap_options_t *options, const char *host)
 Sets the Uri-Host option from null-terminated string.
 
static int unicoap_options_t::unicoap_options_remove_uri_host (unicoap_options_t *options)
 Removes the Uri-Host option, if present.
 

If-None-Match

static bool unicoap_options_t::unicoap_options_get_if_none_match (const unicoap_options_t *options)
 Determines whether the If-None-Match option is present.
 
static ssize_t unicoap_options_t::unicoap_options_set_if_none_match (unicoap_options_t *options, bool value)
 Sets the If-None-Match option.
 

Uri-Port

static ssize_t unicoap_options_t::unicoap_options_get_uri_port (const unicoap_options_t *options, uint16_t *port)
 Retrieves the Uri-Port option, if present.
 
static ssize_t unicoap_options_t::unicoap_options_set_uri_port (unicoap_options_t *options, uint16_t port)
 Sets the Uri-Port option.
 
static int unicoap_options_t::unicoap_options_remove_uri_port (unicoap_options_t *options)
 Removes the Uri-Port option, if present.
 

Content-Format

static ssize_t unicoap_options_t::unicoap_options_get_content_format (const unicoap_options_t *options, unicoap_content_format_t *format)
 Retrieves the Content-Format option, if present.
 
static ssize_t unicoap_options_t::unicoap_options_set_content_format (unicoap_options_t *options, unicoap_content_format_t format)
 Sets the Content-Format option.
 
static int unicoap_options_t::unicoap_options_remove_content_format (unicoap_options_t *options)
 Removes the Content-Format option, if present.
 

Max-Age

static ssize_t unicoap_options_t::unicoap_options_get_max_age (const unicoap_options_t *options, uint32_t *age)
 Retrieves the Max-Age option, if present.
 
static ssize_t unicoap_options_t::unicoap_options_set_max_age (unicoap_options_t *options, uint32_t age)
 Sets the Max-Age option.
 
static int unicoap_options_t::unicoap_options_remove_max_age (unicoap_options_t *options)
 Removes the Max-Age option, if present.
 

Accept

static ssize_t unicoap_options_t::unicoap_options_get_accept (const unicoap_options_t *options, unicoap_content_format_t *format)
 Retrieves the Accept option, if present.
 
static ssize_t unicoap_options_t::unicoap_options_set_accept (unicoap_options_t *options, unicoap_content_format_t format)
 Sets the Accept option.
 
static int unicoap_options_t::unicoap_options_remove_accept (unicoap_options_t *options)
 Removes the Accept option, if present.
 

Proxy-Scheme

static ssize_t unicoap_options_t::unicoap_options_get_proxy_scheme (const unicoap_options_t *options, const char **scheme)
 Retrieves the Proxy-Scheme option, if present.
 
static ssize_t unicoap_options_t::unicoap_options_set_proxy_scheme (unicoap_options_t *options, const char *scheme, size_t length)
 Sets the Proxy-Scheme option.
 
static ssize_t unicoap_options_t::unicoap_options_set_proxy_scheme_string (unicoap_options_t *options, const char *scheme)
 Sets the Proxy-Scheme option from null-terminated string.
 
static int unicoap_options_t::unicoap_options_remove_proxy_scheme (unicoap_options_t *options)
 Removes the Proxy-Scheme option, if present.
 

Proxy-Uri

static ssize_t unicoap_options_t::unicoap_options_get_proxy_uri (const unicoap_options_t *options, const char **uri)
 Retrieves the Proxy-Uri option, if present.
 
static ssize_t unicoap_options_t::unicoap_options_set_proxy_uri (unicoap_options_t *options, const char *uri, size_t length)
 Sets the Proxy-Uri option.
 
static ssize_t unicoap_options_t::unicoap_options_set_proxy_uri_string (unicoap_options_t *options, const char *uri)
 Sets the Proxy-Uri option from null-terminated string.
 
static int unicoap_options_t::unicoap_options_remove_proxy_uri (unicoap_options_t *options)
 Removes the Proxy-Uri option, if present.
 

No-Response

static ssize_t unicoap_options_t::unicoap_options_get_no_response (const unicoap_options_t *options, uint8_t *value)
 Retrieves the No-Response option, if present.
 
static ssize_t unicoap_options_t::unicoap_options_set_no_response (unicoap_options_t *options, uint8_t value)
 Sets the No-Response option.
 
static int unicoap_options_t::unicoap_options_remove_no_response (unicoap_options_t *options)
 Removes the No-Response option, if present.
 

If-Match

static ssize_t unicoap_options_t::unicoap_options_get_first_if_match (const unicoap_options_t *options, const uint8_t **value)
 Retrieves the first If-Match option, if present.
 
static ssize_t unicoap_options_iterator_t::unicoap_options_get_next_if_match (unicoap_options_iterator_t *iterator, const uint8_t **value)
 Gets the next If-Match option provided by the specified iterator.
 
static ssize_t unicoap_options_t::unicoap_options_add_if_match (unicoap_options_t *options, const uint8_t *value, size_t size)
 Adds If-Match option.
 
static int unicoap_options_t::unicoap_options_remove_all_if_match (unicoap_options_t *options)
 Removes all If-Match options, if any.
 

ETag

static ssize_t unicoap_options_t::unicoap_options_get_first_etag (const unicoap_options_t *options, const uint8_t **etag)
 Retrieves the first ETag option, if present.
 
static ssize_t unicoap_options_iterator_t::unicoap_options_get_next_etag (unicoap_options_iterator_t *iterator, const uint8_t **etag)
 Gets the next ETag option provided by the specified iterator.
 
static ssize_t unicoap_options_t::unicoap_options_add_etag (unicoap_options_t *options, const uint8_t *etag, size_t size)
 Adds ETag option.
 
static int unicoap_options_t::unicoap_options_remove_etags (unicoap_options_t *options)
 Removes all ETag options, if any.
 

Location-Path

static ssize_t unicoap_options_t::unicoap_options_get_first_location_path_component (const unicoap_options_t *options, const char **component)
 Retrieves the first Location-Path option, if present.
 
static ssize_t unicoap_options_iterator_t::unicoap_options_get_next_location_path_component (unicoap_options_iterator_t *iterator, const char **component)
 Gets the next Location-Path option provided by the specified iterator.
 
static ssize_t unicoap_options_t::unicoap_options_copy_location_path (const unicoap_options_t *options, char *path, size_t capacity)
 Copies absolute location path into the given buffer.
 
static ssize_t unicoap_options_t::unicoap_options_add_location_path_component (unicoap_options_t *options, const char *component, size_t length)
 Adds Location-Path option.
 
static ssize_t unicoap_options_t::unicoap_options_add_location_path_component_string (unicoap_options_t *options, const char *component)
 Adds Location-Path option from null-terminated string.
 
static ssize_t unicoap_options_t::unicoap_options_add_location_path (unicoap_options_t *options, const char *path, size_t length)
 Adds multiple Location-Path options from string.
 
static ssize_t unicoap_options_t::unicoap_options_add_location_path_string (unicoap_options_t *options, const char *path)
 Adds multiple Location-Path options from null-terminated string.
 
static int unicoap_options_t::unicoap_options_remove_location_path (unicoap_options_t *options)
 Removes all Location-Path options, if any.
 

Uri-Path

static ssize_t unicoap_options_t::unicoap_options_get_first_uri_path_component (const unicoap_options_t *options, const char **component)
 Retrieves the first Uri-Path option, if present.
 
static ssize_t unicoap_options_iterator_t::unicoap_options_get_next_uri_path_component (unicoap_options_iterator_t *iterator, const char **component)
 Gets the next Uri-Path option provided by the specified iterator.
 
static ssize_t unicoap_options_t::unicoap_options_copy_uri_path (const unicoap_options_t *options, char *path, size_t capacity)
 Copies absolute URI path into the given buffer.
 
static ssize_t unicoap_options_t::unicoap_options_add_uri_path_component (unicoap_options_t *options, const char *component, size_t length)
 Adds Uri-Path option.
 
static ssize_t unicoap_options_t::unicoap_options_add_uri_path_component_string (unicoap_options_t *options, const char *component)
 Adds Uri-Path option from null-terminated string.
 
static ssize_t unicoap_options_t::unicoap_options_add_uri_path (unicoap_options_t *options, const char *path, size_t length)
 Adds multiple Uri-Path options from string.
 
static ssize_t unicoap_options_t::unicoap_options_add_uri_path_string (unicoap_options_t *options, const char *path)
 Adds multiple Uri-Path options from null-terminated string.
 
static int unicoap_options_t::unicoap_options_remove_uri_path (unicoap_options_t *options)
 Removes all Uri-Path options, if any.
 

Uri-Query

static ssize_t unicoap_options_t::unicoap_options_get_first_uri_query (const unicoap_options_t *options, const char **query)
 Retrieves the first Uri-Query option, if present.
 
static ssize_t unicoap_options_iterator_t::unicoap_options_get_next_uri_query (unicoap_options_iterator_t *iterator, const char **query)
 Gets the next Uri-Query option provided by the specified iterator.
 
static ssize_t unicoap_options_iterator_t::unicoap_options_get_next_uri_query_by_name (unicoap_options_iterator_t *iterator, const char *name, size_t length, const char **value)
 Gets the next Uri-Query option matching the given name, potentially skipping any options in between.
 
static ssize_t unicoap_options_iterator_t::unicoap_options_get_next_uri_query_by_name_string (unicoap_options_iterator_t *iterator, const char *name, const char **value)
 Gets the next Uri-Query option matching the given name, potentially skipping any options in between.
 
static ssize_t unicoap_options_t::unicoap_options_get_first_uri_query_by_name (unicoap_options_t *options, const char *name, size_t length, const char **value)
 Retrieves the first Uri-Query option matching the given name,if present.
 
static ssize_t unicoap_options_t::unicoap_options_get_first_uri_query_by_name_string (unicoap_options_t *options, const char *name, const char **value)
 Retrieves the first Uri-Query option matching the given null-terminated name,if present.
 
static ssize_t unicoap_options_t::unicoap_options_copy_uri_queries (const unicoap_options_t *options, char *queries, size_t capacity)
 Copies URI query string into the given buffer.
 
static ssize_t unicoap_options_t::unicoap_options_add_uri_query (unicoap_options_t *options, const char *query, size_t length)
 Adds Uri-Query option.
 
static ssize_t unicoap_options_t::unicoap_options_add_uri_query_string (unicoap_options_t *options, const char *query)
 Adds Uri-Query option from null-terminated string.
 
static ssize_t unicoap_options_t::unicoap_options_add_uri_queries (unicoap_options_t *options, const char *queries, size_t length)
 Adds multiple Uri-Query options from string.
 
static ssize_t unicoap_options_t::unicoap_options_add_uri_queries_string (unicoap_options_t *options, const char *queries)
 Adds multiple Uri-Query options from null-terminated string.
 
static int unicoap_options_t::unicoap_options_remove_uri_queries (unicoap_options_t *options)
 Removes all Uri-Query options, if any.
 

Location-Query

static ssize_t unicoap_options_t::unicoap_options_get_first_location_query (const unicoap_options_t *options, const char **query)
 Retrieves the first Location-Query option, if present.
 
static ssize_t unicoap_options_iterator_t::unicoap_options_get_next_location_query (unicoap_options_iterator_t *iterator, const char **query)
 Gets the next Location-Query option provided by the specified iterator.
 
static ssize_t unicoap_options_iterator_t::unicoap_options_get_next_location_query_by_name (unicoap_options_iterator_t *iterator, const char *name, size_t length, const char **value)
 Gets the next Location-Query option matching the given name, potentially skipping any options in between.
 
static ssize_t unicoap_options_iterator_t::unicoap_options_get_next_location_query_by_name_string (unicoap_options_iterator_t *iterator, const char *name, const char **value)
 Gets the next Location-Query option matching the given name, potentially skipping any options in between.
 
static ssize_t unicoap_options_t::unicoap_options_get_first_location_query_by_name (unicoap_options_t *options, const char *name, size_t length, const char **value)
 Retrieves the first Location-Query option matching the given name,if present.
 
static ssize_t unicoap_options_t::unicoap_options_get_first_location_query_by_name_string (unicoap_options_t *options, const char *name, const char **value)
 Retrieves the first Location-Query option matching the given null-terminated name,if present.
 
static ssize_t unicoap_options_t::unicoap_options_copy_location_queries (const unicoap_options_t *options, char *queries, size_t capacity)
 Copies location query string into the given buffer.
 
static ssize_t unicoap_options_t::unicoap_options_add_location_query (unicoap_options_t *options, const char *query, size_t length)
 Adds Location-Query option.
 
static ssize_t unicoap_options_t::unicoap_options_add_location_query_string (unicoap_options_t *options, const char *query)
 Adds Location-Query option from null-terminated string.
 
static ssize_t unicoap_options_t::unicoap_options_add_location_queries (unicoap_options_t *options, const char *queries, size_t length)
 Adds multiple Location-Query options from string.
 
static ssize_t unicoap_options_t::unicoap_options_add_location_queries_string (unicoap_options_t *options, const char *queries)
 Adds multiple Location-Query options from null-terminated string.
 
static int unicoap_options_t::unicoap_options_remove_location_queries (unicoap_options_t *options)
 Removes all Location-Query options, if any.
 

Observe

static ssize_t unicoap_options_t::unicoap_options_get_observe (const unicoap_options_t *options, uint32_t *observe)
 Retrieves the Observe option, if present.
 
static ssize_t unicoap_options_t::unicoap_options_set_observe (unicoap_options_t *options, uint32_t observe)
 Sets the Observe option.
 
static int unicoap_options_t::unicoap_options_remove_observe (unicoap_options_t *options)
 Removes the Observe option, if present.
 
int unicoap_options_t::unicoap_options_set_observe_generated (unicoap_options_t *options)
 Sets the Observe option to a randomly generated value.
 
#define UNICOAP_OBSERVE_OPTION_REGISTER   (0)
 Observe value for registering for notifications.
 
#define UNICOAP_OBSERVE_OPTION_DEREGISTER   (1)
 Observe value for cancelling a registration for notifications.
 

Macro Definition Documentation

◆ UNICOAP_BLOCK_OPTION_NONE

#define UNICOAP_BLOCK_OPTION_NONE   (0x0f000000)

Sentinel value for unicoap_block_option_t indicating an uninitialized value.

Note
This constant occupies 4 bytes and does thus not represent a valid Block1 or Block2 value.

Definition at line 1756 of file generated.h.

◆ UNICOAP_OBSERVE_OPTION_DEREGISTER

#define UNICOAP_OBSERVE_OPTION_DEREGISTER   (1)

Observe value for cancelling a registration for notifications.

Definition at line 1682 of file generated.h.

◆ UNICOAP_OBSERVE_OPTION_REGISTER

#define UNICOAP_OBSERVE_OPTION_REGISTER   (0)

Observe value for registering for notifications.

Definition at line 1679 of file generated.h.

Typedef Documentation

◆ unicoap_block_option_t

typedef uint32_t unicoap_block_option_t

Block1 and Block2 option value

Definition at line 1761 of file generated.h.

Enumeration Type Documentation

◆ unicoap_content_format_t

Content-Format option values

See also
Content-Format values assigned by IANA
Enumerator
UNICOAP_FORMAT_TEXT 

Content type text/plain; charset=utf-8

Media type: text/plain

See also
RFC2046
RFC3676
RFC5147
UNICOAP_FORMAT_COSE_ENCRYPT0 

Content type application/cose; cose-type="cose-encrypt0"

Media type: application/cose

See also
RFC9052
UNICOAP_FORMAT_COSE_MAC0 

Content type application/cose; cose-type="cose-mac0"

Media type: application/cose

See also
RFC9052
UNICOAP_FORMAT_COSE_SIGN1 

Content type application/cose; cose-type="cose-sign1"

Media type: application/cose

See also
RFC9052
UNICOAP_FORMAT_ACE_CBOR 

Content type application/ace+cbor

Media type: application/ace+cbor

See also
RFC9200
UNICOAP_FORMAT_IMAGE_GIF 

Content type image/gif

Media type: image/gif

See also
https://www.w3.org/Graphics/GIF/spec-gif89a.txt
UNICOAP_FORMAT_IMAGE_JPEG 

Content type image/jpeg

Media type: image/jpeg

See also
ISO/IEC 10918-5
UNICOAP_FORMAT_IMAGE_PNG 

Content type image/png

Media type: image/png

See also
PNG
UNICOAP_FORMAT_LINK 

Content type application/link-format

Media type: application/link-format

See also
RFC6690
UNICOAP_FORMAT_XML 

Content type application/xml

Media type: application/xml

See also
RFC3023
UNICOAP_FORMAT_OCTET_STREAM 

Content type application/octet-stream

Media type: application/octet-stream

See also
RFC2045
RFC2046
UNICOAP_FORMAT_EXI 

Content type application/exi

Media type: application/exi

See also
"Efficient XML Interchange (EXI) Format 1.0 (Second Edition)", February 2014
UNICOAP_FORMAT_JSON 

Content type application/json

Media type: application/json

See also
RFC8259
UNICOAP_FORMAT_JSON_PATCH_JSON 

Content type application/json-patch+json

Media type: application/json-patch+json

See also
RFC6902
UNICOAP_FORMAT_MERGE_PATCH_JSON 

Content type application/merge-patch+json

Media type: application/merge-patch+json

See also
RFC7396
UNICOAP_FORMAT_CBOR 

Content type application/cbor

Media type: application/cbor

See also
RFC8949
UNICOAP_FORMAT_CWT 

Content type application/cwt

Media type: application/cwt

See also
RFC8392
UNICOAP_FORMAT_MULTIPART_CORE 

Content type application/multipart-core

Media type: application/multipart-core

See also
RFC8710
UNICOAP_FORMAT_CBOR_SEQ 

Content type application/cbor-seq

Media type: application/cbor-seq

See also
RFC8742
UNICOAP_FORMAT_EDHOC_CBOR_SEQ 

Content type application/edhoc+cbor-seq

Media type: application/edhoc+cbor-seq

See also
RFC9528
UNICOAP_FORMAT_CID_EDHOC_CBOR_SEQ 

Content type application/cid-edhoc+cbor-seq

Media type: application/cid-edhoc+cbor-seq

See also
RFC9528
UNICOAP_FORMAT_COSE_ENCRYPT 

Content type application/cose; cose-type="cose-encrypt"

Media type: application/cose

See also
RFC9052
UNICOAP_FORMAT_COSE_MAC 

Content type application/cose; cose-type="cose-mac"

Media type: application/cose

See also
RFC9052
UNICOAP_FORMAT_COSE_SIGN 

Content type application/cose; cose-type="cose-sign"

Media type: application/cose

See also
RFC9052
UNICOAP_FORMAT_COSE_KEY 

Content type application/cose-key

Media type: application/cose-key

See also
RFC9052
UNICOAP_FORMAT_COSE_KEY_SET 

Content type application/cose-key-set

Media type: application/cose-key-set

See also
RFC9052
UNICOAP_FORMAT_SENML_JSON 

Content type application/senml+json

Media type: application/senml+json

See also
RFC8428
UNICOAP_FORMAT_SENSML_JSON 

Content type application/sensml+json

Media type: application/sensml+json

See also
RFC8428
UNICOAP_FORMAT_SENML_CBOR 

Content type application/senml+cbor

Media type: application/senml+cbor

See also
RFC8428
UNICOAP_FORMAT_SENSML_CBOR 

Content type application/sensml+cbor

Media type: application/sensml+cbor

See also
RFC8428
UNICOAP_FORMAT_SENML_EXI 

Content type application/senml-exi

Media type: application/senml-exi

See also
RFC8428
UNICOAP_FORMAT_SENSML_EXI 

Content type application/sensml-exi

Media type: application/sensml-exi

See also
RFC8428
UNICOAP_FORMAT_YANG_DATA_CBOR_SID 

Content type application/yang-data+cbor; id=sid

Media type: application/yang-data+cbor

See also
RFC9254
UNICOAP_FORMAT_COAP_GROUP_JSON 

Content type application/coap-group+json

Media type: application/coap-group+json

See also
RFC7390
UNICOAP_FORMAT_CONCISE_PROBLEM_DETAILS_CBOR 

Content type application/concise-problem-details+cbor

Media type: application/concise-problem-details+cbor

See also
RFC9290
UNICOAP_FORMAT_SWID_CBOR 

Content type application/swid+cbor

Media type: application/swid+cbor

See also
RFC9393
UNICOAP_FORMAT_PKIXCMP 

Content type application/pkixcmp

Media type: application/pkixcmp

See also
RFC9482
RFC9811
UNICOAP_FORMAT_YANG_SID_JSON 

Content type application/yang-sid+json

Media type: application/yang-sid+json

See also
RFC9595
UNICOAP_FORMAT_ACE_GROUPCOMM_CBOR 

Content type application/ace-groupcomm+cbor

Media type: application/ace-groupcomm+cbor

See also
RFC9594
UNICOAP_FORMAT_ACE_TRL_CBOR 

Content type application/ace-trl+cbor

Media type: application/ace-trl+cbor

See also
RFC9770
UNICOAP_FORMAT_EAT_CWT 

Content type application/eat+cwt

Media type: application/eat+cwt

See also
RFC9782
UNICOAP_FORMAT_EAT_JWT 

Content type application/eat+jwt

Media type: application/eat+jwt

See also
RFC9782
UNICOAP_FORMAT_EAT_BUN_CBOR 

Content type application/eat-bun+cbor

Media type: application/eat-bun+cbor

See also
RFC9782
UNICOAP_FORMAT_EAT_BUN_JSON 

Content type application/eat-bun+json

Media type: application/eat-bun+json

See also
RFC9782
UNICOAP_FORMAT_EAT_UCS_CBOR 

Content type application/eat-ucs+cbor

Media type: application/eat-ucs+cbor

See also
RFC9782
UNICOAP_FORMAT_EAT_UCS_JSON 

Content type application/eat-ucs+json

Media type: application/eat-ucs+json

See also
RFC9782
UNICOAP_FORMAT_COAP_EAP 

Content type application/coap-eap

Media type: application/coap-eap

See also
RFC9820
UNICOAP_FORMAT_SUIT_REPORT_COSE 

Content type application/suit-report+cose

Media type: application/suit-report+cose

See also
RFC-ietf-suit-report-19
UNICOAP_FORMAT_DOTS_CBOR 

Content type application/dots+cbor

Media type: application/dots+cbor

See also
RFC9132
UNICOAP_FORMAT_MISSING_BLOCKS_CBOR_SEQ 

Content type application/missing-blocks+cbor-seq

Media type: application/missing-blocks+cbor-seq

See also
RFC9177
UNICOAP_FORMAT_CMW_CBOR 

Content type application/cmw+cbor

Media type: application/cmw+cbor

See also
RFC-ietf-rats-msg-wrap-22, Sections 3.1, 3.2, 3.3
UNICOAP_FORMAT_CMW_JSON 

Content type application/cmw+json

Media type: application/cmw+json

See also
RFC-ietf-rats-msg-wrap-22, Sections 3.1, 3.3
UNICOAP_FORMAT_CMW_COSE 

Content type application/cmw+cose

Media type: application/cmw+cose

See also
RFC-ietf-rats-msg-wrap-22, Section 4.1
UNICOAP_FORMAT_CMW_JWS 

Content type application/cmw+jws

Media type: application/cmw+jws

See also
RFC-ietf-rats-msg-wrap-22, Section 4.2
UNICOAP_FORMAT_SCITT_STATEMENT_COSE 

Content type application/scitt-statement+cose

Media type: application/scitt-statement+cose

See also
RFC9943
UNICOAP_FORMAT_SCITT_RECEIPT_COSE 

Content type application/scitt-receipt+cose

Media type: application/scitt-receipt+cose

See also
RFC9943
UNICOAP_FORMAT_STATUSLIST_CWT 

Content type application/statuslist+cwt

Media type: application/statuslist+cwt

See also
RFC-ietf-oauth-status-list-21
UNICOAP_FORMAT_PKCS7_MIME_SERVER_GENERATED_KEY 

Content type application/pkcs7-mime; smime-type=server-generated-key

Media type: application/pkcs7-mime

See also
RFC7030
RFC8551
RFC9148
UNICOAP_FORMAT_PKCS7_MIME_CERTS_ONLY 

Content type application/pkcs7-mime; smime-type=certs-only

Media type: application/pkcs7-mime

See also
RFC8551
RFC9148
UNICOAP_FORMAT_PKCS8 

Content type application/pkcs8

Media type: application/pkcs8

See also
RFC5958
RFC8551
RFC9148
UNICOAP_FORMAT_CSRATTRS 

Content type application/csrattrs

Media type: application/csrattrs

See also
RFC7030
RFC9148
UNICOAP_FORMAT_PKCS10 

Content type application/pkcs10

Media type: application/pkcs10

See also
RFC5967
RFC8551
RFC9148
UNICOAP_FORMAT_PKIX_CERT 

Content type application/pkix-cert

Media type: application/pkix-cert

See also
RFC2585
RFC9148
UNICOAP_FORMAT_AIF_CBOR 

Content type application/aif+cbor

Media type: application/aif+cbor

See also
RFC9237
UNICOAP_FORMAT_AIF_JSON 

Content type application/aif+json

Media type: application/aif+json

See also
RFC9237
UNICOAP_FORMAT_AIF_CBOR_CRI_LOCAL_PART 

Content type application/aif+cbor;toid=CRI-local-part

Media type: application/aif+cbor

See also
RFC-ietf-core-href-29
UNICOAP_FORMAT_SD_CWT_ 

Content type application/sd-cwt (TEMPORARY - registered 2025-12-08, expires 2026-12-08)

Media type: https://www.iana.org/assignments/provisional-standard-media-types

See also
draft-ietf-spice-sd-cwt-06, Section 5
UNICOAP_FORMAT_KB_CWT_ 

Content type application/kb+cwt (TEMPORARY - registered 2025-12-08, expires 2026-12-08)

Media type: https://www.iana.org/assignments/provisional-standard-media-types

See also
draft-ietf-spice-sd-cwt-06, Section 8.1
UNICOAP_FORMAT_MEASURED_COMPONENT_CBOR 

Content type application/measured-component+cbor

Media type: application/measured-component+cbor

See also
RFC-ietf-rats-eat-measured-component-12
UNICOAP_FORMAT_MEASURED_COMPONENT_JSON 

Content type application/measured-component+json

Media type: application/measured-component+json

See also
RFC-ietf-rats-eat-measured-component-12
UNICOAP_FORMAT_AIF_CBOR_OSCORE_GNAME_OSCORE_GPERM 

Content type application/aif+cbor;toid=oscore-gname;tperm=oscore-gperm

Media type: application/aif+cbor

See also
RFC-ietf-ace-key-groupcomm-oscore-21
UNICOAP_FORMAT_AIF_JSON_OSCORE_GNAME_OSCORE_GPERM 

Content type application/aif+json;toid=oscore-gname;tperm=oscore-gperm

Media type: application/aif+json

See also
RFC-ietf-ace-key-groupcomm-oscore-21
UNICOAP_FORMAT_SENML_XML 

Content type application/senml+xml

Media type: application/senml+xml

See also
RFC8428
UNICOAP_FORMAT_SENSML_XML 

Content type application/sensml+xml

Media type: application/sensml+xml

See also
RFC8428
UNICOAP_FORMAT_SENML_ETCH_JSON 

Content type application/senml-etch+json

Media type: application/senml-etch+json

See also
RFC8790
UNICOAP_FORMAT_SENML_ETCH_CBOR 

Content type application/senml-etch+cbor

Media type: application/senml-etch+cbor

See also
RFC8790
UNICOAP_FORMAT_YANG_DATA_CBOR 

Content type application/yang-data+cbor

Media type: application/yang-data+cbor

See also
RFC9254
UNICOAP_FORMAT_YANG_DATA_CBOR_NAME 

Content type application/yang-data+cbor; id=name

Media type: application/yang-data+cbor

See also
RFC9254
UNICOAP_FORMAT_TD_JSON 

Content type application/td+json

Media type: application/td+json

See also
"Web of Things (WoT) Thing Description 1.1", April 2022
UNICOAP_FORMAT_TM_JSON 

Content type application/tm+json

Media type: application/tm+json

See also
"Web of Things (WoT) Thing Description 1.1", April 2022
UNICOAP_FORMAT_SDF_JSON 

Content type application/sdf+json

Media type: application/sdf+json

See also
RFC9880
UNICOAP_FORMAT_DNS_MESSAGE 

Content type application/dns-message

Media type: application/dns-message

See also
RFC8484
RFC9953, Section 4.1
UNICOAP_FORMAT_UCCS_CBOR 

Content type application/uccs+cbor

Media type: application/uccs+cbor

See also
RFC9781, Section 6.4
UNICOAP_FORMAT_VOUCHER_COSE_ 

Content type application/voucher+cose (TEMPORARY - registered 2022-04-12, extension registered 2026-03-18, expires 2027-04-12)

Media type: https://www.iana.org/assignments/provisional-standard-media-types

See also
draft-ietf-anima-constrained-voucher-23
UNICOAP_FORMAT_OCF_CBOR 

Content type application/vnd.ocf+cbor

Media type: application/vnd.ocf+cbor

See also
Michael_Koster
UNICOAP_FORMAT_OSCORE 

Content type application/oscore

Media type: application/oscore

See also
RFC8613
UNICOAP_FORMAT_JAVASCRIPT 

Content type application/javascript

Media type: application/javascript

See also
RFC4329
UNICOAP_FORMAT_EAT_CWT_PSA2023_PROFILE 

Content type application/eat+cwt; eat_profile="tag:psacertified.org,2023:psa#tfm"

Media type: application/eat+cwt

See also
RFC9783
UNICOAP_FORMAT_EAT_CWT_PSA2019_PROFILE 

Content type application/eat+cwt; eat_profile="tag:psacertified.org,2019:psa#legacy"

Media type: application/eat+cwt

See also
RFC9783
UNICOAP_FORMAT_EAT_CWT_PROFILE_PROFILE 

Content type application/eat+cwt; eat_profile=2.16.840.1.113741.1.16.1

Media type: application/eat+cwt

See also
RFC9782
draft-cds-rats-intel-corim-profile-05
UNICOAP_FORMAT_OMS_CELLULAR_COSE_CONTENT_CBOR 

Content type application/vnd.oms.cellular-cose-content+cbor

Media type: application/vnd.oms.cellular-cose-content+cbor

See also
OMS-Group e. V.
UNICOAP_FORMAT_SYSLOG_MSG 

Content type application/syslog-msg

Media type: application/syslog-msg

See also
https://www.iana.org/assignments/media-types/application/syslog-msg
UNICOAP_FORMAT_TOC_CBOR 

Content type application/toc+cbor

Media type: application/toc+cbor

See also
CE-Binding, Section 6.3.1
UNICOAP_FORMAT_CE_CBOR 

Content type application/ce+cbor

Media type: application/ce+cbor

See also
CE-Binding, Section 6.3.2
UNICOAP_FORMAT_TOC_CBOR_PROFILE 

Content type application/toc+cbor;profile=2.16.840.1.113741.1.16.1

Media type: application/toc+cbor

See also
TCG DICE Concise Evidence Binding for SPDM
draft-cds-rats-intel-corim-profile-05
UNICOAP_FORMAT_CE_CBOR_PROFILE 

Content type application/ce+cbor;profile=2.16.840.1.113741.1.16.1

Media type: application/ce+cbor

See also
TCG DICE Concise Evidence Binding for SPDM
draft-cds-rats-intel-corim-profile-05
UNICOAP_FORMAT_JSON_DEFLATE 

Content type application/json in deflate coding.

Media type: application/json

See also
RFC8259
RFC9110, Section 8.4.1.2
UNICOAP_FORMAT_CBOR_DEFLATE 

Content type application/cbor in deflate coding.

Media type: application/cbor

See also
RFC8949
RFC9110, Section 8.4.1.2
UNICOAP_FORMAT_OMA_LWM2M_TLV 

Content type application/vnd.oma.lwm2m+tlv

Media type: application/vnd.oma.lwm2m+tlv

See also
OMA-TS-LightweightM2M-V1_0
UNICOAP_FORMAT_OMA_LWM2M_JSON 

Content type application/vnd.oma.lwm2m+json

Media type: application/vnd.oma.lwm2m+json

See also
OMA-TS-LightweightM2M-V1_0
UNICOAP_FORMAT_OMA_LWM2M_CBOR 

Content type application/vnd.oma.lwm2m+cbor

Media type: application/vnd.oma.lwm2m+cbor

See also
OMA-TS-LightweightM2M-V1_2
UNICOAP_FORMAT_TEXT_ZSTD 

Content type text/plain;charset=utf-8 in zstd coding.

Media type: text/plain

See also
Benjamin_Valentin
UNICOAP_FORMAT_XML_ZSTD 

Content type application/xml in zstd coding.

Media type: application/xml

See also
Benjamin_Valentin
UNICOAP_FORMAT_JSON_ZSTD 

Content type application/json in zstd coding.

Media type: application/json

See also
Benjamin_Valentin
UNICOAP_FORMAT_TEXT_CSS 

Content type text/css

Media type: text/css

See also
RFC2318
UNICOAP_FORMAT_AS207960_VAS_CONFIG_JER 

Content type application/vnd.as207960.vas.config+jer

Media type: application/vnd.as207960.vas.config+jer

See also
AS207960_Cyfyngedig
UNICOAP_FORMAT_AS207960_VAS_CONFIG_UPER 

Content type application/vnd.as207960.vas.config+uper

Media type: application/vnd.as207960.vas.config+uper

See also
AS207960_Cyfyngedig
UNICOAP_FORMAT_AS207960_VAS_TAP_JER 

Content type application/vnd.as207960.vas.tap+jer

Media type: application/vnd.as207960.vas.tap+jer

See also
AS207960_Cyfyngedig
UNICOAP_FORMAT_AS207960_VAS_TAP_UPER 

Content type application/vnd.as207960.vas.tap+uper

Media type: application/vnd.as207960.vas.tap+uper

See also
AS207960_Cyfyngedig
UNICOAP_FORMAT_IMAGE_SVG_XML 

Content type image/svg+xml

Media type: image/svg+xml

See also
https://www.w3.org/TR/SVG/mimereg.html

Definition at line 709 of file constants.h.

Function Documentation

◆ unicoap_content_format_is_cbor()

static bool unicoap_content_format_is_cbor ( unicoap_content_format_t format)
inlinestatic

Determines whether the given Content-Format is based on CBOR.

Parameters
formatContent-Format value
Returns
A boolean value indicating whether the format is CBOR-based

Definition at line 1645 of file constants.h.

◆ unicoap_content_format_is_human_readable()

static bool unicoap_content_format_is_human_readable ( unicoap_content_format_t format)
inlinestatic

Determines whether the given Content-Format is human-readable.

Parameters
formatContent-Format value
Returns
A boolean value indicating whether the format is human-readable

Definition at line 1703 of file constants.h.

◆ unicoap_content_format_is_json()

static bool unicoap_content_format_is_json ( unicoap_content_format_t format)
inlinestatic

Determines whether the given Content-Format is based on JSON.

Parameters
formatContent-Format value
Returns
A boolean value indicating whether the format is JSON-based

Definition at line 1615 of file constants.h.

◆ unicoap_content_format_is_xml()

static bool unicoap_content_format_is_xml ( unicoap_content_format_t format)
inlinestatic

Determines whether the given Content-Format is based on XML.

Parameters
formatContent-Format value
Returns
A boolean value indicating whether the format is XML-based

Definition at line 1688 of file constants.h.

◆ unicoap_options_add_etag()

static ssize_t unicoap_options_add_etag ( unicoap_options_t * options,
const uint8_t * etag,
size_t size )
inlinestatic

Adds ETag option.

Parameters
[in,out]optionsOptions to write to
[in]etagETag value
sizeNumber of bytes in etag in bytes
Returns
Zero on success, negative error number otherwise
Return values
`-ENOBUFS`Options buffer lacks sufficient capacity to add options
Precondition
etag must be at least of size 1 bytes
etag size must not exceed 8 bytes

Definition at line 743 of file generated.h.

◆ unicoap_options_add_if_match()

static ssize_t unicoap_options_add_if_match ( unicoap_options_t * options,
const uint8_t * value,
size_t size )
inlinestatic

Adds If-Match option.

Parameters
[in,out]optionsOptions to write to
[in]valueIf-Match value
sizeNumber of bytes in value in bytes
Returns
Zero on success, negative error number otherwise
Return values
`-ENOBUFS`Options buffer lacks sufficient capacity to add options
Precondition
value size must not exceed 8 bytes

Definition at line 663 of file generated.h.

◆ unicoap_options_add_location_path()

static ssize_t unicoap_options_add_location_path ( unicoap_options_t * options,
const char * path,
size_t length )
inlinestatic

Adds multiple Location-Path options from string.

Parameters
[in,out]optionsOptions to write to
[in]pathas buffer of UTF-8 code units with values separated by /
lengthNumber of UTF-8 code units in path, excluding null-terminator (if present) in bytes without potential null-terminator
Returns
Zero on success, negative error number otherwise
Return values
`-ENOBUFS`Options buffer lacks sufficient capacity to add options

If the string with the values you want to add starts with the separator, you can still use this function.

Definition at line 893 of file generated.h.

◆ unicoap_options_add_location_path_component()

static ssize_t unicoap_options_add_location_path_component ( unicoap_options_t * options,
const char * component,
size_t length )
inlinestatic

Adds Location-Path option.

Parameters
[in,out]optionsOptions to write to
[in]componentLocation-Path value as buffer of UTF-8 code units
lengthNumber of UTF-8 code units in component, excluding null-terminator (if present) in bytes without potential null-terminator
Returns
Zero on success, negative error number otherwise
Return values
`-ENOBUFS`Options buffer lacks sufficient capacity to add options

Definition at line 852 of file generated.h.

◆ unicoap_options_add_location_path_component_string()

static ssize_t unicoap_options_add_location_path_component_string ( unicoap_options_t * options,
const char * component )
inlinestatic

Adds Location-Path option from null-terminated string.

Parameters
[in,out]optionsOptions to write to
[in]componentLocation-Path value as buffer of UTF-8 code units, must be null-terminated
Returns
Zero on success, negative error number otherwise
Return values
`-ENOBUFS`Options buffer lacks sufficient capacity to add options

Uses strlen to calculate the number of code units.

See also
unicoap_options_t::unicoap_options_add_location_path_component

Definition at line 873 of file generated.h.

◆ unicoap_options_add_location_path_string()

static ssize_t unicoap_options_add_location_path_string ( unicoap_options_t * options,
const char * path )
inlinestatic

Adds multiple Location-Path options from null-terminated string.

Parameters
[in,out]optionsOptions to write to
[in]pathas null-terminated string of UTF-8 code units with values separated by /
Returns
Zero on success, negative error number otherwise
Return values
`-ENOBUFS`Options buffer lacks sufficient capacity to add options

If the string with the values you want to add starts with the separator, you can still use this function. Uses strlen to calculate the number of code units.

See also
unicoap_options_t::unicoap_options_add_location_path

Definition at line 915 of file generated.h.

◆ unicoap_options_add_location_queries()

static ssize_t unicoap_options_add_location_queries ( unicoap_options_t * options,
const char * queries,
size_t length )
inlinestatic

Adds multiple Location-Query options from string.

Parameters
[in,out]optionsOptions to write to
[in]queriesas buffer of UTF-8 code units with values separated by &
lengthNumber of UTF-8 code units in queries, excluding null-terminator (if present) in bytes without potential null-terminator
Returns
Zero on success, negative error number otherwise
Return values
`-ENOBUFS`Options buffer lacks sufficient capacity to add options
Precondition
queries' size must not exceed 255 bytes

If the string with the values you want to add starts with the separator, you can still use this function.

Definition at line 1628 of file generated.h.

◆ unicoap_options_add_location_queries_string()

static ssize_t unicoap_options_add_location_queries_string ( unicoap_options_t * options,
const char * queries )
inlinestatic

Adds multiple Location-Query options from null-terminated string.

Parameters
[in,out]optionsOptions to write to
[in]queriesas null-terminated string of UTF-8 code units with values separated by &
Returns
Zero on success, negative error number otherwise
Return values
`-ENOBUFS`Options buffer lacks sufficient capacity to add options
Precondition
queries size must not exceed 255 bytes

If the string with the values you want to add starts with the separator, you can still use this function. Uses strlen to calculate the number of code units.

See also
unicoap_options_t::unicoap_options_add_location_queries

Definition at line 1651 of file generated.h.

◆ unicoap_options_add_location_query()

static ssize_t unicoap_options_add_location_query ( unicoap_options_t * options,
const char * query,
size_t length )
inlinestatic

Adds Location-Query option.

Parameters
[in,out]optionsOptions to write to
[in]queryLocation-Query value as buffer of UTF-8 code units
lengthNumber of UTF-8 code units in query, excluding null-terminator (if present) in bytes without potential null-terminator
Returns
Zero on success, negative error number otherwise
Return values
`-ENOBUFS`Options buffer lacks sufficient capacity to add options
Precondition
query size must not exceed 255 bytes

Definition at line 1584 of file generated.h.

◆ unicoap_options_add_location_query_string()

static ssize_t unicoap_options_add_location_query_string ( unicoap_options_t * options,
const char * query )
inlinestatic

Adds Location-Query option from null-terminated string.

Parameters
[in,out]optionsOptions to write to
[in]queryLocation-Query value as buffer of UTF-8 code units, must be null-terminated
Returns
Zero on success, negative error number otherwise
Return values
`-ENOBUFS`Options buffer lacks sufficient capacity to add options
Precondition
query size must not exceed 255 bytes

Uses strlen to calculate the number of code units.

See also
unicoap_options_t::unicoap_options_add_location_query

Definition at line 1607 of file generated.h.

◆ unicoap_options_add_uri_path()

static ssize_t unicoap_options_add_uri_path ( unicoap_options_t * options,
const char * path,
size_t length )
inlinestatic

Adds multiple Uri-Path options from string.

Parameters
[in,out]optionsOptions to write to
[in]pathas buffer of UTF-8 code units with values separated by /
lengthNumber of UTF-8 code units in path, excluding null-terminator (if present) in bytes without potential null-terminator
Returns
Zero on success, negative error number otherwise
Return values
`-ENOBUFS`Options buffer lacks sufficient capacity to add options
Precondition
components' size must not exceed 255 bytes

If the string with the values you want to add starts with the separator, you can still use this function.

Definition at line 1068 of file generated.h.

◆ unicoap_options_add_uri_path_component()

static ssize_t unicoap_options_add_uri_path_component ( unicoap_options_t * options,
const char * component,
size_t length )
inlinestatic

Adds Uri-Path option.

Parameters
[in,out]optionsOptions to write to
[in]componentUri-Path value as buffer of UTF-8 code units
lengthNumber of UTF-8 code units in component, excluding null-terminator (if present) in bytes without potential null-terminator
Returns
Zero on success, negative error number otherwise
Return values
`-ENOBUFS`Options buffer lacks sufficient capacity to add options
Precondition
component size must not exceed 255 bytes

Definition at line 1024 of file generated.h.

◆ unicoap_options_add_uri_path_component_string()

static ssize_t unicoap_options_add_uri_path_component_string ( unicoap_options_t * options,
const char * component )
inlinestatic

Adds Uri-Path option from null-terminated string.

Parameters
[in,out]optionsOptions to write to
[in]componentUri-Path value as buffer of UTF-8 code units, must be null-terminated
Returns
Zero on success, negative error number otherwise
Return values
`-ENOBUFS`Options buffer lacks sufficient capacity to add options
Precondition
component size must not exceed 255 bytes

Uses strlen to calculate the number of code units.

See also
unicoap_options_t::unicoap_options_add_uri_path_component

Definition at line 1047 of file generated.h.

◆ unicoap_options_add_uri_path_string()

static ssize_t unicoap_options_add_uri_path_string ( unicoap_options_t * options,
const char * path )
inlinestatic

Adds multiple Uri-Path options from null-terminated string.

Parameters
[in,out]optionsOptions to write to
[in]pathas null-terminated string of UTF-8 code units with values separated by /
Returns
Zero on success, negative error number otherwise
Return values
`-ENOBUFS`Options buffer lacks sufficient capacity to add options
Precondition
components size must not exceed 255 bytes

If the string with the values you want to add starts with the separator, you can still use this function. Uses strlen to calculate the number of code units.

See also
unicoap_options_t::unicoap_options_add_uri_path

Definition at line 1091 of file generated.h.

◆ unicoap_options_add_uri_queries()

static ssize_t unicoap_options_add_uri_queries ( unicoap_options_t * options,
const char * queries,
size_t length )
inlinestatic

Adds multiple Uri-Query options from string.

Parameters
[in,out]optionsOptions to write to
[in]queriesas buffer of UTF-8 code units with values separated by &
lengthNumber of UTF-8 code units in queries, excluding null-terminator (if present) in bytes without potential null-terminator
Returns
Zero on success, negative error number otherwise
Return values
`-ENOBUFS`Options buffer lacks sufficient capacity to add options
Precondition
queries' size must not exceed 255 bytes

If the string with the values you want to add starts with the separator, you can still use this function.

Definition at line 1348 of file generated.h.

◆ unicoap_options_add_uri_queries_string()

static ssize_t unicoap_options_add_uri_queries_string ( unicoap_options_t * options,
const char * queries )
inlinestatic

Adds multiple Uri-Query options from null-terminated string.

Parameters
[in,out]optionsOptions to write to
[in]queriesas null-terminated string of UTF-8 code units with values separated by &
Returns
Zero on success, negative error number otherwise
Return values
`-ENOBUFS`Options buffer lacks sufficient capacity to add options
Precondition
queries size must not exceed 255 bytes

If the string with the values you want to add starts with the separator, you can still use this function. Uses strlen to calculate the number of code units.

See also
unicoap_options_t::unicoap_options_add_uri_queries

Definition at line 1371 of file generated.h.

◆ unicoap_options_add_uri_query()

static ssize_t unicoap_options_add_uri_query ( unicoap_options_t * options,
const char * query,
size_t length )
inlinestatic

Adds Uri-Query option.

Parameters
[in,out]optionsOptions to write to
[in]queryUri-Query value as buffer of UTF-8 code units
lengthNumber of UTF-8 code units in query, excluding null-terminator (if present) in bytes without potential null-terminator
Returns
Zero on success, negative error number otherwise
Return values
`-ENOBUFS`Options buffer lacks sufficient capacity to add options
Precondition
query size must not exceed 255 bytes

Definition at line 1304 of file generated.h.

◆ unicoap_options_add_uri_query_string()

static ssize_t unicoap_options_add_uri_query_string ( unicoap_options_t * options,
const char * query )
inlinestatic

Adds Uri-Query option from null-terminated string.

Parameters
[in,out]optionsOptions to write to
[in]queryUri-Query value as buffer of UTF-8 code units, must be null-terminated
Returns
Zero on success, negative error number otherwise
Return values
`-ENOBUFS`Options buffer lacks sufficient capacity to add options
Precondition
query size must not exceed 255 bytes

Uses strlen to calculate the number of code units.

See also
unicoap_options_t::unicoap_options_add_uri_query

Definition at line 1327 of file generated.h.

◆ unicoap_options_copy_location_path()

static ssize_t unicoap_options_copy_location_path ( const unicoap_options_t * options,
char * path,
size_t capacity )
inlinestatic

Copies absolute location path into the given buffer.

Parameters
[in]optionsOptions to read from
[in,out]pathBuffer of UTF-8 code units
capacityCapacity of path
Returns
Length of string value in bytes on success, negative error number otherwise
Return values
`-EBADOPT`Option corrupted
`-ENOBUFS`path lacks sufficient capacity to copy values
Precondition
capacity must be greater than zero

This function creates a string from all Location-Path options by joining them with the / separator. The string will bear the / prefix even if there is no Location-Path option. The string will not be null-terminated. The resulting string uses UTF-8 encoding.

Definition at line 826 of file generated.h.

◆ unicoap_options_copy_location_queries()

static ssize_t unicoap_options_copy_location_queries ( const unicoap_options_t * options,
char * queries,
size_t capacity )
inlinestatic

Copies location query string into the given buffer.

Parameters
[in]optionsOptions to read from
[in,out]queriesBuffer of UTF-8 code units
capacityCapacity of queries
Returns
Length of string value in bytes on success, negative error number otherwise
Return values
`-EBADOPT`Option corrupted
`-ENOBUFS`queries lacks sufficient capacity to copy values

This function creates a string from all Location-Query options by joining them with the & separator. The string will not be null-terminated. The resulting string uses UTF-8 encoding.

Definition at line 1561 of file generated.h.

◆ unicoap_options_copy_uri_path()

static ssize_t unicoap_options_copy_uri_path ( const unicoap_options_t * options,
char * path,
size_t capacity )
inlinestatic

Copies absolute URI path into the given buffer.

Parameters
[in]optionsOptions to read from
[in,out]pathBuffer of UTF-8 code units
capacityCapacity of path
Returns
Length of string value in bytes on success, negative error number otherwise
Return values
`-EBADOPT`Option corrupted
`-ENOBUFS`path lacks sufficient capacity to copy values
Precondition
capacity must be greater than zero

This function creates a string from all Uri-Path options by joining them with the / separator. The string will bear the / prefix even if there is no Uri-Path option. The string will not be null-terminated. The resulting string uses UTF-8 encoding.

Definition at line 997 of file generated.h.

◆ unicoap_options_copy_uri_queries()

static ssize_t unicoap_options_copy_uri_queries ( const unicoap_options_t * options,
char * queries,
size_t capacity )
inlinestatic

Copies URI query string into the given buffer.

Parameters
[in]optionsOptions to read from
[in,out]queriesBuffer of UTF-8 code units
capacityCapacity of queries
Returns
Length of string value in bytes on success, negative error number otherwise
Return values
`-EBADOPT`Option corrupted
`-ENOBUFS`queries lacks sufficient capacity to copy values

This function creates a string from all Uri-Query options by joining them with the & separator. The string will not be null-terminated. The resulting string uses UTF-8 encoding.

Definition at line 1281 of file generated.h.

◆ unicoap_options_get_accept()

static ssize_t unicoap_options_get_accept ( const unicoap_options_t * options,
unicoap_content_format_t * format )
inlinestatic

Retrieves the Accept option, if present.

Parameters
[in]optionsOptions to read from
[out]formatPointer to value variable
Returns
Size of option value in bytes on success, negative error number otherwise
Return values
`-ENOENT`Option not found
`-EBADOPT`Option corrupted

Definition at line 350 of file generated.h.

◆ unicoap_options_get_block()

static ssize_t unicoap_options_get_block ( const unicoap_options_t * options,
unicoap_option_number_t number,
unicoap_block_option_t * block )
inlinestatic

Retrieves a Block1 or Block2 option.

Parameters
[in]optionsOptions to read from
numberOption number (UNICOAP_OPTION_BLOCK1 or UNICOAP_OPTION_BLOCK2)
[out]blockPointer to variable that will store Block1 or Block2 value
Returns
Size of option value in bytes on success, negative error number otherwise
Return values
`-ENOENT`Option not found
`-EBADOPT`Option corrupted

Definition at line 1775 of file generated.h.

◆ unicoap_options_get_block1()

static ssize_t unicoap_options_get_block1 ( const unicoap_options_t * options,
unicoap_block_option_t * block )
inlinestatic

Retrieves the Block1 option, if present.

Parameters
[in]optionsOptions to read from
[out]blockPointer to value variable
Returns
Size of option value in bytes on success, negative error number otherwise
Return values
`-ENOENT`Option not found
`-EBADOPT`Option corrupted

Definition at line 1814 of file generated.h.

◆ unicoap_options_get_block2()

static ssize_t unicoap_options_get_block2 ( const unicoap_options_t * options,
unicoap_block_option_t * block )
inlinestatic

Retrieves the Block2 option, if present.

Parameters
[in]optionsOptions to read from
[out]blockPointer to value variable
Returns
Size of option value in bytes on success, negative error number otherwise
Return values
`-ENOENT`Option not found
`-EBADOPT`Option corrupted

Definition at line 1862 of file generated.h.

◆ unicoap_options_get_content_format()

static ssize_t unicoap_options_get_content_format ( const unicoap_options_t * options,
unicoap_content_format_t * format )
inlinestatic

Retrieves the Content-Format option, if present.

Parameters
[in]optionsOptions to read from
[out]formatPointer to value variable
Returns
Size of option value in bytes on success, negative error number otherwise
Return values
`-ENOENT`Option not found
`-EBADOPT`Option corrupted

Definition at line 240 of file generated.h.

◆ unicoap_options_get_first_etag()

static ssize_t unicoap_options_get_first_etag ( const unicoap_options_t * options,
const uint8_t ** etag )
inlinestatic

Retrieves the first ETag option, if present.

Parameters
[in]optionsOptions to read from
[out]etagPointer to value variable
Returns
Size of option value in bytes on success, negative error number otherwise
Return values
`-ENOENT`Option not found
`-EBADOPT`Option corrupted

Definition at line 702 of file generated.h.

◆ unicoap_options_get_first_if_match()

static ssize_t unicoap_options_get_first_if_match ( const unicoap_options_t * options,
const uint8_t ** value )
inlinestatic

Retrieves the first If-Match option, if present.

Parameters
[in]optionsOptions to read from
[out]valuePointer to value variable
Returns
Size of option value in bytes on success, negative error number otherwise
Return values
`-ENOENT`Option not found
`-EBADOPT`Option corrupted

Definition at line 623 of file generated.h.

◆ unicoap_options_get_first_location_path_component()

static ssize_t unicoap_options_get_first_location_path_component ( const unicoap_options_t * options,
const char ** component )
inlinestatic

Retrieves the first Location-Path option, if present.

Parameters
[in]optionsOptions to read from
[out]componentPointer to value variable as buffer of UTF-8 code units
Returns
Size of option value in bytes on success, negative error number otherwise
Return values
`-ENOENT`Option not found
`-EBADOPT`Option corrupted

Definition at line 782 of file generated.h.

◆ unicoap_options_get_first_location_query()

static ssize_t unicoap_options_get_first_location_query ( const unicoap_options_t * options,
const char ** query )
inlinestatic

Retrieves the first Location-Query option, if present.

Parameters
[in]optionsOptions to read from
[out]queryPointer to value variable as buffer of UTF-8 code units
Returns
Size of option value in bytes on success, negative error number otherwise
Return values
`-ENOENT`Option not found
`-EBADOPT`Option corrupted

Definition at line 1409 of file generated.h.

◆ unicoap_options_get_first_location_query_by_name()

static ssize_t unicoap_options_get_first_location_query_by_name ( unicoap_options_t * options,
const char * name,
size_t length,
const char ** value )
inlinestatic

Retrieves the first Location-Query option matching the given name,if present.

This method splits Location-Query options at the = character.

Parameters
[in]optionsOptions to read from
[in]nameName of query parameter to find
lengthNumber of UTF-8 code units (bytes) in name
[out]valuePointer to a UTF-8 string variable that will store the entire option, including the name= part
Returns
Size of option value in bytes on success, negative error number otherwise
Return values
`-EBADOPT`Option corrupted
`-1`if the iterator is finished and no matching Location-Query option was found
Note
If you already have an unicoap_options_iterator_t instance allocated somewhere, use it and call unicoap_options_iterator_t::unicoap_options_get_next_location_query_by_name instead.

Definition at line 1504 of file generated.h.

◆ unicoap_options_get_first_location_query_by_name_string()

static ssize_t unicoap_options_get_first_location_query_by_name_string ( unicoap_options_t * options,
const char * name,
const char ** value )
inlinestatic

Retrieves the first Location-Query option matching the given null-terminated name,if present.

This method splits Location-Query options at the = character.

Parameters
[in]optionsOptions to read from
[in]nameName of query parameter to find, must be null-terminated
[out]valuePointer to a UTF-8 string variable that will store the entire option, including the name= part
Returns
Size of option value in bytes on success, negative error number otherwise
Return values
`-EBADOPT`Option corrupted
`-1`if the iterator is finished and no matching Location-Query option was found
Note
If you already have an unicoap_options_iterator_t instance allocated somewhere, use it and call unicoap_options_iterator_t::unicoap_options_get_next_location_query_by_name instead.

Definition at line 1535 of file generated.h.

◆ unicoap_options_get_first_uri_path_component()

static ssize_t unicoap_options_get_first_uri_path_component ( const unicoap_options_t * options,
const char ** component )
inlinestatic

Retrieves the first Uri-Path option, if present.

Parameters
[in]optionsOptions to read from
[out]componentPointer to value variable as buffer of UTF-8 code units
Returns
Size of option value in bytes on success, negative error number otherwise
Return values
`-ENOENT`Option not found
`-EBADOPT`Option corrupted

Definition at line 953 of file generated.h.

◆ unicoap_options_get_first_uri_query()

static ssize_t unicoap_options_get_first_uri_query ( const unicoap_options_t * options,
const char ** query )
inlinestatic

Retrieves the first Uri-Query option, if present.

Parameters
[in]optionsOptions to read from
[out]queryPointer to value variable as buffer of UTF-8 code units
Returns
Size of option value in bytes on success, negative error number otherwise
Return values
`-ENOENT`Option not found
`-EBADOPT`Option corrupted

Definition at line 1129 of file generated.h.

◆ unicoap_options_get_first_uri_query_by_name()

static ssize_t unicoap_options_get_first_uri_query_by_name ( unicoap_options_t * options,
const char * name,
size_t length,
const char ** value )
inlinestatic

Retrieves the first Uri-Query option matching the given name,if present.

This method splits Uri-Query options at the = character.

Parameters
[in]optionsOptions to read from
[in]nameName of query parameter to find
lengthNumber of UTF-8 code units (bytes) in name
[out]valuePointer to a UTF-8 string variable that will store the entire option, including the name= part
Returns
Size of option value in bytes on success, negative error number otherwise
Return values
`-EBADOPT`Option corrupted
`-1`if the iterator is finished and no matching Uri-Query option was found
Note
If you already have an unicoap_options_iterator_t instance allocated somewhere, use it and call unicoap_options_iterator_t::unicoap_options_get_next_uri_query_by_name instead.

Definition at line 1224 of file generated.h.

◆ unicoap_options_get_first_uri_query_by_name_string()

static ssize_t unicoap_options_get_first_uri_query_by_name_string ( unicoap_options_t * options,
const char * name,
const char ** value )
inlinestatic

Retrieves the first Uri-Query option matching the given null-terminated name,if present.

This method splits Uri-Query options at the = character.

Parameters
[in]optionsOptions to read from
[in]nameName of query parameter to find, must be null-terminated
[out]valuePointer to a UTF-8 string variable that will store the entire option, including the name= part
Returns
Size of option value in bytes on success, negative error number otherwise
Return values
`-EBADOPT`Option corrupted
`-1`if the iterator is finished and no matching Uri-Query option was found
Note
If you already have an unicoap_options_iterator_t instance allocated somewhere, use it and call unicoap_options_iterator_t::unicoap_options_get_next_uri_query_by_name instead.

Definition at line 1255 of file generated.h.

◆ unicoap_options_get_if_none_match()

static bool unicoap_options_get_if_none_match ( const unicoap_options_t * options)
inlinestatic

Determines whether the If-None-Match option is present.

Parameters
[in]optionsOptions to read from
Returns
Size of option value in bytes on success, negative error number otherwise
Return values
`-ENOENT`Option not found
`-EBADOPT`Option corrupted

Definition at line 140 of file generated.h.

◆ unicoap_options_get_max_age()

static ssize_t unicoap_options_get_max_age ( const unicoap_options_t * options,
uint32_t * age )
inlinestatic

Retrieves the Max-Age option, if present.

Parameters
[in]optionsOptions to read from
[out]agePointer to value variable
Returns
Size of option value in bytes on success, negative error number otherwise
Return values
`-ENOENT`Option not found
`-EBADOPT`Option corrupted

Definition at line 295 of file generated.h.

◆ unicoap_options_get_next_etag()

static ssize_t unicoap_options_get_next_etag ( unicoap_options_iterator_t * iterator,
const uint8_t ** etag )
inlinestatic

Gets the next ETag option provided by the specified iterator.

Parameters
[in,out]iteratorOption iterator
[out]etagPointer to a variable that will store next etag
See also
unicoap_options_iterator_t::unicoap_options_get_next_by_number
Returns
Size of option value in bytes on success, negative error number otherwise
Return values
`-EBADOPT`Option corrupted
`-1`if the iterator is finished

Definition at line 722 of file generated.h.

◆ unicoap_options_get_next_if_match()

static ssize_t unicoap_options_get_next_if_match ( unicoap_options_iterator_t * iterator,
const uint8_t ** value )
inlinestatic

Gets the next If-Match option provided by the specified iterator.

Parameters
[in,out]iteratorOption iterator
[out]valuePointer to a variable that will store next value
See also
unicoap_options_iterator_t::unicoap_options_get_next_by_number
Returns
Size of option value in bytes on success, negative error number otherwise
Return values
`-EBADOPT`Option corrupted
`-1`if the iterator is finished

Definition at line 643 of file generated.h.

◆ unicoap_options_get_next_location_path_component()

static ssize_t unicoap_options_get_next_location_path_component ( unicoap_options_iterator_t * iterator,
const char ** component )
inlinestatic

Gets the next Location-Path option provided by the specified iterator.

Parameters
[in,out]iteratorOption iterator
[out]componentPointer to a variable that will store next component
See also
unicoap_options_iterator_t::unicoap_options_get_next_by_number
Returns
Size of option value in bytes on success, negative error number otherwise
Return values
`-EBADOPT`Option corrupted
`-1`if the iterator is finished

Definition at line 802 of file generated.h.

◆ unicoap_options_get_next_location_query()

static ssize_t unicoap_options_get_next_location_query ( unicoap_options_iterator_t * iterator,
const char ** query )
inlinestatic

Gets the next Location-Query option provided by the specified iterator.

Parameters
[in,out]iteratorOption iterator
[out]queryPointer to a variable that will store next query
See also
unicoap_options_iterator_t::unicoap_options_get_next_by_number
Returns
Size of option value in bytes on success, negative error number otherwise
Return values
`-EBADOPT`Option corrupted
`-1`if the iterator is finished

Definition at line 1429 of file generated.h.

◆ unicoap_options_get_next_location_query_by_name()

static ssize_t unicoap_options_get_next_location_query_by_name ( unicoap_options_iterator_t * iterator,
const char * name,
size_t length,
const char ** value )
inlinestatic

Gets the next Location-Query option matching the given name, potentially skipping any options in between.

This method splits Location-Query options at the = character.

Parameters
[in,out]iteratorOption iterator
[in]nameName of query parameter to find
lengthNumber of UTF-8 code units (bytes) in name
[out]valuePointer to a UTF-8 string variable that will store the entire option, including the name= part
Returns
Size of option value in bytes on success, negative error number otherwise
Return values
`-EBADOPT`Option corrupted
`-1`if the iterator is finished

Definition at line 1451 of file generated.h.

◆ unicoap_options_get_next_location_query_by_name_string()

static ssize_t unicoap_options_get_next_location_query_by_name_string ( unicoap_options_iterator_t * iterator,
const char * name,
const char ** value )
inlinestatic

Gets the next Location-Query option matching the given name, potentially skipping any options in between.

This method splits Location-Query options at the = character.

Parameters
[in,out]iteratorOption iterator
[in]nameName of query parameter to find, must be null-terminated
[out]valuePointer to a UTF-8 string variable that will store the entire option, including the name= part
Returns
Size of option value in bytes on success, negative error number otherwise
Return values
`-EBADOPT`Option corrupted
`-1`if the iterator is finished

Definition at line 1475 of file generated.h.

◆ unicoap_options_get_next_uri_path_component()

static ssize_t unicoap_options_get_next_uri_path_component ( unicoap_options_iterator_t * iterator,
const char ** component )
inlinestatic

Gets the next Uri-Path option provided by the specified iterator.

Parameters
[in,out]iteratorOption iterator
[out]componentPointer to a variable that will store next component
See also
unicoap_options_iterator_t::unicoap_options_get_next_by_number
Returns
Size of option value in bytes on success, negative error number otherwise
Return values
`-EBADOPT`Option corrupted
`-1`if the iterator is finished

Definition at line 973 of file generated.h.

◆ unicoap_options_get_next_uri_query()

static ssize_t unicoap_options_get_next_uri_query ( unicoap_options_iterator_t * iterator,
const char ** query )
inlinestatic

Gets the next Uri-Query option provided by the specified iterator.

Parameters
[in,out]iteratorOption iterator
[out]queryPointer to a variable that will store next query
See also
unicoap_options_iterator_t::unicoap_options_get_next_by_number
Returns
Size of option value in bytes on success, negative error number otherwise
Return values
`-EBADOPT`Option corrupted
`-1`if the iterator is finished

Definition at line 1149 of file generated.h.

◆ unicoap_options_get_next_uri_query_by_name()

static ssize_t unicoap_options_get_next_uri_query_by_name ( unicoap_options_iterator_t * iterator,
const char * name,
size_t length,
const char ** value )
inlinestatic

Gets the next Uri-Query option matching the given name, potentially skipping any options in between.

This method splits Uri-Query options at the = character.

Parameters
[in,out]iteratorOption iterator
[in]nameName of query parameter to find
lengthNumber of UTF-8 code units (bytes) in name
[out]valuePointer to a UTF-8 string variable that will store the entire option, including the name= part
Returns
Size of option value in bytes on success, negative error number otherwise
Return values
`-EBADOPT`Option corrupted
`-1`if the iterator is finished

Definition at line 1171 of file generated.h.

◆ unicoap_options_get_next_uri_query_by_name_string()

static ssize_t unicoap_options_get_next_uri_query_by_name_string ( unicoap_options_iterator_t * iterator,
const char * name,
const char ** value )
inlinestatic

Gets the next Uri-Query option matching the given name, potentially skipping any options in between.

This method splits Uri-Query options at the = character.

Parameters
[in,out]iteratorOption iterator
[in]nameName of query parameter to find, must be null-terminated
[out]valuePointer to a UTF-8 string variable that will store the entire option, including the name= part
Returns
Size of option value in bytes on success, negative error number otherwise
Return values
`-EBADOPT`Option corrupted
`-1`if the iterator is finished

Definition at line 1195 of file generated.h.

◆ unicoap_options_get_no_response()

static ssize_t unicoap_options_get_no_response ( const unicoap_options_t * options,
uint8_t * value )
inlinestatic

Retrieves the No-Response option, if present.

Parameters
[in]optionsOptions to read from
[out]valuePointer to value variable
Returns
Size of option value in bytes on success, negative error number otherwise
Return values
`-ENOENT`Option not found
`-EBADOPT`Option corrupted

Definition at line 568 of file generated.h.

◆ unicoap_options_get_observe()

static ssize_t unicoap_options_get_observe ( const unicoap_options_t * options,
uint32_t * observe )
inlinestatic

Retrieves the Observe option, if present.

Parameters
[in]optionsOptions to read from
[out]observePointer to value variable
Returns
Size of option value in bytes on success, negative error number otherwise
Return values
`-ENOENT`Option not found
`-EBADOPT`Option corrupted

Definition at line 1695 of file generated.h.

◆ unicoap_options_get_proxy_scheme()

static ssize_t unicoap_options_get_proxy_scheme ( const unicoap_options_t * options,
const char ** scheme )
inlinestatic

Retrieves the Proxy-Scheme option, if present.

Parameters
[in]optionsOptions to read from
[out]schemePointer to value variable as buffer of UTF-8 code units
Returns
Size of option value in bytes on success, negative error number otherwise
Return values
`-ENOENT`Option not found
`-EBADOPT`Option corrupted

Definition at line 405 of file generated.h.

◆ unicoap_options_get_proxy_uri()

static ssize_t unicoap_options_get_proxy_uri ( const unicoap_options_t * options,
const char ** uri )
inlinestatic

Retrieves the Proxy-Uri option, if present.

Parameters
[in]optionsOptions to read from
[out]uriPointer to value variable as buffer of UTF-8 code units
Returns
Size of option value in bytes on success, negative error number otherwise
Return values
`-ENOENT`Option not found
`-EBADOPT`Option corrupted

Definition at line 484 of file generated.h.

◆ unicoap_options_get_size1()

static ssize_t unicoap_options_get_size1 ( const unicoap_options_t * options,
uint32_t * size )
inlinestatic

Retrieves the Size1 option, if present.

Parameters
[in]optionsOptions to read from
[out]sizePointer to value variable
Returns
Size of option value in bytes on success, negative error number otherwise
Return values
`-ENOENT`Option not found
`-EBADOPT`Option corrupted

Definition at line 1910 of file generated.h.

◆ unicoap_options_get_size2()

static ssize_t unicoap_options_get_size2 ( const unicoap_options_t * options,
uint32_t * size )
inlinestatic

Retrieves the Size2 option, if present.

Parameters
[in]optionsOptions to read from
[out]sizePointer to value variable
Returns
Size of option value in bytes on success, negative error number otherwise
Return values
`-ENOENT`Option not found
`-EBADOPT`Option corrupted

Definition at line 1958 of file generated.h.

◆ unicoap_options_get_uri_host()

static ssize_t unicoap_options_get_uri_host ( const unicoap_options_t * options,
const char ** host )
inlinestatic

Retrieves the Uri-Host option, if present.

Parameters
[in]optionsOptions to read from
[out]hostPointer to value variable as buffer of UTF-8 code units
Returns
Size of option value in bytes on success, negative error number otherwise
Return values
`-ENOENT`Option not found
`-EBADOPT`Option corrupted

Definition at line 57 of file generated.h.

◆ unicoap_options_get_uri_port()

static ssize_t unicoap_options_get_uri_port ( const unicoap_options_t * options,
uint16_t * port )
inlinestatic

Retrieves the Uri-Port option, if present.

Parameters
[in]optionsOptions to read from
[out]portPointer to value variable
Returns
Size of option value in bytes on success, negative error number otherwise
Return values
`-ENOENT`Option not found
`-EBADOPT`Option corrupted

Definition at line 185 of file generated.h.

◆ unicoap_options_remove_accept()

static int unicoap_options_remove_accept ( unicoap_options_t * options)
inlinestatic

Removes the Accept option, if present.

Parameters
[in,out]optionsOptions to write to
Returns
Zero on success, negative error number otherwise

Definition at line 382 of file generated.h.

◆ unicoap_options_remove_all_if_match()

static int unicoap_options_remove_all_if_match ( unicoap_options_t * options)
inlinestatic

Removes all If-Match options, if any.

Parameters
[in,out]optionsOptions to write to
Returns
Zero on success, negative error number otherwise

Definition at line 679 of file generated.h.

◆ unicoap_options_remove_block1()

static int unicoap_options_remove_block1 ( unicoap_options_t * options)
inlinestatic

Removes the Block1 option, if present.

Parameters
[in,out]optionsOptions to write to
Returns
Zero on success, negative error number otherwise

Definition at line 1846 of file generated.h.

◆ unicoap_options_remove_block2()

static int unicoap_options_remove_block2 ( unicoap_options_t * options)
inlinestatic

Removes the Block2 option, if present.

Parameters
[in,out]optionsOptions to write to
Returns
Zero on success, negative error number otherwise

Definition at line 1894 of file generated.h.

◆ unicoap_options_remove_content_format()

static int unicoap_options_remove_content_format ( unicoap_options_t * options)
inlinestatic

Removes the Content-Format option, if present.

Parameters
[in,out]optionsOptions to write to
Returns
Zero on success, negative error number otherwise

Definition at line 272 of file generated.h.

◆ unicoap_options_remove_etags()

static int unicoap_options_remove_etags ( unicoap_options_t * options)
inlinestatic

Removes all ETag options, if any.

Parameters
[in,out]optionsOptions to write to
Returns
Zero on success, negative error number otherwise

Definition at line 759 of file generated.h.

◆ unicoap_options_remove_location_path()

static int unicoap_options_remove_location_path ( unicoap_options_t * options)
inlinestatic

Removes all Location-Path options, if any.

Parameters
[in,out]optionsOptions to write to
Returns
Zero on success, negative error number otherwise

Definition at line 930 of file generated.h.

◆ unicoap_options_remove_location_queries()

static int unicoap_options_remove_location_queries ( unicoap_options_t * options)
inlinestatic

Removes all Location-Query options, if any.

Parameters
[in,out]optionsOptions to write to
Returns
Zero on success, negative error number otherwise

Definition at line 1666 of file generated.h.

◆ unicoap_options_remove_max_age()

static int unicoap_options_remove_max_age ( unicoap_options_t * options)
inlinestatic

Removes the Max-Age option, if present.

Parameters
[in,out]optionsOptions to write to
Returns
Zero on success, negative error number otherwise

Definition at line 327 of file generated.h.

◆ unicoap_options_remove_no_response()

static int unicoap_options_remove_no_response ( unicoap_options_t * options)
inlinestatic

Removes the No-Response option, if present.

Parameters
[in,out]optionsOptions to write to
Returns
Zero on success, negative error number otherwise

Definition at line 600 of file generated.h.

◆ unicoap_options_remove_observe()

static int unicoap_options_remove_observe ( unicoap_options_t * options)
inlinestatic

Removes the Observe option, if present.

Parameters
[in,out]optionsOptions to write to
Returns
Zero on success, negative error number otherwise

Definition at line 1727 of file generated.h.

◆ unicoap_options_remove_proxy_scheme()

static int unicoap_options_remove_proxy_scheme ( unicoap_options_t * options)
inlinestatic

Removes the Proxy-Scheme option, if present.

Parameters
[in,out]optionsOptions to write to
Returns
Zero on success, negative error number otherwise

Definition at line 461 of file generated.h.

◆ unicoap_options_remove_proxy_uri()

static int unicoap_options_remove_proxy_uri ( unicoap_options_t * options)
inlinestatic

Removes the Proxy-Uri option, if present.

Parameters
[in,out]optionsOptions to write to
Returns
Zero on success, negative error number otherwise

Definition at line 545 of file generated.h.

◆ unicoap_options_remove_size1()

static int unicoap_options_remove_size1 ( unicoap_options_t * options)
inlinestatic

Removes the Size1 option, if present.

Parameters
[in,out]optionsOptions to write to
Returns
Zero on success, negative error number otherwise

Definition at line 1942 of file generated.h.

◆ unicoap_options_remove_size2()

static int unicoap_options_remove_size2 ( unicoap_options_t * options)
inlinestatic

Removes the Size2 option, if present.

Parameters
[in,out]optionsOptions to write to
Returns
Zero on success, negative error number otherwise

Definition at line 1990 of file generated.h.

◆ unicoap_options_remove_uri_host()

static int unicoap_options_remove_uri_host ( unicoap_options_t * options)
inlinestatic

Removes the Uri-Host option, if present.

Parameters
[in,out]optionsOptions to write to
Returns
Zero on success, negative error number otherwise

Definition at line 118 of file generated.h.

◆ unicoap_options_remove_uri_path()

static int unicoap_options_remove_uri_path ( unicoap_options_t * options)
inlinestatic

Removes all Uri-Path options, if any.

Parameters
[in,out]optionsOptions to write to
Returns
Zero on success, negative error number otherwise

Definition at line 1106 of file generated.h.

◆ unicoap_options_remove_uri_port()

static int unicoap_options_remove_uri_port ( unicoap_options_t * options)
inlinestatic

Removes the Uri-Port option, if present.

Parameters
[in,out]optionsOptions to write to
Returns
Zero on success, negative error number otherwise

Definition at line 217 of file generated.h.

◆ unicoap_options_remove_uri_queries()

static int unicoap_options_remove_uri_queries ( unicoap_options_t * options)
inlinestatic

Removes all Uri-Query options, if any.

Parameters
[in,out]optionsOptions to write to
Returns
Zero on success, negative error number otherwise

Definition at line 1386 of file generated.h.

◆ unicoap_options_set_accept()

static ssize_t unicoap_options_set_accept ( unicoap_options_t * options,
unicoap_content_format_t format )
inlinestatic

Sets the Accept option.

Parameters
[in,out]optionsOptions to write to
formatAccept value
Returns
Zero on success, negative error number otherwise
Return values
`-ENOBUFS`Options buffer lacks sufficient capacity to set option

Definition at line 367 of file generated.h.

◆ unicoap_options_set_block()

static int unicoap_options_set_block ( unicoap_options_t * options,
unicoap_option_number_t number,
unicoap_block_option_t block )
inlinestatic

Sets the Block1 or Block2 option.

Parameters
[in,out]optionsOptions to write to
numberOption number (UNICOAP_OPTION_BLOCK1 or UNICOAP_OPTION_BLOCK2)
blockBlock1 or Block2 value
Returns
Zero on success, negative error number otherwise
Return values
`-ENOBUFS`Options buffer lacks sufficient capacity to set option

Definition at line 1794 of file generated.h.

◆ unicoap_options_set_block1()

static ssize_t unicoap_options_set_block1 ( unicoap_options_t * options,
unicoap_block_option_t block )
inlinestatic

Sets the Block1 option.

Parameters
[in,out]optionsOptions to write to
blockBlock1 value
Returns
Zero on success, negative error number otherwise
Return values
`-ENOBUFS`Options buffer lacks sufficient capacity to set option

Definition at line 1831 of file generated.h.

◆ unicoap_options_set_block2()

static ssize_t unicoap_options_set_block2 ( unicoap_options_t * options,
unicoap_block_option_t block )
inlinestatic

Sets the Block2 option.

Parameters
[in,out]optionsOptions to write to
blockBlock2 value
Returns
Zero on success, negative error number otherwise
Return values
`-ENOBUFS`Options buffer lacks sufficient capacity to set option

Definition at line 1879 of file generated.h.

◆ unicoap_options_set_content_format()

static ssize_t unicoap_options_set_content_format ( unicoap_options_t * options,
unicoap_content_format_t format )
inlinestatic

Sets the Content-Format option.

Parameters
[in,out]optionsOptions to write to
formatContent-Format value
Returns
Zero on success, negative error number otherwise
Return values
`-ENOBUFS`Options buffer lacks sufficient capacity to set option

Definition at line 257 of file generated.h.

◆ unicoap_options_set_if_none_match()

static ssize_t unicoap_options_set_if_none_match ( unicoap_options_t * options,
bool value )
inlinestatic

Sets the If-None-Match option.

Parameters
[in,out]optionsOptions to write to
valueIf-None-Match value
Returns
Zero on success, negative error number otherwise
Return values
`-ENOBUFS`Options buffer lacks sufficient capacity to set option

Definition at line 155 of file generated.h.

◆ unicoap_options_set_max_age()

static ssize_t unicoap_options_set_max_age ( unicoap_options_t * options,
uint32_t age )
inlinestatic

Sets the Max-Age option.

Parameters
[in,out]optionsOptions to write to
ageMax-Age value
Returns
Zero on success, negative error number otherwise
Return values
`-ENOBUFS`Options buffer lacks sufficient capacity to set option

Definition at line 312 of file generated.h.

◆ unicoap_options_set_no_response()

static ssize_t unicoap_options_set_no_response ( unicoap_options_t * options,
uint8_t value )
inlinestatic

Sets the No-Response option.

Parameters
[in,out]optionsOptions to write to
valueNo-Response value
Returns
Zero on success, negative error number otherwise
Return values
`-ENOBUFS`Options buffer lacks sufficient capacity to set option

Definition at line 585 of file generated.h.

◆ unicoap_options_set_observe()

static ssize_t unicoap_options_set_observe ( unicoap_options_t * options,
uint32_t observe )
inlinestatic

Sets the Observe option.

Parameters
[in,out]optionsOptions to write to
observeObserve value
Returns
Zero on success, negative error number otherwise
Return values
`-ENOBUFS`Options buffer lacks sufficient capacity to set option

Definition at line 1712 of file generated.h.

◆ unicoap_options_set_observe_generated()

int unicoap_options_set_observe_generated ( unicoap_options_t * options)

Sets the Observe option to a randomly generated value.

Parameters
[in]optionsOptions to read from
Returns
Zero on success, negative error number otherwise
Return values
`-ENOBUFS`Options buffer lacks sufficient capacity to set option

◆ unicoap_options_set_proxy_scheme()

static ssize_t unicoap_options_set_proxy_scheme ( unicoap_options_t * options,
const char * scheme,
size_t length )
inlinestatic

Sets the Proxy-Scheme option.

Parameters
[in,out]optionsOptions to write to
[in]schemeProxy-Scheme value as buffer of UTF-8 code units
lengthNumber of UTF-8 code units in scheme, excluding null-terminator (if present) in bytes without potential null-terminator
Returns
Zero on success, negative error number otherwise
Return values
`-ENOBUFS`Options buffer lacks sufficient capacity to set option

Definition at line 425 of file generated.h.

◆ unicoap_options_set_proxy_scheme_string()

static ssize_t unicoap_options_set_proxy_scheme_string ( unicoap_options_t * options,
const char * scheme )
inlinestatic

Sets the Proxy-Scheme option from null-terminated string.

Parameters
[in,out]optionsOptions to write to
[in]schemeProxy-Scheme value as buffer of UTF-8 code units, must be null-terminated
Returns
Zero on success, negative error number otherwise
Return values
`-ENOBUFS`Options buffer lacks sufficient capacity to set option

Uses strlen to calculate the number of code units.

See also
unicoap_options_t::unicoap_options_set_proxy_scheme

Definition at line 446 of file generated.h.

◆ unicoap_options_set_proxy_uri()

static ssize_t unicoap_options_set_proxy_uri ( unicoap_options_t * options,
const char * uri,
size_t length )
inlinestatic

Sets the Proxy-Uri option.

Parameters
[in,out]optionsOptions to write to
[in]uriProxy-Uri value as buffer of UTF-8 code units
lengthNumber of UTF-8 code units in uri, excluding null-terminator (if present) in bytes without potential null-terminator
Returns
Zero on success, negative error number otherwise
Return values
`-ENOBUFS`Options buffer lacks sufficient capacity to set option
Precondition
uri must be at least of size 1 bytes
uri size must not exceed 1034 bytes

Definition at line 506 of file generated.h.

◆ unicoap_options_set_proxy_uri_string()

static ssize_t unicoap_options_set_proxy_uri_string ( unicoap_options_t * options,
const char * uri )
inlinestatic

Sets the Proxy-Uri option from null-terminated string.

Parameters
[in,out]optionsOptions to write to
[in]uriProxy-Uri value as buffer of UTF-8 code units, must be null-terminated
Returns
Zero on success, negative error number otherwise
Return values
`-ENOBUFS`Options buffer lacks sufficient capacity to set option
Precondition
uri must be at least of size 1 bytes
uri size must not exceed 1034 bytes

Uses strlen to calculate the number of code units.

See also
unicoap_options_t::unicoap_options_set_proxy_uri

Definition at line 530 of file generated.h.

◆ unicoap_options_set_size1()

static ssize_t unicoap_options_set_size1 ( unicoap_options_t * options,
uint32_t size )
inlinestatic

Sets the Size1 option.

Parameters
[in,out]optionsOptions to write to
sizeSize1 value
Returns
Zero on success, negative error number otherwise
Return values
`-ENOBUFS`Options buffer lacks sufficient capacity to set option

Definition at line 1927 of file generated.h.

◆ unicoap_options_set_size2()

static ssize_t unicoap_options_set_size2 ( unicoap_options_t * options,
uint32_t size )
inlinestatic

Sets the Size2 option.

Parameters
[in,out]optionsOptions to write to
sizeSize2 value
Returns
Zero on success, negative error number otherwise
Return values
`-ENOBUFS`Options buffer lacks sufficient capacity to set option

Definition at line 1975 of file generated.h.

◆ unicoap_options_set_uri_host()

static ssize_t unicoap_options_set_uri_host ( unicoap_options_t * options,
const char * host,
size_t length )
inlinestatic

Sets the Uri-Host option.

Parameters
[in,out]optionsOptions to write to
[in]hostUri-Host value as buffer of UTF-8 code units
lengthNumber of UTF-8 code units in host, excluding null-terminator (if present) in bytes without potential null-terminator
Returns
Zero on success, negative error number otherwise
Return values
`-ENOBUFS`Options buffer lacks sufficient capacity to set option
Precondition
host must be at least of size 1 bytes
host size must not exceed 255 bytes

Definition at line 79 of file generated.h.

◆ unicoap_options_set_uri_host_string()

static ssize_t unicoap_options_set_uri_host_string ( unicoap_options_t * options,
const char * host )
inlinestatic

Sets the Uri-Host option from null-terminated string.

Parameters
[in,out]optionsOptions to write to
[in]hostUri-Host value as buffer of UTF-8 code units, must be null-terminated
Returns
Zero on success, negative error number otherwise
Return values
`-ENOBUFS`Options buffer lacks sufficient capacity to set option
Precondition
host must be at least of size 1 bytes
host size must not exceed 255 bytes

Uses strlen to calculate the number of code units.

See also
unicoap_options_t::unicoap_options_set_uri_host

Definition at line 103 of file generated.h.

◆ unicoap_options_set_uri_port()

static ssize_t unicoap_options_set_uri_port ( unicoap_options_t * options,
uint16_t port )
inlinestatic

Sets the Uri-Port option.

Parameters
[in,out]optionsOptions to write to
portUri-Port value
Returns
Zero on success, negative error number otherwise
Return values
`-ENOBUFS`Options buffer lacks sufficient capacity to set option

Definition at line 202 of file generated.h.