6#include "dawn/prog/handler.hxx"
8#include "dawn/debug.hxx"
9#include "dawn/io/common.hxx"
11#ifdef CONFIG_DAWN_INSPECT
12# include "dawn/dev/inspector.hxx"
24 CProgCommon *tmp =
nullptr;
29 DAWNERR(
"Failed to create PROG object 0x%" PRIx32
"\n", desc.
getObjectIdV());
30 t.allocError = -ENOMEM;
34 DAWNINFO(
"created PROG: 0x%" PRIx32
" %p\n", desc.
getObjectIdV(), tmp);
46 if (userFactory !=
nullptr)
48 CProgCommon *ret =
nullptr;
50 ret = userFactory->create(desc);
57 return factory.create(desc);
62 SObjectId::UObjectId uid;
64 return ioHandler->getIO(uid);
89#ifdef CONFIG_DAWN_INSPECT
118 for (
auto const &[
id, io] : prog->getIOMap())
121 prog->setObjectMapItem(
id, resolvedIO);
Descriptor wrapper for individual object configuration.
SObjectId::ObjectId getObjectIdV() const
Get object identifier as raw 32-bit value.
SObjectId::UObjectId & getObjectId() const
Get object identifier as union structure.
Binary device descriptor manager.
Global registry for object inspection.
void registerProgHandler(const CProgHandler *handler)
Register PROG handler.
static CDevInspector * getInst()
Get singleton instance.
int initAll()
Run one-time init() for all configured objects.
size_t getObjectCount() const
int registerObject(T *obj)
Register object.
T * getObjectById(const SObjectId::UObjectId &id) const
Get object by ObjectID.
int configureAll()
Configure all objects managed by this handler.
int objalloc(CDescriptor &desc, CDescriptor::allocobj_func_t func)
Allocate objects from descriptor.
CProgCommon * getObjectAt(size_t index) const
Base implementation of IHandler interface.
Base class for all I/O objects.
Manages I/O object lifecycle and dispatch.
Base class for all Dawn objects (IOs, Programs, Protocols).
Base class for all PROG (processing) objects.
CProgHandler()
Construct the Programs handler.
bool isObjectValid(SObjectId::UObjectId &obj) const
Validate object ID in handler collection.
CObject * getObject(const SObjectId::ObjectId id)
Get a Programs object by object ID.
int initAll()
Configure, bind, and initialize all Program objects.
int init(CDescriptor &desc, CIOHandler *io, IProgFactory *f)
Initialize the Programs handler.
CProgCommon * getProg(SObjectId::UObjectId &id) const
Get a Programs object by object ID (type-safe).
Abstract factory interface for PROG object creation.
Out-of-tree user-extension hooks for Dawn.
uint32_t ObjectId
ObjectID type - single 32-bit value.
static bool objectIsProg(const UObjectId &objid)
Check if object is Program type (raw 32-bit version).
32-bit encoded object identifier (union with bit field).
ObjectId v
Raw 32-bit ObjectID value (for comparison, hashing, storage).