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 coap_tick_t created
Holds the internal time when the object was registered with a resource.
void * appdata
This field can be used to register opaque application data with the asynchronous state object...
int coap_tid_t
coap_tid_t is used to store CoAP transaction id, i.e.
unsigned char flags
holds the flags to control behaviour
COAP_STATIC_INLINE void coap_touch_async(coap_async_state_t *s)
Updates the time stamp of s.
coap_tid_t id
transaction id
coap_session_t * session
transaction session
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
uint64_t coap_tick_t
This data type represents internal timer ticks with COAP_TICKS_PER_SECOND resolution.
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...
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.
void coap_ticks(coap_tick_t *t)
Sets t to the internal time with COAP_TICKS_PER_SECOND resolution.
#define COAP_STATIC_INLINE
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 ...
void coap_free_async(coap_async_state_t *state)
Releases the memory that was allocated by coap_async_state_init() for the object s.
uint8_t token[8]
the token to use in a response
size_t tokenlen
length of the token
struct coap_async_state_t * next
internally used for linking
The CoAP stack's global state is stored in a coap_context_t object.