|
Dawn Framework 1.0
Universal data acquisition framework for embedded systems
|
Global registry for object inspection. More...
#include <inspector.hxx>
Public Types | |
| enum | EHandlerType { HANDLER_TYPE_IO = 0 , HANDLER_TYPE_PROG = 1 , HANDLER_TYPE_PROTO = 2 , HANDLER_TYPE_MAX = 3 } |
| Handler types that can be registered. More... | |
Public Member Functions | |
| const CObject * | findObject (uint32_t objid) const |
| Find object by ID. | |
| const CIOCommon * | getIO (size_t index) const |
| Get IO object by index. | |
| size_t | getIOCount () const |
| Get number of IO objects. | |
| const CObject * | getProg (size_t index) const |
| Get PROG object by index. | |
| size_t | getProgCount () const |
| Get number of PROG objects. | |
| size_t | getProgIOBindings (size_t prog_index, const CIOCommon **io_list, size_t max_size) const |
| Get IO bindings for PROG object. | |
| const CObject * | getProto (size_t index) const |
| Get PROTO object by index. | |
| size_t | getProtoBindings (size_t proto_index, const CObject **obj_list, size_t max_size) const |
| Get object bindings for PROTO object. | |
| size_t | getProtoCount () const |
| Get number of PROTO objects. | |
| void | registerIOHandler (const CIOHandler *handler) |
| Register IO handler. | |
| void | registerProgHandler (const CProgHandler *handler) |
| Register PROG handler. | |
| void | registerProtoHandler (const CProtoHandler *handler) |
| Register PROTO handler. | |
Static Public Member Functions | |
| static void | destroy () |
| Destroy singleton. | |
| static CDevInspector * | getInst () |
| Get singleton instance. | |
Global registry for object inspection.
Provides read-only access to handlers for debugging and introspection. Only compiled when CONFIG_DAWN_INSPECT is enabled. Uses singleton pattern to avoid breaking handler independence while enabling cross-handler inspection.
This class follows the same architectural pattern as CDevDescriptor, providing a graceful way to overcome architecture limits without introducing direct coupling between handlers.
Definition at line 37 of file inspector.hxx.
Handler types that can be registered.
| Enumerator | |
|---|---|
| HANDLER_TYPE_IO | I/O handler. |
| HANDLER_TYPE_PROG | Program handler. |
| HANDLER_TYPE_PROTO | Protocol handler. |
| HANDLER_TYPE_MAX | Maximum handler count. |
Definition at line 42 of file inspector.hxx.
|
inlinestatic |
Destroy singleton.
Deletes the singleton instance and sets pointer to nullptr. Call this during framework shutdown.
Definition at line 76 of file inspector.hxx.
| const CObject * CDevInspector::findObject | ( | uint32_t | objid | ) | const |
Find object by ID.
Searches all handlers for object with given ID.
| objid | Object ID to find. |
Definition at line 126 of file inspector.cxx.
References dawn::CGenericHandler< T >::getObjectById(), and dawn::SObjectId::UObjectId::v.
|
inlinestatic |
Get singleton instance.
Creates the singleton on first call, returns existing instance on subsequent calls.
Definition at line 59 of file inspector.hxx.
| const CIOCommon * CDevInspector::getIO | ( | size_t | index | ) | const |
Get IO object by index.
| index | Object index (0 to getIOCount()-1). |
Definition at line 75 of file inspector.cxx.
References dawn::CGenericHandler< T >::getObjects().
| size_t CDevInspector::getIOCount | ( | ) | const |
Get number of IO objects.
Definition at line 45 of file inspector.cxx.
References dawn::CGenericHandler< T >::getObjects().
| const CObject * CDevInspector::getProg | ( | size_t | index | ) | const |
Get PROG object by index.
| index | Object index (0 to getProgCount()-1). |
Definition at line 92 of file inspector.cxx.
References dawn::CGenericHandler< T >::getObjects().
| size_t CDevInspector::getProgCount | ( | ) | const |
Get number of PROG objects.
Definition at line 55 of file inspector.cxx.
References dawn::CGenericHandler< T >::getObjects().
| size_t CDevInspector::getProgIOBindings | ( | size_t | prog_index, |
| const CIOCommon ** | io_list, | ||
| size_t | max_size | ||
| ) | const |
Get IO bindings for PROG object.
Returns list of IO objects bound to specified PROG.
| prog_index | PROG object index. | |
| [out] | io_list | Array to fill with IO pointers. |
| max_size | Maximum entries in io_list. |
Definition at line 169 of file inspector.cxx.
References dawn::CBindableObject::getIOMap(), and getProg().
| const CObject * CDevInspector::getProto | ( | size_t | index | ) | const |
Get PROTO object by index.
| index | Object index (0 to getProtoCount()-1). |
Definition at line 109 of file inspector.cxx.
References dawn::CGenericHandler< T >::getObjects().
| size_t CDevInspector::getProtoBindings | ( | size_t | proto_index, |
| const CObject ** | obj_list, | ||
| size_t | max_size | ||
| ) | const |
Get object bindings for PROTO object.
Returns list of objects (IO or PROG) bound to specified PROTO.
| proto_index | PROTO object index. | |
| [out] | obj_list | Array to fill with object pointers. |
| max_size | Maximum entries in obj_list. |
Definition at line 207 of file inspector.cxx.
References dawn::CBindableObject::getIOMap(), and getProto().
| size_t CDevInspector::getProtoCount | ( | ) | const |
Get number of PROTO objects.
Definition at line 65 of file inspector.cxx.
References dawn::CGenericHandler< T >::getObjects().
| void CDevInspector::registerIOHandler | ( | const CIOHandler * | handler | ) |
Register IO handler.
Called by CIOHandler during initialization to register itself for inspection. Ownership is NOT transferred - handler lifetime is managed independently.
| handler | Pointer to IO handler (must remain valid). |
Definition at line 30 of file inspector.cxx.
| void CDevInspector::registerProgHandler | ( | const CProgHandler * | handler | ) |
Register PROG handler.
Called by CProgHandler during initialization to register itself for inspection. Ownership is NOT transferred - handler lifetime is managed independently.
| handler | Pointer to PROG handler (must remain valid). |
Definition at line 35 of file inspector.cxx.
| void CDevInspector::registerProtoHandler | ( | const CProtoHandler * | handler | ) |
Register PROTO handler.
Called by CProtoHandler during initialization to register itself for inspection. Ownership is NOT transferred - handler lifetime is managed independently.
| handler | Pointer to PROTO handler (must remain valid). |
Definition at line 40 of file inspector.cxx.