Go to the documentation of this file.
56 #define COAP_ASYNC_CONFIRM 0x01
57 #define COAP_ASYNC_SEPARATE 0x02
58 #define COAP_ASYNC_OBSERVED 0x04
61 #define COAP_ASYNC_RELEASE_DATA 0x08
struct coap_async_state_t * next
internally used for linking
uint8_t token[8]
the token to use in a response
COAP_STATIC_INLINE void coap_touch_async(coap_async_state_t *s)
Updates the time stamp of s.
uint64_t coap_tick_t
This data type represents internal timer ticks with COAP_TICKS_PER_SECOND resolution.
void coap_ticks(coap_tick_t *t)
Sets t to the internal time with COAP_TICKS_PER_SECOND resolution.
The CoAP stack's global state is stored in a coap_context_t object.
void * appdata
This field can be used to register opaque application data with the asynchronous state object.
structure for CoAP PDUs token, if any, follows the fixed size header, then options until payload mark...
struct coap_async_state_t coap_async_state_t
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_tid_t id
transaction id
coap_tick_t created
Holds the internal time when the object was registered with a resource.
int coap_tid_t
coap_tid_t is used to store CoAP transaction id, i.e.
coap_session_t * session
transaction session
#define COAP_STATIC_INLINE
unsigned char flags
holds the flags to control behaviour
int coap_remove_async(coap_context_t *context, coap_session_t *session, coap_tid_t id, coap_async_state_t **s)
Removes the state object identified by id from context.
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.
coap_async_state_t * coap_find_async(coap_context_t *context, coap_session_t *session, coap_tid_t id)
Retrieves the object identified by id from the list of asynchronous transactions that are registered ...
size_t tokenlen
length of the token