55 #define COAP_ASYNC_CONFIRM 0x01
56 #define COAP_ASYNC_SEPARATE 0x02
59 #define COAP_ASYNC_RELEASE_DATA 0x08
void coap_delete_all_async(coap_context_t *context)
Removes and frees off all of the async entries for the given context.
void coap_ticks(coap_tick_t *t)
Sets t to the internal time with COAP_TICKS_PER_SECOND resolution.
uint64_t coap_tick_t
This data type represents internal timer ticks with COAP_TICKS_PER_SECOND resolution.
coap_async_state_t * coap_find_async(coap_context_t *context, coap_session_t *session, coap_mid_t id)
Retrieves the object identified by id from the list of asynchronous transactions that are registered ...
struct coap_async_state_t coap_async_state_t
coap_async_state_t * coap_register_async(coap_context_t *context, coap_session_t *session, coap_pdu_t *request, unsigned char flags, void *data)
Allocates a new coap_async_state_t object and fills its fields according to the given request.
void coap_free_async(coap_async_state_t *state)
Releases the memory that was allocated by coap_async_state_init() for the object s.
COAP_STATIC_INLINE void coap_touch_async(coap_async_state_t *s)
Updates the time stamp of s.
int coap_remove_async(coap_context_t *context, coap_session_t *session, coap_mid_t id, coap_async_state_t **s)
Removes the state object identified by id from context.
#define COAP_STATIC_INLINE
int coap_mid_t
coap_mid_t is used to store the CoAP Message ID of a CoAP PDU.
coap_tick_t created
Holds the internal time when the object was registered with a resource.
unsigned char flags
holds the flags to control behaviour
void * appdata
This field can be used to register opaque application data with the asynchronous state object.
size_t tokenlen
length of the token
coap_session_t * session
transaction session
struct coap_async_state_t * next
internally used for linking
uint8_t token[8]
the token to use in a response
The CoAP stack's global state is stored in a coap_context_t object.
structure for CoAP PDUs token, if any, follows the fixed size header, then options until payload mark...