ProsecCoAP 🥂
 
Loading...
Searching...
No Matches
Coap::Option Struct Reference

A CoAP option. More...

#include <ProsecCoAP.h>

Public Member Functions

 Option ()
 
 Option (OptionNumber number, const uint8_t *value, size_t length)
 Build a CoAP option.
 

Public Attributes

OptionNumber number
 The option number.
 
const uint8_t * value
 Pointer to the option value.
 
size_t length
 Length of the option value in bytes.
 

Detailed Description

A CoAP option.

It references an option within a CoAP message.

Constructor & Destructor Documentation

◆ Option() [1/2]

Coap::Option::Option ( )
inline

◆ Option() [2/2]

Coap::Option::Option ( OptionNumber number,
const uint8_t * value,
size_t length )
inline

Build a CoAP option.

Parameters
numberThe option number.
valueThe option value.
lengthThe length of the option value in bytes.

Member Data Documentation

◆ length

size_t Coap::Option::length

Length of the option value in bytes.

◆ number

OptionNumber Coap::Option::number

The option number.

This is initialized to 0 to indicate an empty (invalid) option.

◆ value

const uint8_t* Coap::Option::value

Pointer to the option value.

The pointer is valid as long as the pointed buffer exists.


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