Dawn Framework 1.0
Universal data acquisition framework for embedded systems
dawn.hxx
1// dawn/include/dawn/dawn.hxx
2//
3// SPDX-License-Identifier: Apache-2.0
4//
5
6#pragma once
7
8#include "dawn/system/handler.hxx"
9#include "dawn/io/handler.hxx"
10#include "dawn/porting/config.hxx"
11#include "dawn/prog/handler.hxx"
12#include "dawn/proto/handler.hxx"
13
14namespace dawn
15{
22class CDawn
23{
24public:
39 explicit CDawn(IIOFactory *iofactory = nullptr,
40 IProgFactory *progfactory = nullptr,
41 IProtoFactory *protofactory = nullptr);
42
49 ~CDawn() = default;
50
62 int load_descriptor(uint32_t *bin, size_t len);
63
72 int start(bool no_loop = false);
73
74private:
77 CDescriptor desc;
78
85 CIOHandler io;
86
93 CProgHandler prog;
94
101 CProtoHandler proto;
102
110 CSystemHandler system;
111
118 IIOFactory *userIOFactory;
119
126 IProgFactory *userProgFactory;
127
134 IProtoFactory *userProtoFactory;
135
136#ifdef CONFIG_DAWN_DESC_SWITCH
144 int load_descriptor_from_slot(uint8_t slot);
145#endif
146};
147} // Namespace dawn
Main orchestrator class that integrates all Dawn components.
Definition dawn.hxx:23
int load_descriptor(uint32_t *bin, size_t len)
Load and initialize descriptor.
Definition dawn.cxx:25
int start(bool no_loop=false)
Start Dawn framework.
Definition dawn.cxx:145
~CDawn()=default
Destructor.
Binary device descriptor manager.
Manages I/O object lifecycle and dispatch.
Definition handler.hxx:37
Manages Programs object lifecycle and dispatch.
Definition handler.hxx:28
Manages PROTO object lifecycle and dispatch.
Definition handler.hxx:28
Handler for SYSTEM objects (OBJTYPE_ANY, cls != 0).
Definition handler.hxx:17
Abstract factory interface for extensible I/O object creation.
Definition factory.hxx:20
Abstract factory interface for PROG object creation.
Definition factory.hxx:20
Abstract factory interface for protocol creation.
Definition factory.hxx:17
Out-of-tree user-extension hooks for Dawn.
Definition bindable.hxx:13