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
 < The hash table or list of known resources. More...
 
struct coap_async_state_tasync_state
 The 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 77 of file net.h.

Field Documentation

struct coap_async_state_t* coap_context_t::async_state

The list of asynchronous transactions.

Definition at line 86 of file net.h.

coap_endpoint_t* coap_context_t::endpoint

The endpoint used for listening.

Definition at line 94 of file net.h.

coap_opt_filter_t coap_context_t::known_options

Definition at line 78 of file net.h.

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 117 of file net.h.

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

Definition at line 132 of file net.h.

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 127 of file net.h.

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 123 of file net.h.

struct coap_resource_t* coap_context_t::resources

< The hash table or list of known resources.

Definition at line 81 of file net.h.

coap_response_handler_t coap_context_t::response_handler

Definition at line 125 of file net.h.

coap_queue_t* coap_context_t::sendqueue

Definition at line 93 of file net.h.

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 92 of file net.h.

int coap_context_t::sockfd

send/receive socket

Definition at line 97 of file net.h.


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