Dawn Framework 1.0
Universal data acquisition framework for embedded systems
Classes | Public Types | Static Public Member Functions | Static Public Attributes | List of all members
dawn::SObjectId Struct Reference

32-bit encoded Object ID with type, class, data type, and instance. More...

#include <objectid.hxx>

Classes

union  UObjectId
 32-bit encoded object identifier (union with bit field). More...
 

Public Types

enum  EObjectDataType {
  DTYPE_ANY = 0 , DTYPE_BOOL = 1 , DTYPE_INT8 = 2 , DTYPE_UINT8 = 3 ,
  DTYPE_INT16 = 4 , DTYPE_UINT16 = 5 , DTYPE_INT32 = 6 , DTYPE_UINT32 = 7 ,
  DTYPE_INT64 = 8 , DTYPE_UINT64 = 9 , DTYPE_FLOAT = 10 , DTYPE_DOUBLE = 11 ,
  DTYPE_B16 = 12 , DTYPE_UB16 = 13 , DTYPE_CHAR = 14 , DTYPE_BLOCK = 15 ,
  DTYPE_LAST = 16
}
 Data types supported by Dawn framework. More...
 
enum  EObjectIdType {
  OBJTYPE_ANY = 0 , OBJTYPE_IO = 1 , OBJTYPE_PROTO = 2 , OBJTYPE_PROG = 3 ,
  OBJTYPE_LAST = 4
}
 Object types in the Dawn framework. More...
 
typedef uint32_t ObjectId
 ObjectID type - single 32-bit value.
 
typedef uint64_t ObjectIdExt
 Extended ObjectID type - future 64-bit support.
 

Static Public Member Functions

static const char * dtypeToString (uint8_t dtype)
 Convert data type to human-readable string.
 
static int getDtypeSize_ (const EObjectDataType dtype)
 Get byte size for a specific data type.
 
static bool isDtypeSupported (uint8_t dtype)
 Check if a data type is enabled in build configuration.
 
static ObjectId objectId (uint8_t type, uint16_t cls, uint8_t dtype, uint8_t flags, uint16_t priv)
 Construct 32-bit ObjectID from component fields.
 
static uint16_t objectIdGetCls (const ObjectId objid)
 Extract object class from ObjectID.
 
static uint8_t objectIdGetDtype (const ObjectId objid)
 Extract data type field from ObjectID.
 
static uint8_t objectIdGetFlags (const ObjectId objid)
 Extract type-specific flags from ObjectID.
 
static uint16_t objectIdGetId (const ObjectId objid)
 Extract instance/private field from ObjectID.
 
static uint32_t objectIdGetNoId (const ObjectId objid)
 Extract "type-agnostic" ObjectID (zero instance field).
 
static uint8_t objectIdGetType (const ObjectId objid)
 Extract object type from ObjectID.
 
static bool objectIsIO (const ObjectId objid)
 Check if object is I/O type (union structure version).
 
static bool objectIsIO (const UObjectId &objid)
 Check if object is I/O type (union structure version).
 
static bool objectIsProg (const ObjectId objid)
 Check if object is Program type (raw 32-bit version).
 
static bool objectIsProg (const UObjectId &objid)
 Check if object is Program type (raw 32-bit version).
 
static bool objectIsProto (const ObjectId objid)
 Check if object is Protocol type (raw 32-bit version).
 
static bool objectIsProto (const UObjectId &objid)
 Check if object is Protocol type (raw 32-bit version).
 
static ObjectId objectMask (const ObjectId objid)
 Extract type and class mask from ObjectID.
 

Static Public Attributes

static size_t PRIV_MAX = 0b11111111111111
 Bit field constants and shift positions for ObjectID extraction.
 

Detailed Description

32-bit encoded Object ID with type, class, data type, and instance.

Fundamental identifier for all Dawn objects.

Definition at line 22 of file objectid.hxx.

Member Typedef Documentation

◆ ObjectIdExt

typedef uint64_t dawn::SObjectId::ObjectIdExt

Extended ObjectID type - future 64-bit support.

Not currently supported.

Definition at line 52 of file objectid.hxx.

Member Enumeration Documentation

◆ EObjectDataType

Data types supported by Dawn framework.

Defines all supported data types for object values and configurations.

Enumerator
DTYPE_ANY 

Wildcard data type (matches any actual type).

Used in template configuration items.

DTYPE_BOOL 

Boolean data type (stored in 32-bit container).

DTYPE_INT8 

Signed 8-bit integer (-128 to 127).

DTYPE_UINT8 

Unsigned 8-bit integer (0 to 255).

DTYPE_INT16 

Signed 16-bit integer (-32768 to 32767).

DTYPE_UINT16 

Unsigned 16-bit integer (0 to 65535).

DTYPE_INT32 

Signed 32-bit integer (-2147483648 to 2147483647).

DTYPE_UINT32 

Unsigned 32-bit integer (0 to 4294967295).

DTYPE_INT64 

Signed 64-bit integer.

DTYPE_UINT64 

Unsigned 64-bit integer.

DTYPE_FLOAT 

IEEE 754 single-precision floating point (32-bit).

