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"
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)
50 ret = userFactory->
create(desc);
57 return factory.
create(desc);
64 return ioHandler->
getIO(uid);
89#ifdef CONFIG_DAWN_INSPECT
118 for (
auto const &[
id, io] : prog->
getIOMap())
void setObjectMapItem(SObjectId::ObjectId id, CObject *obj)
Set an item in the object map.
const std::map< SObjectId::ObjectId, CIOCommon * > & getIOMap() const
Get the I/O map for this object.
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
Get total number of registered objects.
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
Get object at index.
Base implementation of IHandler interface.
Base class for all I/O objects.
Manages I/O object lifecycle and dispatch.
CIOCommon * getIO(SObjectId::UObjectId &id) const
Get I/O object by ObjectID as CIOCommon*.
Base class for all Dawn objects (IOs, Programs, Protocols).
Base class for all PROG (processing) objects.
CProgCommon * create(CDescObject &desc)
Create a PROG object from descriptor.
Manages Programs object lifecycle and dispatch.
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.
virtual CProgCommon * create(CDescObject &desc)=0
Create a PROG object from descriptor.
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).