|
Dawn Framework 1.0
Universal data acquisition framework for embedded systems
|
Handler for SYSTEM objects (OBJTYPE_ANY, cls != 0). More...
#include <handler.hxx>
Public Member Functions | |
| int | configureAll () |
| Configure all objects managed by this handler. | |
| int | deinitAll () |
| De-initialize all objects managed by this handler. | |
| CObject * | getObject (const SObjectId::ObjectId id) |
| Get object from this handler by ID. | |
| CSystemCommon * | getObjectAt (size_t index) const |
| Get object at index. | |
| CSystemCommon * | getObjectById (const SObjectId::UObjectId &id) const |
| Get object by ObjectID. | |
| size_t | getObjectCount () const |
| Get total number of registered objects. | |
| const std::vector< CSystemCommon * > & | getObjects () const |
| Get read-only access to all objects. | |
| bool | hasThread () const |
| Check if any thread is currently running. | |
| int | initAll () |
| Run one-time init() for all configured objects. | |
| bool | isObjectValid (SObjectId::UObjectId &obj) const |
| Validate if object ID is valid for this handler. | |
| int | objalloc (CDescriptor &desc, CDescriptor::allocobj_func_t func) |
| Allocate objects from descriptor. | |
| int | startAll () |
| Start all objects managed by this handler. | |
| int | stopAll () |
| Stop all objects managed by this handler. | |
Protected Member Functions | |
| const char * | getObjectTypeName () const |
| Get object type name for logging. | |
| virtual void | onInitObject (CSystemCommon *obj) |
| Hook for subclass-specific post-object-init handling. | |
| virtual void | onStartObject (CSystemCommon *obj) |
| Hook for subclass-specific pre-start operations. | |
| int | registerObject (CSystemCommon *obj) |
| Register object. | |
Protected Attributes | |
| std::vector< CSystemCommon * > | objects |
| Vector of registered objects. | |
Handler for SYSTEM objects (OBJTYPE_ANY, cls != 0).
Definition at line 16 of file handler.hxx.
|
inlineinherited |
Configure all objects managed by this handler.
Definition at line 114 of file generic_handler.hxx.
|
inlinevirtual |
De-initialize all objects managed by this handler.
Returns OK without cleanup when lifecycle teardown is disabled.
Reimplemented from dawn::CGenericHandler< CSystemCommon >.
Definition at line 37 of file handler.hxx.
References dawn::CGenericHandler< T >::deinitAll().
|
inlinevirtual |
Get object from this handler by ID.
Retrieves a specific object by its ID.
| id | Object ID. |
Implements dawn::IHandler.
Definition at line 62 of file handler.hxx.
References dawn::CGenericHandler< T >::getObjectById(), and dawn::SObjectId::UObjectId::v.
|
inlineinherited |
Get object at index.
| index | Zero-based index. |
Definition at line 311 of file generic_handler.hxx.
|
inlineinherited |
Get object by ObjectID.
| id | ObjectID to retrieve. |
Definition at line 323 of file generic_handler.hxx.
|
inlineinherited |
Get read-only access to all objects.
Definition at line 298 of file generic_handler.hxx.
|
inlinevirtual |
Check if any thread is currently running.
Reimplemented from dawn::CGenericHandler< CSystemCommon >.
Definition at line 52 of file handler.hxx.
References dawn::CGenericHandler< T >::hasThread().
|
inlinevirtual |
Run one-time init() for all configured objects.
Reimplemented from dawn::CGenericHandler< CSystemCommon >.
Definition at line 26 of file handler.hxx.
References dawn::CGenericHandler< T >::configureAll(), and dawn::CGenericHandler< T >::initAll().
|
inlinevirtual |
Validate if object ID is valid for this handler.
Checks whether a given object ID represents a valid object managed by this handler.
| obj | Object ID to validate. |
Implements dawn::IHandler.
Definition at line 57 of file handler.hxx.
References dawn::SObjectId::objectIsSystem().
|
inlineinherited |
Allocate objects from descriptor.
Generic descriptor allocation using callback pattern.
| desc | Device descriptor containing object definitions. |
| func | Static callback: void func(CHandler& handler, CDescObject&). |
Definition at line 339 of file generic_handler.hxx.
|
inlineprotectedvirtualinherited |
Hook for subclass-specific post-object-init handling.
| obj | Pointer to object that was just initialized. |
Definition at line 60 of file generic_handler.hxx.
|
inlineprotectedvirtualinherited |
Hook for subclass-specific pre-start operations.
| obj | Pointer to object about to start. |
Definition at line 70 of file generic_handler.hxx.
|
inlineprotectedinherited |
Register object.
| obj | Pointer to object to register. |
Definition at line 37 of file generic_handler.hxx.
|
inlinevirtual |
Start all objects managed by this handler.
Reimplemented from dawn::CGenericHandler< CSystemCommon >.
Definition at line 42 of file handler.hxx.
References dawn::CGenericHandler< T >::startAll().
|
inlinevirtual |
Stop all objects managed by this handler.
Returns OK without stopping objects when lifecycle teardown is disabled.
Reimplemented from dawn::CGenericHandler< CSystemCommon >.
Definition at line 47 of file handler.hxx.
References dawn::CGenericHandler< T >::stopAll().