Range: ~±10^-38 to ±10^38, 6-7 decimal digits precision.

DTYPE_DOUBLE 

IEEE 754 double-precision floating point (64-bit).

Range: ~±10^-308 to ±10^308, 15-17 decimal digits precision.

DTYPE_B16 

Signed 16.16 fixed-point (32-bit).

Range: -32768 to 32767 with 1/65536 precision.

DTYPE_UB16 

Unsigned 16.16 fixed-point (32-bit).

DTYPE_CHAR 

Character/string type (null-terminated, 4-byte aligned).

Data storage:

  • Must be null-terminated.
  • Stored in 32-bit words and padded to a 4-byte boundary.
  • Example: "hello" (5 chars) needs 2 words (8 bytes).
  • Size field indicates total 32-bit words (including padding).
DTYPE_BLOCK 

Opaque block/byte-stream data type.

Intended for long or binary payloads accessed as 1-byte units. IOs using this type should support seekable access.

DTYPE_LAST 

Sentinel value (last valid type + 1).

Definition at line 60 of file objectid.hxx.

◆ EObjectIdType

Object types in the Dawn framework.

Defines the categories of objects managed by the framework.

Enumerator
OBJTYPE_ANY 

Wildcard/metadata object type.

Used for descriptor metadata (version, device string).

OBJTYPE_IO 

Input/Output object type.

Managed by: CIOHandler Purpose: Physical device I/O and virtual I/O.

OBJTYPE_PROTO 

Protocol object type.

Managed by: CProtoHandler Purpose: Device-to-external communication (host, cloud, peers).

OBJTYPE_PROG 

Program/algorithm object type.

Managed by: CProgHandler Purpose: Edge processing and data transformation.

OBJTYPE_LAST 

Sentinel value (last valid type + 1).

Definition at line 168 of file objectid.hxx.

Member Function Documentation

◆ dtypeToString()

const char * SObjectId::dtypeToString ( uint8_t  dtype)
static

Convert data type to human-readable string.

Returns string representation of data type enum value.

Parameters
dtypeData type (EObjectDataType value).
Returns
String like "int32", "float", "bool", etc. Returns "???" for unknown types.

Definition at line 167 of file objectid.cxx.

References DTYPE_ANY, DTYPE_B16, DTYPE_BLOCK, DTYPE_BOOL, DTYPE_CHAR, DTYPE_DOUBLE, DTYPE_FLOAT, DTYPE_INT16, DTYPE_INT32, DTYPE_INT64, DTYPE_INT8, DTYPE_UB16, DTYPE_UINT16, DTYPE_UINT32, DTYPE_UINT64, and DTYPE_UINT8.

◆ getDtypeSize_()

int SObjectId::getDtypeSize_ ( const EObjectDataType  dtype)
static

Get byte size for a specific data type.

Returns the size in bytes of values for the given data type.

Parameters
dtypeData type (EObjectDataType value).
Returns
Size in bytes: 1, 2, 4, or 8 depending on type.

Definition at line 12 of file objectid.cxx.

References DTYPE_B16, DTYPE_BLOCK, DTYPE_BOOL, DTYPE_DOUBLE, DTYPE_FLOAT, DTYPE_INT16, DTYPE_INT32, DTYPE_INT64, DTYPE_INT8, DTYPE_UB16, DTYPE_UINT16, DTYPE_UINT32, DTYPE_UINT64, and DTYPE_UINT8.

Here is the caller graph for this function:

◆ isDtypeSupported()

bool SObjectId::isDtypeSupported ( uint8_t  dtype)
static

Check if a data type is enabled in build configuration.

DTYPE_ANY is always considered supported.

Parameters
dtypeData type (EObjectDataType value).
Returns
True if enabled, false otherwise.

Definition at line 95 of file objectid.cxx.

References DTYPE_ANY, DTYPE_B16, DTYPE_BLOCK, DTYPE_BOOL, DTYPE_CHAR, DTYPE_DOUBLE, DTYPE_FLOAT, DTYPE_INT16, DTYPE_INT32, DTYPE_INT64, DTYPE_INT8, DTYPE_UB16, DTYPE_UINT16, DTYPE_UINT32, DTYPE_UINT64, and DTYPE_UINT8.

◆ objectId()

static ObjectId dawn::SObjectId::objectId ( uint8_t  type,
uint16_t  cls,
uint8_t  dtype,
uint8_t  flags,
uint16_t  priv 
)
inlinestatic

Construct 32-bit ObjectID from component fields.

Packs individual fields into a single 32-bit ObjectID value.

Parameters
typeObject type (0-3): OBJTYPE_ANY, OBJTYPE_IO, etc.
clsObject class (0-511): IOCLS_ADC, IOCLS_GPIO, etc.
dtypeData type (0-15): DTYPE_UINT32, DTYPE_FLOAT, etc.
flagsType-specific flags (0-3): IO_FLAGS_TS, etc.
privInstance/private field (0-16383): instance number.
Returns
Constructed 32-bit ObjectID value.

Definition at line 290 of file objectid.hxx.

References PRIV_MAX.

Here is the caller graph for this function:

◆ objectIdGetCls()

