44 #ifndef COAP_OBSERVE_H_ 45 #define COAP_OBSERVE_H_ 51 #define COAP_OBSERVER_URL_LEN 20 53 typedef struct coap_observer {
54 struct coap_observer *next;
56 char url[COAP_OBSERVER_URL_LEN];
57 coap_endpoint_t endpoint;
59 uint8_t token[COAP_TOKEN_LEN];
64 coap_timer_t retrans_timer;
65 uint8_t retrans_counter;
68 void coap_remove_observer(coap_observer_t *o);
69 int coap_remove_observer_by_client(
const coap_endpoint_t *ep);
70 int coap_remove_observer_by_token(
const coap_endpoint_t *ep,
71 uint8_t *token,
size_t token_len);
72 int coap_remove_observer_by_uri(
const coap_endpoint_t *ep,
74 int coap_remove_observer_by_mid(
const coap_endpoint_t *ep,
77 void coap_notify_observers(coap_resource_t *resource);
78 void coap_notify_observers_sub(coap_resource_t *resource,
const char *subpath);
80 void coap_observe_handler(coap_resource_t *resource, coap_message_t *request,
81 coap_message_t *response);
83 uint8_t coap_has_observers(
char *path);
CoAP engine implementation.
CoAP module for reliable transport
An implementation of the Constrained Application Protocol (RFC 7252).