Embedded SDK
Embedded SDK
Loading...
Searching...
No Matches
Classes | Macros | Typedefs
tlv_internals.h File Reference
#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
Include dependency graph for tlv_internals.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  TLV_reception_internal_t
 

Macros

#define __X_DEFINE_TLV__TAG_ASSIGN(value, name, callback, unicity)   name = value,
 Internal macro — assigns the tag's enum value.
 
#define __X_DEFINE_TLV__TAG_INDEX(value, name, callback, unicity)   name##_INDEX,
 Internal macro — creates an index enum for mapping tags to their order in the list.
 
#define __X_DEFINE_TLV__TAG_FLAG(value, name, callback, unicity)    name##_FLAG = ((TLV_flag_t) 1 << name##_INDEX),
 Internal macro — creates a flag enum for mapping tags to their reception flag.
 
#define __X_DEFINE_TLV__TAG_TO_FLAG_CASE(value, name, callback, unicity)
 Internal macro — expands to a switch case that maps a tag to its flag.
 
#define __X_DEFINE_TLV__TAG_CALLBACKS(value, name, callback, unicity)
 Internal macro — expands each tag into an _internal_tlv_handler_t array element.
 

Typedefs

typedef uint32_t TLV_tag_t
 
typedef uint64_t TLV_flag_t
 
typedef TLV_flag_t() tag_to_flag_function_t(TLV_tag_t tag)
 

Macro Definition Documentation

◆ __X_DEFINE_TLV__TAG_ASSIGN

#define __X_DEFINE_TLV__TAG_ASSIGN (   value,
  name,
  callback,
  unicity 
)    name = value,

Internal macro — assigns the tag's enum value.

Note
Do not use directly.

Definition at line 32 of file tlv_internals.h.

◆ __X_DEFINE_TLV__TAG_CALLBACKS

#define __X_DEFINE_TLV__TAG_CALLBACKS (   value,
  name,
  callback,
  unicity 
)
Value:
{.tag = name, \
.func = (tlv_handler_cb_t *) callback, \
.is_unique = (unicity == ENFORCE_UNIQUE_TAG)},
bool() tlv_handler_cb_t(const tlv_data_t *data, void *tlv_extracted)
@ ENFORCE_UNIQUE_TAG

Internal macro — expands each tag into an _internal_tlv_handler_t array element.

Note
Do not use directly.

Definition at line 59 of file tlv_internals.h.

◆ __X_DEFINE_TLV__TAG_FLAG

#define __X_DEFINE_TLV__TAG_FLAG (   value,
  name,
  callback,
  unicity 
)     name##_FLAG = ((TLV_flag_t) 1 << name##_INDEX),

Internal macro — creates a flag enum for mapping tags to their reception flag.

Note
Do not use directly.

Definition at line 44 of file tlv_internals.h.

◆ __X_DEFINE_TLV__TAG_INDEX

#define __X_DEFINE_TLV__TAG_INDEX (   value,
  name,
  callback,
  unicity 
)    name##_INDEX,

Internal macro — creates an index enum for mapping tags to their order in the list.

Note
Do not use directly.

Definition at line 38 of file tlv_internals.h.

◆ __X_DEFINE_TLV__TAG_TO_FLAG_CASE

#define __X_DEFINE_TLV__TAG_TO_FLAG_CASE (   value,
  name,
  callback,
  unicity 
)
Value:
case name: \
return name##_FLAG;

Internal macro — expands to a switch case that maps a tag to its flag.

Note
Do not use directly.

Definition at line 51 of file tlv_internals.h.

Typedef Documentation

◆ tag_to_flag_function_t

typedef TLV_flag_t() tag_to_flag_function_t(TLV_tag_t tag)

Definition at line 68 of file tlv_internals.h.

◆ TLV_flag_t

typedef uint64_t TLV_flag_t

Definition at line 67 of file tlv_internals.h.

◆ TLV_tag_t

typedef uint32_t TLV_tag_t

Definition at line 66 of file tlv_internals.h.