11#include "dawn/common/descobject.hxx"
12#include "dawn/common/handler.hxx"
13#include "dawn/common/object.hxx"
14#include "dawn/porting/config.hxx"
37 uint32_t _reserved : 16;
63 DESC_CFG_NO_IDLE_QUIT = 3,
156 int loadBin(uint32_t *bin,
size_t len,
bool force_valid =
false,
bool dump =
false);
219 static void binDump(
const uint32_t *bin,
size_t len);
229 static int binValid(
const uint32_t *bin,
size_t len);
253 std::vector<CDescObject *> vobjcfg;
260 size_t objectWords()
const;
261 bool objectWordAt(
size_t offset, uint32_t *value)
const;
Descriptor wrapper for individual object configuration.
Binary device descriptor manager.
void reset()
Clear currently loaded descriptor state.
static uint32_t DAWN_DESCRIPTOR_FOOT
Footer magic number (0x02030a0d).
~CDescriptor()
Destructor - release loaded descriptor resources.
SObjectCfg::UObjectCfgId * objectCfgIdAtOffset(size_t offset)
Get configuration ID at offset.
static uint32_t DAWN_DESCRIPTOR_HDR
Header magic number (0x0d0a0302).
CDescriptor()
Constructor - initialize empty descriptor.
static SObjectCfg::ObjectCfgId cfgIdVersion(bool rw=false)
Create ConfigID for firmware version.
SObjectCfg::SObjectCfgData * objectCfgAtOffset(size_t offset)
Get object configuration at offset.
std::function< void(CHandler &obj, CDescObject &desc)> allocobj_func_t
Thread function callback storage.
bool getNoIdleQuit() const
Return true if the descriptor requests no idle quit.
static void binDump(const uint32_t *bin, size_t len)
Print descriptor contents to console (debug).
static SObjectCfg::ObjectCfgId cfgIdString(uint16_t size, bool rw=false)
Create ConfigID for device string.
static int binCheckFill(uint32_t *bin, size_t len)
Calculate and store descriptor CRC32 checksum.
int loadBin(uint32_t *bin, size_t len, bool force_valid=false, bool dump=false)
Load binary descriptor from memory.
static SObjectId::ObjectId objectId(uint16_t inst)
Construct 32-bit ObjectID from component fields.
size_t getBinLen()
Get loaded descriptor size in bytes.
static SObjectCfg::ObjectCfgId cfgId(bool rw, uint8_t dtype, uint8_t size, uint8_t id)
Create ConfigID for metadata.
static int binValid(const uint32_t *bin, size_t len)
Validate binary descriptor integrity.
static bool binCheckValid(const uint32_t *bin, size_t len)
Validate descriptor CRC32 checksum.
SDescriptorBin * getBin()
Get loaded descriptor binary structure.
Base implementation of IHandler interface.
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.
uint32_t ObjectCfgId
ConfigID type - single 32-bit value.
Out-of-tree user-extension hooks for Dawn.
Binary descriptor footer structure.
Binary descriptor header structure.
Complete binary descriptor container.
Object configuration data container.
@ OBJTYPE_ANY
Wildcard/metadata object type.
@ DTYPE_UINT8
Unsigned 8-bit integer (0 to 255).
@ DTYPE_CHAR
Character/string type (null-terminated, 4-byte aligned).
@ DTYPE_UINT32
Unsigned 32-bit integer (0 to 4294967295).
uint32_t ObjectId
ObjectID type - single 32-bit value.
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.
32-bit encoded configuration identifier (union with bit field).