ifw-daq  3.0.0-pre2
IFW Data Acquisition modules
Classes | Public Types | Public Member Functions | List of all members
daq::dpm::DaqControllerImpl Class Reference

Internal data structure to SchedulerImpl. More...

#include <scheduler.hpp>

+ Inheritance diagram for daq::dpm::DaqControllerImpl:

Public Types

using RsyncFactory = std::function< std::unique_ptr< RsyncAsyncProcessIf >(boost::asio::io_context &, std::string const &, std::string const &, RsyncOptions const &, RsyncAsyncProcess::DryRun)>
 
using ProcFactory = std::function< std::unique_ptr< AsyncProcessIf >(boost::asio::io_context &, std::vector< std::string > const &)>
 

Public Member Functions

 DaqControllerImpl (rad::IoExecutor &executor, std::unique_ptr< DaqWorkspace > workspace, Resources &resources, RsyncFactory rsync_factory, ProcFactory proc_factory, DaqControllerOptions opts)
 Construct controller for existing workspace. More...
 
void Start () override
 Start/stop operations. More...
 
void Stop () override
 
auto IsStopped () const noexcept -> bool override
 
auto GetId () const noexcept -> std::string const &override
 
auto GetErrorFlag () const noexcept -> bool override
 
auto GetState () const noexcept -> State override
 
auto GetResult () const noexcept -> std::filesystem::path const &override
 
auto GetStatus () noexcept -> ObservableStatus &override
 
auto GetStatus () const noexcept -> ObservableStatus const &override
 
void Poll () override
 
- Public Member Functions inherited from daq::dpm::DaqController
virtual ~DaqController ()
 

Detailed Description

Internal data structure to SchedulerImpl.

Definition at line 480 of file scheduler.hpp.

Member Typedef Documentation

◆ ProcFactory

using daq::dpm::DaqControllerImpl::ProcFactory = std::function<std::unique_ptr<AsyncProcessIf>( boost::asio::io_context&, std::vector<std::string> const&)>

Definition at line 489 of file scheduler.hpp.

◆ RsyncFactory

using daq::dpm::DaqControllerImpl::RsyncFactory = std::function<std::unique_ptr<RsyncAsyncProcessIf>(boost::asio::io_context&, std::string const&, std::string const&, RsyncOptions const&, RsyncAsyncProcess::DryRun)>

Definition at line 482 of file scheduler.hpp.

Constructor & Destructor Documentation

◆ DaqControllerImpl()

daq::dpm::DaqControllerImpl::DaqControllerImpl ( rad::IoExecutor executor,
std::unique_ptr< DaqWorkspace workspace,
Resources resources,
RsyncFactory  rsync_factory,
ProcFactory  proc_factory,
DaqControllerOptions  opts 
)

Construct controller for existing workspace.

Postcondition
State is loaded from workspace.
Exceptions
std-exception(possibly nested) containing error.

Definition at line 390 of file scheduler.cpp.

Member Function Documentation

◆ GetErrorFlag()

auto daq::dpm::DaqControllerImpl::GetErrorFlag ( ) const -> bool
overridevirtualnoexcept
Returns
Error flag.

Implements daq::dpm::DaqController.

Definition at line 475 of file scheduler.cpp.

◆ GetId()

auto daq::dpm::DaqControllerImpl::GetId ( ) const -> std::string const&
overridevirtualnoexcept
Returns
data acquisition identifier.

Implements daq::dpm::DaqController.

Definition at line 471 of file scheduler.cpp.

◆ GetResult()

auto daq::dpm::DaqControllerImpl::GetResult ( ) const -> std::filesystem::path const &override
inlineoverridevirtualnoexcept
Returns
Data product filename.

Implements daq::dpm::DaqController.

Definition at line 523 of file scheduler.hpp.

◆ GetState()

auto daq::dpm::DaqControllerImpl::GetState ( ) const -> State
overridevirtualnoexcept
Returns
state of data acquisition.

Implements daq::dpm::DaqController.

Definition at line 479 of file scheduler.cpp.

◆ GetStatus() [1/2]

auto daq::dpm::DaqControllerImpl::GetStatus ( ) const -> ObservableStatus const&
overridevirtualnoexcept

Implements daq::dpm::DaqController.

Definition at line 487 of file scheduler.cpp.

◆ GetStatus() [2/2]

auto daq::dpm::DaqControllerImpl::GetStatus ( ) -> ObservableStatus&
overridevirtualnoexcept
Returns
status object associated with this daq.

Implements daq::dpm::DaqController.

Definition at line 483 of file scheduler.cpp.

◆ IsStopped()

auto daq::dpm::DaqControllerImpl::IsStopped ( ) const -> bool
overridevirtualnoexcept

Implements daq::dpm::DaqController.

Definition at line 467 of file scheduler.cpp.

◆ Poll()

void daq::dpm::DaqControllerImpl::Poll ( )
overridevirtual

Implements daq::dpm::DaqController.

Definition at line 508 of file scheduler.cpp.

◆ Start()

void daq::dpm::DaqControllerImpl::Start ( )
overridevirtual

Start/stop operations.

This assumes the implementation has an internal scheduler that it uses.

Implements daq::dpm::DaqController.

Definition at line 458 of file scheduler.cpp.

◆ Stop()

void daq::dpm::DaqControllerImpl::Stop ( )
overridevirtual

Implements daq::dpm::DaqController.

Definition at line 463 of file scheduler.cpp.


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