ifw-daq  3.0.1
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::system_clock >
 
using Clock = TimePoint::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::map< std::size_t, ReceiverStatusreceivers
 Receiver processing (e.g. More...
 
std::string result
 Path to resulting data product. More...
 
TimePoint timestamp
 Timestamp of last update. More...
 

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 153 of file status.hpp.

Member Typedef Documentation

◆ Clock

using daq::Status::Clock = TimePoint::clock

Definition at line 155 of file status.hpp.

◆ TimePoint

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

Definition at line 154 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
Parameters
idDAQ id
file_idFile identifier (OLAS compatible).

Definition at line 157 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 146 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 172 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 167 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 30 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 19 of file status.cpp.

Member Data Documentation

◆ alerts

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

Active alerts.

Definition at line 181 of file status.hpp.

◆ error

bool daq::Status::error = false

Definition at line 177 of file status.hpp.

◆ file_id

std::string daq::Status::file_id

Definition at line 175 of file status.hpp.

◆ id

std::string daq::Status::id

Definition at line 174 of file status.hpp.

◆ receivers

std::map<std::size_t, ReceiverStatus> daq::Status::receivers

Receiver processing (e.g.

olas or rsync) status.

Key represents corresponding DpSpec::receivers index.

Definition at line 188 of file status.hpp.

◆ result

std::string daq::Status::result

Path to resulting data product.

Definition at line 193 of file status.hpp.

◆ state

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

Definition at line 176 of file status.hpp.

◆ timestamp

TimePoint daq::Status::timestamp

Timestamp of last update.

Definition at line 198 of file status.hpp.


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