libcoap  4.1.2
Data Fields
coap_context_t Struct Reference

The CoAP stack's global state is stored in a coap_context_t object. More...

#include <net.h>

Collaboration diagram for coap_context_t:
[legend]

Data Fields

coap_opt_filter_t known_options
 
struct coap_resource_tresources
 hash table or list of known resources More...
 
struct coap_async_state_tasync_state
 list of asynchronous transactions More...
 
coap_tick_t sendqueue_basetime
 The time stamp in the first element of the sendqeue is relative to sendqueue_basetime. More...
 
coap_queue_tsendqueue
 
coap_endpoint_tendpoint
 the endpoint used for listening More...
 
int sockfd
 send/receive socket More...
 
unsigned short message_id
 The last message id that was used is stored in this field. More...
 
unsigned int observe
 The next value to be used for Observe. More...
 
coap_response_handler_t response_handler
 
ssize_t(* network_send )(struct coap_context_t *context, const coap_endpoint_t *local_interface, const coap_address_t *dst, unsigned char *data, size_t datalen)
 
ssize_t(* network_read )(coap_endpoint_t *ep, coap_packet_t **packet)
 

Detailed Description

The CoAP stack's global state is stored in a coap_context_t object.

Definition at line 76 of file net.h.

Field Documentation

§ async_state

struct coap_async_state_t* coap_context_t::async_state

list of asynchronous transactions

Definition at line 83 of file net.h.

§ endpoint

coap_endpoint_t* coap_context_t::endpoint

the endpoint used for listening

Definition at line 91 of file net.h.

§ known_options

coap_opt_filter_t coap_context_t::known_options

Definition at line 77 of file net.h.

§ message_id

unsigned short coap_context_t::message_id

The last message id that was used is stored in this field.

The initial value is set by coap_new_context() and is usually a random value. A new message id can be created with coap_new_message_id().

Definition at line 114 of file net.h.

§ network_read

ssize_t(* coap_context_t::network_read) (coap_endpoint_t *ep, coap_packet_t **packet)

Definition at line 129 of file net.h.

§ network_send

ssize_t(* coap_context_t::network_send) (struct coap_context_t *context, const coap_endpoint_t *local_interface, const coap_address_t *dst, unsigned char *data, size_t datalen)

Definition at line 124 of file net.h.

§ observe

unsigned int coap_context_t::observe

The next value to be used for Observe.

This field is global for all resources and will be updated when notifications are created.

Definition at line 120 of file net.h.

§ resources

struct coap_resource_t* coap_context_t::resources

hash table or list of known resources

Definition at line 78 of file net.h.

§ response_handler

coap_response_handler_t coap_context_t::response_handler

Definition at line 122 of file net.h.

§ sendqueue

coap_queue_t* coap_context_t::sendqueue

Definition at line 90 of file net.h.

§ sendqueue_basetime

coap_tick_t coap_context_t::sendqueue_basetime

The time stamp in the first element of the sendqeue is relative to sendqueue_basetime.

Definition at line 89 of file net.h.

§ sockfd

int coap_context_t::sockfd

send/receive socket

Definition at line 94 of file net.h.


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