libcoap  4.3.0beta
coap_resource_t Struct Reference

#include <resource.h>

+ Collaboration diagram for coap_resource_t:

Data Fields

unsigned int dirty:1
 set to 1 if resource has changed More...
 
unsigned int partiallydirty:1
 set to 1 if some subscribers have not yet been notified of the last change More...
 
unsigned int observable:1
 can be observed More...
 
unsigned int cacheable:1
 can be cached More...
 
unsigned int is_unknown:1
 resource created for unknown handler More...
 
unsigned int is_proxy_uri:1
 resource created for proxy URI handler More...
 
coap_method_handler_t handler [7]
 Used to store handlers for the seven coap methods GET, POST, PUT, DELETE, FETCH, PATCH and IPATCH. More...
 
UT_hash_handle hh
 
coap_attr_tlink_attr
 attributes to be included with the link format More...
 
coap_subscription_tsubscribers
 list of observers for this resource More...
 
coap_str_const_turi_path
 Request URI Path for this resource. More...
 
int flags
 
unsigned int observe
 The next value for the Observe option. More...
 
coap_context_tcontext
 Pointer back to the context that 'owns' this resource. More...
 
size_t proxy_name_count
 Count of valid names this host is known by (proxy support) More...
 
coap_str_const_t ** proxy_name_list
 Array valid names this host is known by (proxy support) More...
 
void * user_data
 This pointer is under user control. More...
 

Detailed Description

Definition at line 85 of file resource.h.

Field Documentation

◆ cacheable

unsigned int coap_resource_t::cacheable

can be cached

Definition at line 90 of file resource.h.

◆ context

coap_context_t* coap_resource_t::context

Pointer back to the context that 'owns' this resource.

Definition at line 125 of file resource.h.

◆ dirty

unsigned int coap_resource_t::dirty

set to 1 if resource has changed

Definition at line 86 of file resource.h.

◆ flags

int coap_resource_t::flags

Definition at line 114 of file resource.h.

◆ handler

coap_method_handler_t coap_resource_t::handler[7]

Used to store handlers for the seven coap methods GET, POST, PUT, DELETE, FETCH, PATCH and IPATCH.

coap_dispatch() will pass incoming requests to the handler that corresponds to its request method or generate a 4.05 response if no handler is available.

Definition at line 101 of file resource.h.

◆ hh

UT_hash_handle coap_resource_t::hh

Definition at line 103 of file resource.h.

◆ is_proxy_uri

unsigned int coap_resource_t::is_proxy_uri

resource created for proxy URI handler

Definition at line 92 of file resource.h.

◆ is_unknown

unsigned int coap_resource_t::is_unknown

resource created for unknown handler

Definition at line 91 of file resource.h.

◆ link_attr

coap_attr_t* coap_resource_t::link_attr

attributes to be included with the link format

Definition at line 105 of file resource.h.

◆ observable

unsigned int coap_resource_t::observable

can be observed

Definition at line 89 of file resource.h.

◆ observe

unsigned int coap_resource_t::observe

The next value for the Observe option.

This field must be increased each time the resource changes. Only the lower 24 bits are sent.

Definition at line 120 of file resource.h.

◆ partiallydirty

unsigned int coap_resource_t::partiallydirty

set to 1 if some subscribers have not yet been notified of the last change

Definition at line 87 of file resource.h.

◆ proxy_name_count

size_t coap_resource_t::proxy_name_count

Count of valid names this host is known by (proxy support)

Definition at line 130 of file resource.h.

◆ proxy_name_list

coap_str_const_t** coap_resource_t::proxy_name_list

Array valid names this host is known by (proxy support)

Definition at line 135 of file resource.h.

◆ subscribers

coap_subscription_t* coap_resource_t::subscribers

list of observers for this resource

Definition at line 106 of file resource.h.

◆ uri_path

coap_str_const_t* coap_resource_t::uri_path

Request URI Path for this resource.

This field will point into static or allocated memory which must remain there for the duration of the resource. the key used for hash lookup for this resource

Definition at line 113 of file resource.h.

◆ user_data

void* coap_resource_t::user_data

This pointer is under user control.

It can be used to store context for the coap handler.

Definition at line 141 of file resource.h.


The documentation for this struct was generated from the following file: