15 #ifndef _COAP_ASYNC_H_ 16 #define _COAP_ASYNC_H_ 57 #define COAP_ASYNC_CONFIRM 0x01 58 #define COAP_ASYNC_SEPARATE 0x02 59 #define COAP_ASYNC_OBSERVED 0x04 62 #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...
multi-purpose address abstraction
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_address_t peer
the peer to notify
unsigned long coap_tick_t
This data type represents internal timer ticks with COAP_TICKS_PER_SECOND resolution.
coap_tid_t id
transaction id
Header structure for CoAP PDUs.
struct coap_async_state_t coap_async_state_t
coap_async_state_t * coap_register_async(coap_context_t *context, coap_address_t *peer, 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_ticks(coap_tick_t *t)
Sets t to the internal time with COAP_TICKS_PER_SECOND resolution.
static void coap_touch_async(coap_async_state_t *s)
Updates the time stamp of s.
int coap_remove_async(coap_context_t *context, coap_tid_t id, coap_async_state_t **s)
Removes the state object identified by id from context.
coap_async_state_t * coap_find_async(coap_context_t *context, 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.
unsigned short message_id
id of last message seen
size_t tokenlen
length of the token
unsigned char token[]
the token to use in a response
struct coap_async_state_t * next
internally used for linking
The CoAP stack's global state is stored in a coap_context_t object.