44 #ifndef COAP_OBSERVE_H_ 45 #define COAP_OBSERVE_H_ 51 typedef struct coap_observer {
52 struct coap_observer *next;
54 char url[COAP_OBSERVER_URL_LEN];
55 coap_endpoint_t endpoint;
57 uint8_t token[COAP_TOKEN_LEN];
62 coap_timer_t retrans_timer;
63 uint8_t retrans_counter;
66 void coap_remove_observer(coap_observer_t *o);
67 int coap_remove_observer_by_client(
const coap_endpoint_t *ep);
68 int coap_remove_observer_by_token(
const coap_endpoint_t *ep,
69 uint8_t *token,
size_t token_len);
70 int coap_remove_observer_by_uri(
const coap_endpoint_t *ep,
72 int coap_remove_observer_by_mid(
const coap_endpoint_t *ep,
75 void coap_notify_observers(coap_resource_t *resource);
76 void coap_notify_observers_sub(coap_resource_t *resource,
const char *subpath);
78 void coap_observe_handler(coap_resource_t *resource, coap_message_t *request,
79 coap_message_t *response);
81 uint8_t coap_has_observers(
char *path);
CoAP engine implementation.
CoAP module for reliable transport
An implementation of the Constrained Application Protocol (RFC 7252).