39 #ifndef COAP_OBSERVE_H_
40 #define COAP_OBSERVE_H_
46 #define COAP_OBSERVER_URL_LEN 20
48 typedef struct coap_observable {
49 uint32_t observe_clock;
50 struct stimer orphan_timer;
52 coap_packet_t notification;
53 uint8_t buffer[COAP_MAX_PACKET_SIZE + 1];
56 typedef struct coap_observer {
57 struct coap_observer *next;
59 char url[COAP_OBSERVER_URL_LEN];
63 uint8_t token[COAP_TOKEN_LEN];
68 struct etimer retrans_timer;
69 uint8_t retrans_counter;
72 list_t coap_get_observers(
void);
73 void coap_remove_observer(coap_observer_t *o);
74 int coap_remove_observer_by_client(uip_ipaddr_t *
addr, uint16_t port);
75 int coap_remove_observer_by_token(uip_ipaddr_t *
addr, uint16_t port,
76 uint8_t *token,
size_t token_len);
77 int coap_remove_observer_by_uri(uip_ipaddr_t *
addr, uint16_t port,
79 int coap_remove_observer_by_mid(uip_ipaddr_t *
addr, uint16_t port,
82 void coap_notify_observers(resource_t *resource);
83 void coap_notify_observers_sub(resource_t *resource,
const char *subpath);
85 void coap_observe_handler(resource_t *resource,
void *request,
static uip_ds6_addr_t * addr
Pointer to a router list entry.
CoAP module for reliable transport
void ** list_t
The linked list type.
Second timer library header file.
An implementation of the Constrained Application Protocol (RFC).