Dawn Framework 1.0
Universal data acquisition framework for embedded systems
handler.hxx
1// dawn/include/dawn/common/handler.hxx
2//
3// SPDX-License-Identifier: Apache-2.0
4//
5
6#pragma once
7
8#include "dawn/common/object.hxx"
9#include "dawn/porting/config.hxx"
10
11namespace dawn
12{
21{
22public:
23 virtual ~IHandler() {};
24
35 virtual int initAll() = 0;
36
46 virtual int deinitAll() = 0;
47
56 virtual int startAll() = 0;
57
66 virtual int stopAll() = 0;
67
76 virtual bool hasThread() const = 0;
77
88 virtual bool isObjectValid(SObjectId::UObjectId &obj) const = 0;
89
99 virtual CObject *getObject(const SObjectId::ObjectId id) = 0;
100};
101
109class CHandler : public IHandler
110{
111};
112} // Namespace dawn
Base implementation of IHandler interface.
Definition handler.hxx:110
Base class for all Dawn objects (IOs, Programs, Protocols).
Definition object.hxx:28
Common interface for all handler implementations.
Definition handler.hxx:21
virtual CObject * getObject(const SObjectId::ObjectId id)=0
Get object from this handler by ID.
virtual bool isObjectValid(SObjectId::UObjectId &obj) const =0
Validate if object ID is valid for this handler.
virtual int stopAll()=0
Stop all objects managed by this handler.
virtual int deinitAll()=0
De-initialize all objects managed by this handler.
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 int startAll()=0
Start all objects managed by this handler.
Out-of-tree user-extension hooks for Dawn.
Definition bindable.hxx:13
uint32_t ObjectId
ObjectID type - single 32-bit value.
Definition objectid.hxx:44
32-bit encoded object identifier (union with bit field).
Definition objectid.hxx:218