YAPB
Loading...
Searching...
No Matches
YAPB_Element Struct Reference

Tagged union returned by YAPB_pop_next(). More...

#include <yapb.h>

Data Fields

YAPB_Type_t type
union { 
   int8_t   i8 
   int16_t   i16 
   int32_t   i32 
   int64_t   i64 
   float   f 
   double   d 
   struct { 
      const uint8_t *   data 
      uint16_t   len 
   }   blob
   YAPB_Packet_t   nested 
val

Detailed Description

Tagged union returned by YAPB_pop_next().

The type field indicates which union member in val is valid.

Field Documentation

◆ [struct]

struct { ... } YAPB_Element::blob

Valid when type == YAPB_BLOB. Pointer into packet buffer.

◆ d

double YAPB_Element::d

Valid when type == YAPB_DOUBLE.

◆ f

float YAPB_Element::f

Valid when type == YAPB_FLOAT.

◆ i16

int16_t YAPB_Element::i16

Valid when type == YAPB_INT16.

◆ i32

int32_t YAPB_Element::i32

Valid when type == YAPB_INT32.

◆ i64

int64_t YAPB_Element::i64

Valid when type == YAPB_INT64.

◆ i8

int8_t YAPB_Element::i8

Valid when type == YAPB_INT8.

◆ nested

YAPB_Packet_t YAPB_Element::nested

Valid when type == YAPB_NESTED_PKT.

◆ type

YAPB_Type_t YAPB_Element::type

Type tag of the popped element.

◆ [union]

union { ... } YAPB_Element::val

Element value (check type before accessing).


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