ifw-daq 3.1.0
IFW Data Acquisition modules
Loading...
Searching...
No Matches
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, 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
 
std::vector< Alertalerts
 Active alerts.
 
std::map< std::size_t, ReceiverStatusreceivers
 Receiver processing (e.g.
 
std::string result
 Path to resulting data product.
 
TimePoint timestamp
 Timestamp of last update.
 

Related Functions

(Note that these are not member functions.)

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

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

Member Typedef Documentation

◆ Clock

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

Definition at line 166 of file status.hpp.

◆ TimePoint

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

Definition at line 165 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 161 of file status.cpp.

◆ Status() [3/5]

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

Definition at line 152 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 175 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 170 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 clear. If key is '*' then all alerts with matching category is cleared.
Returns
true if there was an alert to clear, false otherwise.

Definition at line 31 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 20 of file status.cpp.

Member Data Documentation

◆ alerts

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

Active alerts.

Definition at line 190 of file status.hpp.

◆ file_id

std::string daq::Status::file_id

Definition at line 185 of file status.hpp.

◆ id

std::string daq::Status::id

Definition at line 184 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 197 of file status.hpp.

◆ result

std::string daq::Status::result

Path to resulting data product.

Definition at line 202 of file status.hpp.

◆ state

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

Definition at line 186 of file status.hpp.

◆ timestamp

TimePoint daq::Status::timestamp

Timestamp of last update.

Definition at line 207 of file status.hpp.


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