static uint16_t dawn::SObjectId::objectIdGetCls ( const ObjectId  objid)
inlinestatic

Extract object class from ObjectID.

Parameters
objidObjectID value.
Returns
Object class (0-511).

Definition at line 349 of file objectid.hxx.

◆ objectIdGetDtype()

static uint8_t dawn::SObjectId::objectIdGetDtype ( const ObjectId  objid)
inlinestatic

Extract data type field from ObjectID.

Parameters
objidObjectID value.
Returns
Data type (EObjectDataType value, 0-15).

Definition at line 337 of file objectid.hxx.

Here is the caller graph for this function:

◆ objectIdGetFlags()

static uint8_t dawn::SObjectId::objectIdGetFlags ( const ObjectId  objid)
inlinestatic

Extract type-specific flags from ObjectID.

Parameters
objidObjectID value.
Returns
Flags value (0-3).

Definition at line 325 of file objectid.hxx.

◆ objectIdGetId()

static uint16_t dawn::SObjectId::objectIdGetId ( const ObjectId  objid)
inlinestatic

Extract instance/private field from ObjectID.

Parameters
objidObjectID value.
Returns
Instance ID (0-16383).

Definition at line 313 of file objectid.hxx.

References PRIV_MAX.

◆ objectIdGetNoId()

static uint32_t dawn::SObjectId::objectIdGetNoId ( const ObjectId  objid)
inlinestatic

Extract "type-agnostic" ObjectID (zero instance field).

Returns ObjectID with instance/priv field zeroed.

Parameters
objidObjectID value.
Returns
ObjectID with instance field zeroed (only type+class+dtype+flags).

Definition at line 375 of file objectid.hxx.

◆ objectIdGetType()

static uint8_t dawn::SObjectId::objectIdGetType ( const ObjectId  objid)
inlinestatic

Extract object type from ObjectID.

Parameters
objidObjectID value.
Returns
Object type (EObjectIdType value, 0-3).

Definition at line 361 of file objectid.hxx.

Here is the caller graph for this function:

◆ objectIsIO() [1/2]

static bool dawn::SObjectId::objectIsIO ( const ObjectId  objid)
inlinestatic

Check if object is I/O type (union structure version).

Parameters
objidObjectID raw value.
Returns
True if object type is OBJTYPE_IO.

Definition at line 423 of file objectid.hxx.

References objectIdGetType(), and OBJTYPE_IO.

Here is the call graph for this function:

◆ objectIsIO() [2/2]

static bool dawn::SObjectId::objectIsIO ( const UObjectId objid)
inlinestatic

Check if object is I/O type (union structure version).

Parameters
objidReference to UObjectId structure.
Returns
True if objid.s.type == OBJTYPE_IO.

Definition at line 387 of file objectid.hxx.

References OBJTYPE_IO, dawn::SObjectId::UObjectId::s, and dawn::SObjectId::UObjectId::type.

Here is the caller graph for this function:

◆ objectIsProg() [1/2]

static bool dawn::SObjectId::objectIsProg ( const ObjectId  objid)
inlinestatic

Check if object is Program type (raw 32-bit version).

Parameters
objidObjectID raw value.
Returns
True if object type is OBJTYPE_PROG.

Definition at line 447 of file objectid.hxx.

References objectIdGetType(), and OBJTYPE_PROG.

Here is the call graph for this function:

◆ objectIsProg() [2/2]

static bool dawn::SObjectId::objectIsProg ( const UObjectId objid)
inlinestatic

Check if object is Program type (raw 32-bit version).

Parameters
objidReference to UObjectId structure.
Returns
True if objid.s.type == OBJTYPE_PROG.

Definition at line 411 of file objectid.hxx.

References OBJTYPE_PROG, dawn::SObjectId::UObjectId::s, and dawn::SObjectId::UObjectId::type.

Here is the caller graph for this function:

◆ objectIsProto() [1/2]

static bool dawn::SObjectId::objectIsProto ( const ObjectId  objid)
inlinestatic

Check if object is Protocol type (raw 32-bit version).

Parameters
objidObjectID raw value.
Returns
True if object type is OBJTYPE_PROTO.

Definition at line 435 of file objectid.hxx.

References objectIdGetType(), and OBJTYPE_PROTO.

Here is the call graph for this function:

◆ objectIsProto() [2/2]

static bool dawn::SObjectId::objectIsProto ( const UObjectId objid)
inlinestatic

Check if object is Protocol type (raw 32-bit version).

Parameters
objidReference to UObjectId structure.
Returns
True if objid.s.type == OBJTYPE_PROTO.

Definition at line 399 of file objectid.hxx.

References OBJTYPE_PROTO, dawn::SObjectId::UObjectId::s, and dawn::SObjectId::UObjectId::type.

Here is the caller graph for this function:

◆ objectMask()

static ObjectId dawn::SObjectId::objectMask ( const ObjectId  objid)
inlinestatic

Extract type and class mask from ObjectID.

Returns ObjectID with instance and flags fields zeroed.

Parameters
objidObjectID raw value.
Returns
ObjectID with instance/priv and flags fields zeroed.

Definition at line 461 of file objectid.hxx.


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