ifw-daq  2.1.0-pre1
IFW Data Acquisition modules
Public Types | Public Member Functions | Public Attributes | Related Functions | List of all members
daq::Status Struct Reference

Non observable status object that keeps stores status of data acquisition. More...

#include <status.hpp>

Public Types

using TimePoint = std::chrono::time_point< std::chrono::steady_clock >
 

Public Member Functions

 Status ()=default
 
 Status (std::string id, std::string file_id) noexcept
 
 Status (std::string id, std::string file_id, State state, bool error, TimePoint timestamp) noexcept
 
 Status (Status &&)=default
 
 Status (Status const &)=default
 
Statusoperator= (Status &&)=default
 
Statusoperator= (Status const &)=default
 
bool operator== (Status const &rhs) const noexcept
 
bool operator!= (Status const &rhs) const noexcept
 

Public Attributes

std::string id
 
std::string file_id
 
State state = State::NotStarted
 
bool error = false
 
std::vector< Alertalerts
 Active alerts. More...
 
std::string result
 Path to resulting data product. More...
 
TimePoint timestamp
 

Related Functions

(Note that these are not member functions.)

void SetAlert (std::vector< Alert > &alerts, Alert alert)
 Set alert. More...
 
bool ClearAlert (std::vector< Alert > &alerts, AlertId const &alert)
 Clear alert. More...
 

Detailed Description

Non observable status object that keeps stores status of data acquisition.

It is also planned to be serializable to allow crash recovery from persistent storage.

Definition at line 120 of file status.hpp.

Member Typedef Documentation

◆ TimePoint

using daq::Status::TimePoint = std::chrono::time_point<std::chrono::steady_clock>

Definition at line 121 of file status.hpp.

Constructor & Destructor Documentation

◆ Status() [1/5]

daq::Status::Status ( )
default

◆ Status() [2/5]

daq::Status::Status ( std::string  id,
std::string  file_id 
)
explicitnoexcept

Definition at line 77 of file status.cpp.

◆ Status() [3/5]

daq::Status::Status ( std::string  id,
std::string  file_id,
State  state,
bool  error,
TimePoint  timestamp 
)
noexcept

Definition at line 67 of file status.cpp.

◆ Status() [4/5]

daq::Status::Status ( Status &&  )
default

◆ Status() [5/5]

daq::Status::Status ( Status const &  )
default

Member Function Documentation

◆ operator!=()

bool daq::Status::operator!= ( Status const &  rhs) const
noexcept

Definition at line 91 of file status.cpp.

◆ operator=() [1/2]

Status& daq::Status::operator= ( Status &&  )
default

◆ operator=() [2/2]

Status& daq::Status::operator= ( Status const &  )
default

◆ operator==()

bool daq::Status::operator== ( Status const &  rhs) const
noexcept

Definition at line 86 of file status.cpp.

Friends And Related Function Documentation

◆ ClearAlert()

bool ClearAlert ( std::vector< Alert > &  alerts,
AlertId const &  alert 
)
related

Clear alert.

Parameters
alertsContainer of alert to modify.
alertto set.
Returns
true if there was an alert to clear, false otherwise.

Definition at line 20 of file status.cpp.

◆ SetAlert()

void SetAlert ( std::vector< Alert > &  alerts,
Alert  alert 
)
related

Set alert.

Parameters
alertsContainer of alert to modify.
alertto set.

Definition at line 9 of file status.cpp.

Member Data Documentation

◆ alerts

std::vector<Alert> daq::Status::alerts

Active alerts.

Definition at line 143 of file status.hpp.

◆ error

bool daq::Status::error = false

Definition at line 139 of file status.hpp.

◆ file_id

std::string daq::Status::file_id

Definition at line 137 of file status.hpp.

◆ id

std::string daq::Status::id

Definition at line 136 of file status.hpp.

◆ result

std::string daq::Status::result

Path to resulting data product.

Definition at line 148 of file status.hpp.

◆ state

State daq::Status::state = State::NotStarted

Definition at line 138 of file status.hpp.

◆ timestamp

TimePoint daq::Status::timestamp

Definition at line 149 of file status.hpp.


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