Dawn Framework 1.0
Universal data acquisition framework for embedded systems
dawn::CDawn Class Reference

Main orchestrator class that integrates all Dawn components. More...

#include <dawn.hxx>

Public Member Functions

 CDawn (IIOFactory *iofactory=nullptr, IProgFactory *progfactory=nullptr, IProtoFactory *protofactory=nullptr)
 Construct CDawn framework.
 ~CDawn ()=default
 Destructor.
CDevDescriptor * getDevDescriptor ()
 Get the device descriptor registry.
int load_descriptor (uint32_t *bin, size_t len)
 Load and initialize descriptor.
int start (bool no_loop=false)
 Start Dawn framework.

Detailed Description

Main orchestrator class that integrates all Dawn components.

CDawn is the primary entry point for using the Dawn framework.

Definition at line 23 of file dawn.hxx.

Constructor & Destructor Documentation

◆ CDawn()

CDawn::CDawn ( IIOFactory * iofactory = nullptr,
IProgFactory * progfactory = nullptr,
IProtoFactory * protofactory = nullptr )
explicit

Construct CDawn framework.

Creates a new Dawn framework instance with optional custom factories for extensibility.

Parameters
iofactoryOptional custom I/O object factory (nullptr uses the built-in factory).
progfactoryOptional custom program object factory (nullptr uses the built-in factory).
protofactoryOptional custom protocol object factory (nullptr uses the built-in factory).

Definition at line 18 of file dawn.cxx.

◆ ~CDawn()

dawn::CDawn::~CDawn ( )
default

Destructor.

Cleans up all framework resources.

Member Function Documentation

◆ getDevDescriptor()

CDevDescriptor * dawn::CDawn::getDevDescriptor ( )
inline

Get the device descriptor registry.

Used by dawn_main to register descriptors before load_descriptor().

Returns
Pointer to the CDevDescriptor instance owned by this CDawn.

Definition at line 73 of file dawn.hxx.

◆ load_descriptor()

int CDawn::load_descriptor ( uint32_t * bin,
size_t len )

Load and initialize descriptor.

Loads a binary device descriptor and automatically creates all configured objects.

Parameters
binPointer to binary descriptor data (32-bit aligned).
lenLength of descriptor in 32-bit words.
Returns
OK on success, negative error code on failure.

Definition at line 25 of file dawn.cxx.

◆ start()

int CDawn::start ( bool no_loop = false)

Start Dawn framework.

Transitions all components from initialized to running state.

Returns
OK on success, negative error code on failure.

Definition at line 154 of file dawn.cxx.

References dawn::CDescSwitch::clear(), dawn::CShutdown::clear(), dawn::CDescSwitch::getSwitchSlot(), dawn::CShutdown::isRequested(), dawn::CDescSwitch::isSwitchRequested(), and dawn::CDescSwitch::setActiveSlot().

Here is the call graph for this function:

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