Loading...
Searching...
No Matches

Shared functionality for CoRE Resource Directory endpoints. More...

Detailed Description

Shared functionality for CoRE Resource Directory endpoints.

Files

file  common.h
 Shared CoRE RD endpoint functions.
 

Functions

void cord_common_init (void)
 Generate unique endpoint identifier (ep)
 
static const char * cord_common_get_ep (void)
 Get the local endpoint identifier.
 
int cord_common_add_qstring (coap_pkt_t *pkt)
 Add selected query string options to a gcoap request.
 

Variables

char cord_common_ep []
 Export the local endpoint identifier.
 

Function Documentation

◆ cord_common_add_qstring()

int cord_common_add_qstring ( coap_pkt_t pkt)

Add selected query string options to a gcoap request.

This function adds:

  • ep -> as extracted by cord_common_get_ep()
  • [optional] lt -> if defined by CONFIG_CORD_LT
  • [optional] 'd' -> if defined by CORD_D
Returns
0 on success
<0 on error

◆ cord_common_get_ep()

static const char * cord_common_get_ep ( void  )
inlinestatic

Get the local endpoint identifier.

Definition at line 45 of file common.h.

Variable Documentation

◆ cord_common_ep

char cord_common_ep[]
extern

Export the local endpoint identifier.

Note
Use cord_common_get_ep() for accessing the endpoint identifier