|
Dawn Framework 1.0
Universal data acquisition framework for embedded systems
|
Configuration management for Dawn objects. More...
#include <objectcfg.hxx>
Classes | |
| struct | SObjectCfgData |
| Object configuration data container. More... | |
| struct | SObjectCfgItem |
| Single configuration item within object. More... | |
| union | UObjectCfgId |
| 32-bit encoded configuration identifier (union with bit field). More... | |
Public Types | |
| typedef uint32_t | ObjectCfgData_t |
| Configuration data element - single 32-bit word. | |
| typedef uint32_t | ObjectCfgId |
| ConfigID type - single 32-bit value. | |
Static Public Member Functions | |
| static uint32_t | b16ToCfg (b16_t x) |
| Convert b16_t to uint32_t. | |
| static b16_t | cfgToB16 (ObjectCfgData_t x) |
| Convert ObjectCfgData_t to b16_t. | |
| static float | cfgToF (ObjectCfgData_t x) |
| Convert ObjectCfgData_t to float. | |
| static int32_t | cfgtoi32 (ObjectCfgData_t x) |
| Convert ObjectCfgData_t to int32_t. | |
| static uint32_t | cfgToU32 (ObjectCfgData_t x) |
| Convert ObjectCfgData_t to uint32_t. | |
| static ObjectCfgData_t | fToB16ToCfg (float x) |
| Convert float to b16_t and then to ObjectCfgData_t. | |
| static ObjectCfgData_t | fToCfg (float x) |
| Convert float to ObjectCfgData_t. | |
| static size_t | getSizeBytes (const SObjectCfgData &cfg) |
| Get total size in bytes for this object definition. | |
| static ObjectCfgData_t | i32ToCfg (int32_t x) |
| Convert int32_t to ObjectCfgData_t. | |
| static SObjectCfgItem * | objectAtOffset (const SObjectCfgData &cfg, size_t offset) |
| Get item from offset. | |
| static ObjectCfgId | objectCfg (uint8_t type, uint16_t cls, uint8_t dtype, bool rw, uint16_t size, uint8_t id) |
| Construct 32-bit ConfigID from component fields. | |
| static SObjectCfgItem * | objectCfgFromCfgId (const SObjectCfgData &cfg, ObjectCfgId id) |
| Get item from configuration ID. | |
| static uint16_t | objectCfgGetCls (const ObjectCfgId objcfg) |
| Extract object class from ConfigID. | |
| static uint8_t | objectCfgGetDtype (const ObjectCfgId objcfg) |
| Extract data type from ConfigID. | |
| static uint8_t | objectCfgGetId (const ObjectCfgId objcfg) |
| Extract configuration identifier from ConfigID. | |
| static bool | objectCfgGetRw (const ObjectCfgId objcfg) |
| Extract read-write access flag from ConfigID. | |
| static uint16_t | objectCfgGetSize (const ObjectCfgId objcfg) |
| Extract configuration data size from ConfigID. | |
| static uint8_t | objectCfgGetType (const ObjectCfgId objcfg) |
| Extract object type from ConfigID. | |
| static ObjectCfgData_t | u32ToCfg (uint32_t x) |
| Helper conversion functions: data types to cfg data type. | |
Static Public Attributes | |
| static size_t | ID_MAX = 0b11111 |
| Configuration ID field constants and bit shift positions. | |
Configuration management for Dawn objects.
Encodes and manages optional configuration data attached to objects.
ConfigID is a 32-bit packed field:
These fields identify a config item and describe its storage and access semantics.
Definition at line 36 of file objectcfg.hxx.
| typedef uint32_t dawn::SObjectCfg::ObjectCfgData_t |
Configuration data element - single 32-bit word.
All configuration data is stored as arrays of 32-bit words, regardless of actual data type.
Definition at line 69 of file objectcfg.hxx.
|
inlinestatic |
Convert b16_t to uint32_t.
| x | b16_t value. |
Definition at line 349 of file objectcfg.hxx.
|
inlinestatic |
Convert ObjectCfgData_t to b16_t.
| x | ObjectCfgData_t value. |
Definition at line 419 of file objectcfg.hxx.
|
inlinestatic |
Convert ObjectCfgData_t to float.
| x | ObjectCfgData_t value. |
Definition at line 404 of file objectcfg.hxx.
|
inlinestatic |
Convert ObjectCfgData_t to int32_t.
| x | ObjectCfgData_t value. |
Definition at line 389 of file objectcfg.hxx.
|
inlinestatic |
Convert ObjectCfgData_t to uint32_t.
| x | ObjectCfgData_t value. |
Definition at line 377 of file objectcfg.hxx.
|
inlinestatic |
Convert float to b16_t and then to ObjectCfgData_t.
| x | float value. |
Definition at line 364 of file objectcfg.hxx.
References b16ToCfg().
|
inlinestatic |
Convert float to ObjectCfgData_t.
| x | float value. |
Definition at line 334 of file objectcfg.hxx.
|
static |
Get total size in bytes for this object definition.
Returns the complete size of object definition in descriptor, including object metadata and all configuration items/data.
Definition at line 38 of file objectcfg.cxx.
References dawn::SObjectCfg::SObjectCfgItem::cfgid, objectAtOffset(), dawn::SObjectCfg::UObjectCfgId::s, dawn::SObjectCfg::UObjectCfgId::size, and dawn::SObjectCfg::SObjectCfgData::size.
|
inlinestatic |
Convert int32_t to ObjectCfgData_t.
| x | int32_t value. |
Definition at line 319 of file objectcfg.hxx.
|
inlinestatic |
Get item from offset.
| cfg | Object configuration data. |
| offset | Offset in 32-bit words. |
Definition at line 440 of file objectcfg.hxx.
|
inlinestatic |
Construct 32-bit ConfigID from component fields.
Packs individual configuration metadata into a single 32-bit ConfigID.
| type | Object type (0-3): OBJTYPE_ANY, OBJTYPE_IO, etc. |
| cls | Object class (0-511): IOCLS_ADC, IOCLS_GPIO, etc. |
| dtype | Data type (0-15): DTYPE_UINT32, DTYPE_FLOAT, etc. |
| rw | Read-write flag: false=read-only, true=read-write. |
| size | Configuration data size in 32-bit words (0-1023). |
| id | Configuration identifier (0-31). |
Definition at line 208 of file objectcfg.hxx.
References ID_MAX.
|
static |
Get item from configuration ID.
| cfg | Object configuration data. |
| id | Configuration ID. |
Definition at line 12 of file objectcfg.cxx.
References dawn::SObjectCfg::SObjectCfgItem::cfgid, objectAtOffset(), dawn::SObjectCfg::UObjectCfgId::s, dawn::SObjectCfg::UObjectCfgId::size, dawn::SObjectCfg::SObjectCfgData::size, and dawn::SObjectCfg::UObjectCfgId::v.
|
inlinestatic |
Extract object class from ConfigID.
| objcfg | ConfigID value. |
Definition at line 281 of file objectcfg.hxx.
|
inlinestatic |
Extract data type from ConfigID.
| objcfg | ConfigID value. |
Definition at line 269 of file objectcfg.hxx.
|
inlinestatic |
Extract configuration identifier from ConfigID.
| objcfg | ConfigID value. |
Definition at line 233 of file objectcfg.hxx.
References ID_MAX.
|
inlinestatic |
Extract read-write access flag from ConfigID.
| objcfg | ConfigID value. |
Definition at line 257 of file objectcfg.hxx.
|
inlinestatic |
Extract configuration data size from ConfigID.
| objcfg | ConfigID value. |
Definition at line 245 of file objectcfg.hxx.
|
inlinestatic |
Extract object type from ConfigID.
| objcfg | ConfigID value. |
Definition at line 293 of file objectcfg.hxx.
|
inlinestatic |
Helper conversion functions: data types to cfg data type.
Convert uint32_t to ObjectCfgData_t.
| x | uint32_t value. |
Definition at line 307 of file objectcfg.hxx.
|
static |
Configuration ID field constants and bit shift positions.
Used with getter functions to extract fields from ConfigID.
Definition at line 45 of file objectcfg.hxx.