44#ifndef COAP_OBSERVE_H_
45#define COAP_OBSERVE_H_
51typedef 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;
66void coap_remove_observer(coap_observer_t *o);
67int coap_remove_observer_by_client(
const coap_endpoint_t *ep);
68int coap_remove_observer_by_token(
const coap_endpoint_t *ep,
69 uint8_t *token,
size_t token_len);
70int coap_remove_observer_by_uri(
const coap_endpoint_t *ep,
72int coap_remove_observer_by_mid(
const coap_endpoint_t *ep,
75void coap_notify_observers(coap_resource_t *resource);
76void coap_notify_observers_sub(coap_resource_t *resource,
const char *subpath);
78void coap_observe_handler(
const coap_resource_t *resource,
79 coap_message_t *request,
80 coap_message_t *response);
82uint8_t coap_has_observers(
char *path);
CoAP engine implementation.
CoAP module for reliable transport.
An implementation of the Constrained Application Protocol (RFC 7252).