Dawn Framework 1.0
Universal data acquisition framework for embedded systems
Public Member Functions | List of all members
dawn::IHandler Class Referenceabstract

Common interface for all handler implementations. More...

#include <handler.hxx>

Inheritance diagram for dawn::IHandler:
[legend]

Public Member Functions

virtual int deinitAll ()=0
 De-initialize all objects managed by this handler.
 
virtual CObjectgetObject (const SObjectId::ObjectId id)=0
 Get object from this handler by ID.
 
virtual bool hasThread () const =0
 Check if thread is currently running.
 
virtual int initAll ()=0
 Configure and initialize all objects managed by this handler.
 
virtual bool isObjectValid (SObjectId::UObjectId &obj) const =0
 Validate if object ID is valid for this handler.
 
virtual int startAll ()=0
 Start all objects managed by this handler.
 
virtual int stopAll ()=0
 Stop all objects managed by this handler.
 

Detailed Description

Common interface for all handler implementations.

Handlers manage collections of objects of a specific type (IOs, Programs, Protocols).

Definition at line 20 of file handler.hxx.

Member Function Documentation

◆ deinitAll()

virtual int dawn::IHandler::deinitAll ( )
pure virtual

De-initialize all objects managed by this handler.

Called during framework shutdown to de-initialize all registered objects in reverse order.

Returns
OK on success, negative error code if any object fails to deinit.

Implemented in dawn::CGenericHandler< T >, dawn::CGenericHandler< CIOCommon >, dawn::CGenericHandler< CProgCommon >, dawn::CGenericHandler< CProtoCommon >, dawn::CIOHandler, dawn::CProgHandler, and dawn::CProtoHandler.

◆ getObject()

virtual CObject * dawn::IHandler::getObject ( const SObjectId::ObjectId  id)
pure virtual

Get object from this handler by ID.

Retrieves a specific object by its ID.

Parameters
idObject ID.
Returns
Pointer to CObject if found, nullptr if not found.

Implemented in dawn::CIOHandler, dawn::CProgHandler, and dawn::CProtoHandler.

◆ hasThread()

virtual bool dawn::IHandler::hasThread ( ) const
pure virtual

Check if thread is currently running.

Checks if a thread has been started and has not yet completed.

Returns
True if at least one registered object is running, false if all.

Implemented in dawn::CGenericHandler< T >, dawn::CGenericHandler< CIOCommon >, dawn::CGenericHandler< CProgCommon >, dawn::CGenericHandler< CProtoCommon >, dawn::CIOHandler, dawn::CProgHandler, and dawn::CProtoHandler.

◆ initAll()

virtual int dawn::IHandler::initAll ( )
pure virtual

Configure and initialize all objects managed by this handler.

Called during framework setup. Handlers may internally perform multiple phases (for example configure -> bind -> init) before objects are ready for runtime start().

Returns
OK on success, negative error code if any object fails to init.

Implemented in dawn::CGenericHandler< T >, dawn::CGenericHandler< CIOCommon >, dawn::CGenericHandler< CProgCommon >, dawn::CGenericHandler< CProtoCommon >, dawn::CIOHandler, dawn::CProgHandler, and dawn::CProtoHandler.

◆ isObjectValid()

virtual bool dawn::IHandler::isObjectValid ( SObjectId::UObjectId obj) const
pure virtual

Validate if object ID is valid for this handler.

Checks whether a given object ID represents a valid object managed by this handler.

Parameters
objObject ID to validate.
Returns
True if object ID is valid for this handler, false otherwise.

Implemented in dawn::CIOHandler, dawn::CProgHandler, and dawn::CProtoHandler.

◆ startAll()

virtual int dawn::IHandler::startAll ( )
pure virtual

Start all objects managed by this handler.

Called after all objects in the system have been initialized.

Returns
OK on success, negative error code if any object fails to start.

Implemented in dawn::CGenericHandler< T >, dawn::CGenericHandler< CIOCommon >, dawn::CGenericHandler< CProgCommon >, dawn::CGenericHandler< CProtoCommon >, dawn::CIOHandler, dawn::CProgHandler, and dawn::CProtoHandler.

◆ stopAll()

virtual int dawn::IHandler::stopAll ( )
pure virtual

Stop all objects managed by this handler.

Stops all registered objects.

Returns
OK on success, negative error code if any object fails to stop.

Implemented in dawn::CGenericHandler< T >, dawn::CGenericHandler< CIOCommon >, dawn::CGenericHandler< CProgCommon >, dawn::CGenericHandler< CProtoCommon >, dawn::CIOHandler, dawn::CProgHandler, and dawn::CProtoHandler.


The documentation for this class was generated from the following file: