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/io/handler.hxx"
9#include "dawn/porting/config.hxx"
10#include "dawn/prog/handler.hxx"
11#include "dawn/proto/handler.hxx"
12
13namespace dawn
14{
21class CDawn
22{
23public:
38 explicit CDawn(IIOFactory *iofactory = nullptr,
39 IProgFactory *progfactory = nullptr,
40 IProtoFactory *protofactory = nullptr);
41
48 ~CDawn() = default;
49
61 int load_descriptor(uint32_t *bin, size_t len);
62
71 int start(bool no_loop = false);
72
73private:
76 CDescriptor desc;
77
84 CIOHandler io;
85
92 CProgHandler prog;
93
100 CProtoHandler proto;
101
108 IIOFactory *userIOFactory;
109
116 IProgFactory *userProgFactory;
117
124 IProtoFactory *userProtoFactory;
125
126#ifdef CONFIG_DAWN_DESC_SWITCH
134 int load_descriptor_from_slot(uint8_t slot);
135#endif
136};
137} // Namespace dawn
Main orchestrator class that integrates all Dawn components.
Definition dawn.hxx:22
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:127
~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
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