39 #ifndef COAP_OBSERVE_H_
40 #define COAP_OBSERVE_H_
46 typedef struct coap_observable {
47 uint32_t observe_clock;
48 struct stimer orphan_timer;
50 coap_packet_t notification;
51 uint8_t buffer[COAP_MAX_PACKET_SIZE + 1];
54 typedef struct coap_observer {
55 struct coap_observer *next;
61 uint8_t token[COAP_TOKEN_LEN];
66 struct etimer retrans_timer;
67 uint8_t retrans_counter;
70 list_t coap_get_observers(
void);
72 coap_observer_t *coap_add_observer(uip_ipaddr_t *addr, uint16_t port,
73 const uint8_t *token,
size_t token_len,
76 void coap_remove_observer(coap_observer_t *o);
77 int coap_remove_observer_by_client(uip_ipaddr_t *addr, uint16_t port);
78 int coap_remove_observer_by_token(uip_ipaddr_t *addr, uint16_t port,
79 uint8_t *token,
size_t token_len);
80 int coap_remove_observer_by_uri(uip_ipaddr_t *addr, uint16_t port,
82 int coap_remove_observer_by_mid(uip_ipaddr_t *addr, uint16_t port,
85 void coap_notify_observers(resource_t *resource);
87 void coap_observe_handler(resource_t *resource,
void *request,
Second timer library header file.
void ** list_t
The linked list type.
An implementation of the Constrained Application Protocol (RFC).
CoAP module for reliable transport