|
YAPB
|
Data Structures | |
| struct | YAPB_Packet |
| Opaque packet handle, stack-allocatable. More... | |
| struct | YAPB_Element |
| Tagged union returned by YAPB_pop_next(). More... | |
Macros | |
| #define | YAPB_MODE_WRITE 0 |
| Packet is in write mode. | |
| #define | YAPB_MODE_READ 1 |
| Packet is in read mode. | |
| #define | YAPB_HEADER_SIZE 4 |
| Size of the packet header in bytes. | |
| #define | YAPB_PACKET_SIZE 48 |
| Size of the opaque YAPB_Packet_t storage in bytes. | |
Typedefs | |
| typedef struct YAPB_Packet | YAPB_Packet_t |
| Opaque packet handle, stack-allocatable. | |
| typedef struct YAPB_Element | YAPB_Element_t |
| Tagged union returned by YAPB_pop_next(). | |
Enumerations | |
| enum | YAPB_Type_t { YAPB_INT8 = 0x00 , YAPB_INT16 = 0x01 , YAPB_INT32 = 0x02 , YAPB_INT64 = 0x03 , YAPB_FLOAT = 0x04 , YAPB_DOUBLE = 0x05 , YAPB_BLOB = 0x0E , YAPB_NESTED_PKT = 0x0F } |
| Element type tags stored in the wire format. More... | |
| enum | YAPB_Result_t { YAPB_ERR_NO_MORE_ELEMENTS = -7 , YAPB_ERR_INVALID_PACKET = -6 , YAPB_ERR_TYPE_MISMATCH = -5 , YAPB_ERR_INVALID_MODE = -4 , YAPB_ERR_BUFFER_TOO_SMALL = -3 , YAPB_ERR_NULL_PTR = -2 , YAPB_ERR_UNKNOWN = -1 , YAPB_OK = 0 , YAPB_STS_COMPLETE = 1 } |
| Result codes returned by all YAPB functions. More... | |
Core types, enumerations, and constants.
| typedef struct YAPB_Element YAPB_Element_t |
Tagged union returned by YAPB_pop_next().
The type field indicates which union member in val is valid.
| typedef struct YAPB_Packet YAPB_Packet_t |
Opaque packet handle, stack-allocatable.
Internals are hidden; use YAPB_initialize() or YAPB_load() to set up.
| enum YAPB_Result_t |
Result codes returned by all YAPB functions.
Negative values are errors. YAPB_OK indicates success with more data remaining. YAPB_STS_COMPLETE indicates success and the last element has been consumed.
| enum YAPB_Type_t |
Element type tags stored in the wire format.
Each element in a packet is prefixed with a one-byte type tag. Tags 0x06-0x0D are reserved for future types.