ifw-daq  3.0.0-pre2
IFW Data Acquisition modules
Namespaces | Classes | Typedefs | Enumerations | Functions
daq Namespace Reference

Namespaces

 alert
 
 config
 
 dpm
 
 error
 
 fits
 
 json
 
 op
 
 test
 
 v1
 
 v2
 

Classes

struct  DaqContext
 Structure carrying context needed to start a Data Acquisition and construct a Data Product Specification needed to execute merge. More...
 
struct  OcmAsyncOperations
 OCM Async operations. More...
 
class  DaqControllerFactory
 Abstract factory for DaqControllers. More...
 
class  DaqControllerFactoryDefault
 Default factory producing "real" implementations. More...
 
class  DaqController
 Controls the execution of single data acquisition that ultimately result in a set of FITS keywords and/or FITS files. More...
 
class  CommonDaqController
 Implements common behaviour of OcmDaqController and DpmDaqController. More...
 
class  OcmDaqController
 Implements daq::DaqController for states responsible to be executed by OCM. More...
 
class  DpmDaqController
 Implements behaviour from the state NotScheduled to Completed. More...
 
class  DpmClient
 Interface to DPM server. More...
 
struct  DpmClientParams
 Connection parameters for DPM. More...
 
class  DpmClientImpl
 
class  DpPart
 Provides information of the location and source of a FITS file or keywords produced by a data acquisition. More...
 
class  DaqOperationAborted
 Started operation was aborted. More...
 
class  DaqOperationTimeout
 Started operation timed out. More...
 
class  DaqSourceError
 Represents error in single source. More...
 
class  DaqSourceErrors
 Exception thrown to carry reply errors. More...
 
struct  GenericEvent
 Represents a generic event if a more specific event is not usable. More...
 
struct  ActionEvent
 Event related to an action being requested or performed. More...
 
struct  UserActionEvent
 Event directly related to user action, such as a command to do something. More...
 
struct  ErrorEvent
 
struct  EventLog
 Represents a collection of events. More...
 
class  ObservableEventLog
 Stores data acquisition status and allows subscription to status changes. More...
 
class  EventLogObserverLogger
 A simple daq::ObservableEventLog observer that logs observed events to provided logger. More...
 
struct  LogLevel
 ly typed log4cplus::LogLevel (which is an alias to int) More...
 
class  Trim
 Trim string from whitespace (' ', '
') More...
 
struct  ManagerParams
 Configurations parameters directly related to manager. More...
 
class  StatusSignal
 Observes any status. More...
 
class  Manager
 Manager owns DaqController and FitsController (active data acquisitions) instances and multiplexes requests to them. More...
 
class  ManagerImpl
 Implements daq::Manager. More...
 
class  ReplyToken
 Token representing a not-yet-received reply. More...
 
class  PendingReplies
 Simple class that allows you to keep track of how many replies are pending. More...
 
class  AsyncProcessIf
 Interface to asynchronous process. More...
 
class  AsyncProcess
 Represents a subprocess as an asynchronous operation. More...
 
struct  RsyncOptions
 Options controlling rsync invocation. More...
 
struct  RsyncProgress
 Describes file transfer progress,. More...
 
class  RsyncAsyncProcessIf
 More specialized version for rsync which also monitors transfer progress. More...
 
class  RsyncAsyncProcess
 Represents an rsync process as an asynchronous operation. More...
 
struct  Source
 Simple class that holds the source and associated state. More...
 
class  PrimSource
 Keeps relevant state to be able to communicate with a primary data source. More...
 
class  MetaSource
 Keeps relevant state to be able to communicate with a primary data source. More...
 
class  DaqSources
 Data acquisition sources. More...
 
struct  AlertId
 Uniquely identfies an alert. More...
 
struct  Alert
 Describes an active Data Acquisition alert. More...
 
struct  Status
 Non observable status object that keeps stores status of data acquisition. More...
 
class  ObservableStatus
 Stores data acquisition status and allows subscription to status changes. More...
 
struct  Result
 Utility class that represents a result and an error. More...
 
struct  Result< void >
 
class  Workspace
 Interface to interact with DPM workspace. More...
 
class  WorkspaceImpl
 Implementation of daq::Workspace. More...
 
struct  DaqControllerMock
 Mock version of daq::DaqController. More...
 
struct  DaqControllerFactoryFake
 Factory that creates mock versions. More...
 
struct  DpmDaqControlAsyncMock
 
class  DpmClientMock
 Combined mock and fake of interface to DPM server. More...
 
struct  MetaDaqAsyncMock
 
struct  DaqReplyMock
 
struct  DaqStopReplyMock
 
struct  DaqStatusMock
 
struct  MockWorkspace
 
struct  RecCmdsAsyncMock
 
struct  RecStatusMock
 
class  TestDpmDaqController
 Fixture for daq::DaqController life cycle tests. More...
 
struct  MakeDpSpecV1
 
struct  MakeDpSpecV2
 
class  TestSource
 Test fixture for source tests. More...
 
struct  JsonObject
 
struct  JsonObject< E, std::string >
 
struct  JsonObject< E, double >
 
struct  MockAsyncProcess
 Combined fake/mock. More...
 
struct  MockRsyncAsyncProcess
 

Typedefs

using DaqReplyPtr = std::shared_ptr< daqif::DaqReply >
 
using DpParts = std::vector< DpPart >
 
using SourceVariant = std::variant< PrimSource, MetaSource >
 

Enumerations

enum class  ErrorPolicy { Strict = 0 , Tolerant }
 Error policy supported by certain operations. More...
 
enum class  State {
  DAQ states handled by OCM. , NotStarted = 0 , Starting = 1 , Acquiring = 2 ,
  Stopping = 3 , Stopped = 4 , NotScheduled = 10 , AbortingAcquiring = 2001 ,
  Scheduled = 11 , Transferring = 12 , Merging = 13 , Releasing = 14 ,
  AbortingMerging = 2010 , Aborted = 2000 , Completed = 3000
}
 Observable states of the data acquisition process. More...
 

Functions

daqif::DaqStatus & operator<< (daqif::DaqStatus &status, Status const &rhs)
 Convert daq::Status -> daqif::DaqStatus by populating from rhs. More...
 
Statusoperator<< (Status &status, daqif::DaqStatus const &rhs)
 Convert daqif::DaqStatus -> daq::Status by populating from rhs. More...
 
std::filesystem::space_info & operator<< (std::filesystem::space_info &space, daqif::StorageStatus const &rhs)
 Populate space from rhs. More...
 
daqif::StorageStatus & operator<< (daqif::StorageStatus &storage, std::filesystem::space_info &rhs)
 Populate storage from rhs. More...
 
daqif::FullState MakeState (State state) noexcept
 Converts daq::State to DaqSubstate. More...
 
State MakeState (daqif::FullState state)
 Converts DaqSubstate to daq::State. More...
 
std::string_view ToString (daqif::DaqState state) noexcept
 
std::string_view ToString (daqif::DaqSubState state) noexcept
 
bool operator== (DaqContext const &lhs, DaqContext const &rhs) noexcept
 
bool operator== (DaqContext::Source const &lhs, DaqContext::Source const &rhs) noexcept
 
void UpdateKeywords (DaqContext &ctx, fits::KeywordVector const &keywords)
 Updates (adds or replaces) primary HDU keywords. More...
 
void AddDpParts (DaqContext &ctx, std::vector< DpPart > const &parts)
 
std::ostream & operator<< (std::ostream &os, DaqController const &daq)
 
std::ostream & operator<< (std::ostream &os, DpPart const &part) noexcept
 
std::ostream & operator<< (std::ostream &os, ErrorPolicy policy)
 
std::ostream & operator<< (std::ostream &os, GenericEvent const &s)
 
std::ostream & operator<< (std::ostream &os, ErrorEvent const &s)
 
NLOHMANN_JSON_SERIALIZE_ENUM(State, { {State::NotStarted, "NotStarted"}, {State::Starting, "Starting"}, {State::Acquiring, "Acquiring"}, {State::Stopping, "Stopping"}, {State::Stopped, "Stopped"}, {State::NotScheduled, "NotScheduled"}, {State::Scheduled, "Scheduled"}, {State::Transferring, "Transferring"}, {State::Merging, "Merging"}, {State::Releasing, "Releasing"}, {State::AbortingAcquiring, "AbortingAcquiring"}, {State::AbortingMerging, "AbortingMerging"}, {State::Aborted, "Aborted"}, {State::Completed, "Completed"}, }) void to_json(nlohmann void to_json (nlohmann::json &j, Alert const &p)
 
void to_json (nlohmann::json &j, DaqContext const &p)
 
void to_json (nlohmann::json &j, DaqContext::Source const &p)
 
void to_json (nlohmann::json &j, DpPart const &p)
 
void from_json (nlohmann::json const &j, Status &p)
 
void from_json (nlohmann::json const &j, Alert &p)
 
void from_json (nlohmann::json const &j, DaqContext &p)
 
void from_json (nlohmann::json const &j, DaqContext::Source &p)
 
void from_json (nlohmann::json const &j, DpPart &p)
 
std::istream & operator>> (std::istream &is, LogLevel &level)
 Parse log level from string. More...
 
std::ostream & operator<< (std::ostream &os, LogLevel level)
 Format log level to stream. More...
 
json::DpSpec MakeDataProductSpecification (DaqContext const &ctx, log4cplus::Logger &logger)
 Creates a Data Product Specification as serialized JSON from the provided DaqContext. More...
 
std::string MakeIdCandidate (char const *instrument_id, unsigned jitter=0, std::chrono::system_clock::time_point *out=nullptr)
 Creates a DAQ id candidate that may or may not be unique. More...
 
std::optional< RsyncProgressParseRsyncProgress (std::string const &line) noexcept
 Parse progress update from rsync. More...
 
std::ostream & operator<< (std::ostream &os, State state)
 Prints state string representation to os. More...
 
bool IsFinalState (State state) noexcept
 Query whether state is in a final state. More...
 
bool IsSubsequentState (State state1, State state2) noexcept
 Compares states and returns whether state1 occurs after state2. More...
 
bool operator== (AlertId const &lhs, AlertId const &rhs) noexcept
 
bool operator!= (AlertId const &lhs, AlertId const &rhs) noexcept
 
std::ostream & operator<< (std::ostream &os, AlertId const &s)
 
Alert MakeAlert (std::string_view category, std::string key, std::string description)
 Construct alert. More...
 
Alert MakeAlert (AlertId id, std::string description)
 
AlertId MakeAlertId (std::string_view category, std::string key)
 
bool operator== (Alert const &lhs, Alert const &rhs) noexcept
 Comparison operator for Alert. More...
 
bool operator== (Alert const &lhs, AlertId const &rhs) noexcept
 
bool operator== (AlertId const &lhs, Alert const &rhs) noexcept
 
bool operator!= (Alert const &lhs, Alert const &rhs) noexcept
 
std::ostream & operator<< (std::ostream &os, Alert const &s)
 
std::ostream & operator<< (std::ostream &os, std::vector< Alert > const &s)
 
void SetAlert (std::vector< Alert > &alerts, Alert alert)
 Set alert. More...
 
bool ClearAlert (std::vector< Alert > &alerts, AlertId const &alert)
 Clear alert. More...
 
std::ostream & operator<< (std::ostream &os, Status const &s)
 
std::ostream & operator<< (std::ostream &os, ObservableStatus const &s)
 
void to_json (nlohmann::json &j, Status const &p)
 
std::ostream & operator<< (std::ostream &os, Trim const &trim)
 
std::string MakeOcmName (DaqContext const &ctx)
 
json::FitsKeywordsSource MakeOcmKeywords (DaqContext const &ctx, log4cplus::Logger &logger)
 Make OCM keywords source. More...
 
bool IsStale (ManagerParams const &params, State state, std::chrono::system_clock::time_point creation_time)
 
 TEST (TestDaqContext, Files)
 
 TEST (TestDaqContext, Keywords)
 
 TEST_F (TestDpmDaqController, StatusUpdateInNotScheduledSucceeds)
 
 TEST_F (TestDpmDaqController, StatusOverrideFromOcmAbortedToDpmMergingSucceeds)
 Test that DPM can override status of OCM as it is the authoratitive source of DAQ status. More...
 
 TEST_F (TestDpmDaqController, StartAsyncThrows)
 
 TEST_F (TestDpmDaqController, StopAsyncThrows)
 
 TEST_F (TestDpmDaqController, UpdateKeywordsThrows)
 
 TEST_F (TestDpmDaqController, ScheduleMergeAsyncSucceedsIfDpmSucceeds)
 
 TEST_F (TestDpmDaqController, ScheduleMergeAsyncSucceedsIfDpmSucceedsWithStatusSignalReceivedBeforeReply)
 
 TEST_F (TestDpmDaqController, ScheduleMergeAsyncFailsIfDpmFails)
 
 TEST_F (TestDpmDaqController, ScheduleMergeAsyncFailsIfTimeout)
 
 TEST_F (TestDpmDaqController, ScheduleMergeAsyncFailsIfAlreadyScheduled)
 
 TEST_F (TestDpmDaqController, AbortAsyncAbortImmediatelyIfNoPendingRequestsExist)
 
 TEST_F (TestDpmDaqController, AbortAsyncWithStrictPolicyAbortsIfDpmAborts)
 
 TEST_F (TestDpmDaqController, AbortAsyncWithStrictPolicyDoesNothingIfDpmAbortFails)
 
 TEST (TestJson, SerializeStatus)
 
 TEST (TestJson, DaqContext)
 
 TEST (TestJson, DaqContextWithSpecification)
 
 TEST_F (MakeDpSpecV1, DefaultDaqContextFails)
 
 TEST_F (MakeDpSpecV1, Success)
 
 TEST_F (MakeDpSpecV2, DefaultDaqContextFails)
 
 TEST_F (MakeDpSpecV2, SuccessWithMergeTarget)
 
 TEST_F (MakeDpSpecV2, SuccessWithoutMergeTarget)
 
 TEST_F (TestSource, Constructors)
 
 TEST_F (TestSource, Accessors)
 
 TEST_F (TestSource, PrimSourceConstructionFailsIfRrClientIsInvalid)
 
 TEST_F (TestSource, PrimSourceConstructionFailsIfNameIsEmpty)
 
 TEST_F (TestSource, MetaSourceConstructionFailsIfRrClientIsInvalid)
 
 TEST_F (TestSource, MetaSourceConstructionFailsIfNameIsEmpty)
 
template<class E , class... Args>
MakeParseException (JsonPointer const &ptr, Args &&... args)
 
template<class E , char const * >
MakeParseException (JsonPointer const &ptr, char const *str)
 
template<class E >
MakeValueMissingException (JsonPointer const &ptr)
 
template<class E >
MakeWrongTypeException (JsonPointer const &ptr, char const *expected_type, char const *actual_type)
 
template<class E >
MakeUnknownVariantException (JsonPointer const &ptr, char const *known_variants, char const *actual_variant)
 
template<class E >
std::pair< Json const &, JsonPointerGetMember (Json const &json, char const *name, JsonPointer const &breadcrumb)
 
template<class E , class BinaryFunction >
std::pair< Json const &, JsonPointerGetMember (Json const &json, char const *name, JsonPointer const &breadcrumb, BinaryFunction const &f)
 
template<class E >
void AssertIsObject (Json const &json, JsonPointer const &breadcrumb)
 
template<class E >
void AssertIsArray (Json const &json, JsonPointer const &breadcrumb)
 
template<class E >
std::vector< std::string > ParseArrayOfString (Json const &json, JsonPointer const &breadcrumb)
 

Class Documentation

◆ daq::DpmClientParams

struct daq::DpmClientParams

Connection parameters for DPM.

Definition at line 74 of file dpmClient.hpp.

Class Members
string ps_uri
string rr_uri
seconds timeout

◆ daq::LogLevel

struct daq::LogLevel

ly typed log4cplus::LogLevel (which is an alias to int)

Definition at line 22 of file log4cplus.hpp.

Class Members
LogLevel value

◆ daq::ManagerParams

struct daq::ManagerParams

Configurations parameters directly related to manager.

Definition at line 35 of file manager.hpp.

Class Members
hours acquiring_stale_age Age of DAQ in acquiring state after which it is automatically considered abandoned and will be archived without further action at startup.
string instrument_id Instrument identifier.
hours merging_stale_age Age of DAQ in merging state, after which it is automatically considered abandoned and will be archived without further action at startup.
string origin

◆ daq::RsyncOptions

struct daq::RsyncOptions

Options controlling rsync invocation.

Definition at line 28 of file rsyncAsyncProcess.hpp.

Class Members
optional< unsigned > bw_limit Enables rate-limiting in kb/s.
optional< bool > inplace –inplace/–no-inplace
optional< string > rsync Binary to use.
optional< seconds > timeout I/O timeout.
optional< bool > whole_file Transfer with/without delta xfer algorithm.

◆ daq::RsyncProgress

struct daq::RsyncProgress

Describes file transfer progress,.

Definition at line 55 of file rsyncAsyncProcess.hpp.

Class Members
float progress Progress as fraction of 1 (complete == 1.0)
seconds remaining Estimated remaining time.
float speed Transfer speed in bytes/sec.
uint64_t transferred Number of transferred bytes.

◆ daq::AlertId

struct daq::AlertId

Uniquely identfies an alert.

Definition at line 52 of file status.hpp.

Class Members
string category Standardized category.
string key Unique key for each alert.

◆ daq::Alert

struct daq::Alert

Describes an active Data Acquisition alert.

category and key make up the unique identifier of an alert.

Definition at line 72 of file status.hpp.

Class Members
typedef system_clock Clock
typedef time_point TimePoint
Class Members
string description
AlertId id
TimePoint timestamp

◆ daq::Result

struct daq::Result

template<class T = void, class ErrorType = bool>
struct daq::Result< T, ErrorType >

Utility class that represents a result and an error.

Definition at line 17 of file utility.hpp.

Class Members
ErrorType error
T result

◆ daq::Result< void >

struct daq::Result< void >

Definition at line 23 of file utility.hpp.

Class Members
bool error

Typedef Documentation

◆ DaqReplyPtr

using daq::DaqReplyPtr = typedef std::shared_ptr<daqif::DaqReply>

Definition at line 19 of file dpmClient.cpp.

◆ DpParts

using daq::DpParts = typedef std::vector<DpPart>

Definition at line 66 of file dpPart.hpp.

◆ SourceVariant

using daq::SourceVariant = typedef std::variant<PrimSource, MetaSource>

Definition at line 179 of file source.hpp.

Enumeration Type Documentation

◆ ErrorPolicy

enum daq::ErrorPolicy
strong

Error policy supported by certain operations.

Fatal for any policy refers to the operation is aborted and reported as failed (typically using exceptions).

Enumerator
Strict 

Any error is considered fatal and may lead to the operation being aborted.

Tolerant 

Errors that can be ignored with partial completion of a command will be tolerated and is reported as successful.

Definition at line 25 of file error.hpp.

◆ State

enum daq::State
strong

Observable states of the data acquisition process.

Final states are either Completed* or Aborted*.

life-cycle is fully sequential apart from Aborting and Aborted:

The states implemented in OCM are:

NotStarted -> Starting -> Acquiring -> Stopping -> Stopped -> <NotScheduled>

and the remaining in DPM for executing the merging (handover is done in state NotScheduled):

<NotScheduled> -> Scheduled -> Transferring -> Merging -> Releasing -> Completed*

Each state apart from Completed may transition (optionally via Aborting) to Aborted*.

Aborting -> Aborted*.

Where the state

Enumerator
DAQ states handled by OCM. 

Initial state of data acquisition.

NotStarted 

Initial state of data acquisition.

Starting 

Transitional state between NotStarted and Acquiring when sources have not begun acquiring data yet.

Acquiring 

All data sources have reported data acquisition is in progress.

Stopping 

Transitional state between Acquiring and Stopped.

Stopped 

All data sources have reported they have stopped acquiring data.

NotScheduled 

Before daq is acknowledged by dpm it remains in NotScheduled.

OCM may have attempted to schedule merging in this state so no more modifications are allowed from this point (e.g. updating keywords).

AbortingAcquiring 

Transitional state for aborting during acquisition.

Scheduled 

daq is acknowledged by dpm and is scheduled for merging (i.e.

the daq is in the backlog).

Transferring 

Input files are being transferred.

Merging 

DAQ is being merged.

Releasing 

Releasing Data Product to receivers.

AbortingMerging 

Transitional state for aborting during merging.

Aborted 

Data acquisition has been aborted by user.

Completed 

Completed DAQ.

Definition at line 39 of file state.hpp.

Function Documentation

◆ AddDpParts()

void daq::AddDpParts ( DaqContext ctx,
std::vector< DpPart > const &  parts 
)

Definition at line 36 of file daqContext.cpp.

◆ AssertIsArray()

template<class E >
void daq::AssertIsArray ( Json const &  json,
JsonPointer const &  breadcrumb 
)

Definition at line 133 of file internalParseUtils.hpp.

◆ AssertIsObject()

template<class E >
void daq::AssertIsObject ( Json const &  json,
JsonPointer const &  breadcrumb 
)

Definition at line 126 of file internalParseUtils.hpp.

◆ ClearAlert()

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

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.

◆ from_json() [1/5]

void daq::from_json ( nlohmann::json const &  j,
Alert p 
)

Definition at line 109 of file json.cpp.

◆ from_json() [2/5]

void daq::from_json ( nlohmann::json const &  j,
DaqContext p 
)

Definition at line 119 of file json.cpp.

◆ from_json() [3/5]

void daq::from_json ( nlohmann::json const &  j,
DaqContext::Source p 
)

Definition at line 142 of file json.cpp.

◆ from_json() [4/5]

void daq::from_json ( nlohmann::json const &  j,
DpPart p 
)

Definition at line 148 of file json.cpp.

◆ from_json() [5/5]

void daq::from_json ( nlohmann::json const &  j,
Status p 
)

Definition at line 96 of file json.cpp.

◆ GetMember() [1/2]

template<class E >
std::pair<Json const&, JsonPointer> daq::GetMember ( Json const &  json,
char const *  name,
JsonPointer const &  breadcrumb 
)

Definition at line 62 of file internalParseUtils.hpp.

◆ GetMember() [2/2]

template<class E , class BinaryFunction >
std::pair<Json const&, JsonPointer> daq::GetMember ( Json const &  json,
char const *  name,
JsonPointer const &  breadcrumb,
BinaryFunction const &  f 
)

Definition at line 71 of file internalParseUtils.hpp.

◆ IsFinalState()

bool daq::IsFinalState ( State  state)
noexcept

Query whether state is in a final state.

Returns
true if state is Completed or Aborted.
false otherwise.

Definition at line 15 of file state.cpp.

◆ IsStale()

bool daq::IsStale ( ManagerParams const &  params,
State  state,
std::chrono::system_clock::time_point  creation_time 
)

Definition at line 29 of file manager.cpp.

◆ IsSubsequentState()

bool daq::IsSubsequentState ( State  state1,
State  state2 
)
noexcept

Compares states and returns whether state1 occurs after state2.

If states are the same it returns false.

This is e.g. useful to decide when an await condition is fulfillled or when to reject a wait condition because will never occur.

Returns
true if state1 occurs after state2 in the DAQ life-cycle.

Definition at line 26 of file state.cpp.

◆ MakeAlert() [1/2]

Alert daq::MakeAlert ( AlertId  id,
std::string  description 
)

Definition at line 45 of file status.cpp.

◆ MakeAlert() [2/2]

Alert daq::MakeAlert ( std::string_view  category,
std::string  key,
std::string  description 
)

Construct alert.

Definition at line 39 of file status.cpp.

◆ MakeAlertId()

AlertId daq::MakeAlertId ( std::string_view  category,
std::string  key 
)

Definition at line 49 of file status.cpp.

◆ MakeDataProductSpecification()

json::DpSpec daq::MakeDataProductSpecification ( DaqContext const &  ctx,
log4cplus::Logger &  logger 
)

Creates a Data Product Specification as serialized JSON from the provided DaqContext.

DaqContext::specification influences:

  • Source merge order
  • Merge target.
  • Keyword rules.

Definition at line 266 of file makeDpSpec.cpp.

◆ MakeIdCandidate()

std::string daq::MakeIdCandidate ( char const *  instrument_id,
unsigned  jitter = 0,
std::chrono::system_clock::time_point *  out = nullptr 
)

Creates a DAQ id candidate that may or may not be unique.

Parameters
instrument_idThe instrument ID to use for the id. Only the 5 first characters will be used if the name is longer than 5.
jitterJitter is a millisecond component added to the current time. This is meant to be used to find a unique id by adding jitter until a unique id is found.
Note
The function cannot guarantee unique ID and is the responsibility of the caller.

Definition at line 46 of file manager.cpp.

◆ MakeOcmKeywords()

json::FitsKeywordsSource daq::MakeOcmKeywords ( DaqContext const &  ctx,
log4cplus::Logger &  logger 
)

Make OCM keywords source.

Definition at line 26 of file makeDpSpec.cpp.

◆ MakeOcmName()

std::string daq::MakeOcmName ( DaqContext const &  ctx)

Definition at line 19 of file makeDpSpec.cpp.

◆ MakeParseException() [1/2]

template<class E , class... Args>
E daq::MakeParseException ( JsonPointer const &  ptr,
Args &&...  args 
)

Definition at line 24 of file internalParseUtils.hpp.

◆ MakeParseException() [2/2]

template<class E , char const * >
E daq::MakeParseException ( JsonPointer const &  ptr,
char const *  str 
)

Definition at line 30 of file internalParseUtils.hpp.

◆ MakeState() [1/2]

daq::State daq::MakeState ( daqif::FullState  state)

Converts DaqSubstate to daq::State.

This assumes daqif::DaqState is Acquiring.

Exceptions
std::invalid_argumentif state is not convertible.

Definition at line 103 of file conversion.cpp.

◆ MakeState() [2/2]

daqif::FullState daq::MakeState ( State  state)
noexcept

Converts daq::State to DaqSubstate.

Definition at line 63 of file conversion.cpp.

◆ MakeUnknownVariantException()

template<class E >
E daq::MakeUnknownVariantException ( JsonPointer const &  ptr,
char const *  known_variants,
char const *  actual_variant 
)

Definition at line 50 of file internalParseUtils.hpp.

◆ MakeValueMissingException()

template<class E >
E daq::MakeValueMissingException ( JsonPointer const &  ptr)

Definition at line 35 of file internalParseUtils.hpp.

◆ MakeWrongTypeException()

template<class E >
E daq::MakeWrongTypeException ( JsonPointer const &  ptr,
char const *  expected_type,
char const *  actual_type 
)

Definition at line 40 of file internalParseUtils.hpp.

◆ operator!=() [1/2]

bool daq::operator!= ( Alert const &  lhs,
Alert const &  rhs 
)
noexcept

Definition at line 78 of file status.cpp.

◆ operator!=() [2/2]

bool daq::operator!= ( AlertId const &  lhs,
AlertId const &  rhs 
)
noexcept

Definition at line 57 of file status.cpp.

◆ operator<<() [1/17]

daqif::DaqStatus & daq::operator<< ( daqif::DaqStatus &  status,
daq::Status const &  rhs 
)

Convert daq::Status -> daqif::DaqStatus by populating from rhs.

Definition at line 18 of file conversion.cpp.

◆ operator<<() [2/17]

daqif::StorageStatus & daq::operator<< ( daqif::StorageStatus &  storage,
std::filesystem::space_info &  rhs 
)

Populate storage from rhs.

Definition at line 56 of file conversion.cpp.

◆ operator<<() [3/17]

Status & daq::operator<< ( Status status,
daqif::DaqStatus const &  rhs 
)

Convert daqif::DaqStatus -> daq::Status by populating from rhs.

Definition at line 36 of file conversion.cpp.

◆ operator<<() [4/17]

std::filesystem::space_info & daq::operator<< ( std::filesystem::space_info &  space,
daqif::StorageStatus const &  rhs 
)

Populate space from rhs.

Definition at line 48 of file conversion.cpp.

◆ operator<<() [5/17]

std::ostream & daq::operator<< ( std::ostream &  os,
Alert const &  s 
)

Definition at line 82 of file status.cpp.

◆ operator<<() [6/17]

std::ostream & daq::operator<< ( std::ostream &  os,
AlertId const &  s 
)

Definition at line 61 of file status.cpp.

◆ operator<<() [7/17]

std::ostream & daq::operator<< ( std::ostream &  os,
DaqController const &  daq 
)

Definition at line 109 of file daqController.cpp.

◆ operator<<() [8/17]

std::ostream & daq::operator<< ( std::ostream &  os,
DpPart const &  part 
)
noexcept

Definition at line 6 of file dpPart.cpp.

◆ operator<<() [9/17]

std::ostream & daq::operator<< ( std::ostream &  os,
ErrorEvent const &  s 
)

Definition at line 50 of file eventLog.cpp.

◆ operator<<() [10/17]

std::ostream & daq::operator<< ( std::ostream &  os,
ErrorPolicy  policy 
)

Definition at line 18 of file error.cpp.

◆ operator<<() [11/17]

std::ostream & daq::operator<< ( std::ostream &  os,
GenericEvent const &  s 
)

Definition at line 44 of file eventLog.cpp.

◆ operator<<() [12/17]

std::ostream & daq::operator<< ( std::ostream &  os,
LogLevel  level 
)

Format log level to stream.

Definition at line 29 of file log4cplus.cpp.

◆ operator<<() [13/17]

std::ostream & daq::operator<< ( std::ostream &  os,
ObservableStatus const &  s 
)

Definition at line 286 of file status.cpp.

◆ operator<<() [14/17]

std::ostream & daq::operator<< ( std::ostream &  os,
State  state 
)

Prints state string representation to os.

Definition at line 48 of file state.cpp.

◆ operator<<() [15/17]

std::ostream & daq::operator<< ( std::ostream &  os,
Status const &  s 
)

Definition at line 126 of file status.cpp.

◆ operator<<() [16/17]

std::ostream & daq::operator<< ( std::ostream &  os,
std::vector< Alert > const &  s 
)

Definition at line 89 of file status.cpp.

◆ operator<<() [17/17]

std::ostream& daq::operator<< ( std::ostream &  os,
Trim const &  trim 
)
Parameters
osoutput stream to output to.
reporterReporter adapter to format.
Returns
os

Definition at line 35 of file log4cplus.cpp.

◆ operator==() [1/6]

bool daq::operator== ( Alert const &  lhs,
Alert const &  rhs 
)
noexcept

Comparison operator for Alert.

Returns
true if category and key both compares equal between lhs and rhs (description .

Definition at line 66 of file status.cpp.

◆ operator==() [2/6]

bool daq::operator== ( Alert const &  lhs,
AlertId const &  rhs 
)
noexcept

Definition at line 70 of file status.cpp.

◆ operator==() [3/6]

bool daq::operator== ( AlertId const &  lhs,
Alert const &  rhs 
)
noexcept

Definition at line 74 of file status.cpp.

◆ operator==() [4/6]

bool daq::operator== ( AlertId const &  lhs,
AlertId const &  rhs 
)
noexcept

Definition at line 53 of file status.cpp.

◆ operator==() [5/6]

bool daq::operator== ( DaqContext const &  lhs,
DaqContext const &  rhs 
)
noexcept

Definition at line 12 of file daqContext.cpp.

◆ operator==() [6/6]

bool daq::operator== ( DaqContext::Source const &  lhs,
DaqContext::Source const &  rhs 
)
noexcept

Definition at line 25 of file daqContext.cpp.

◆ operator>>()

std::istream & daq::operator>> ( std::istream &  is,
LogLevel level 
)

Parse log level from string.

Definition at line 17 of file log4cplus.cpp.

◆ ParseArrayOfString()

template<class E >
std::vector<std::string> daq::ParseArrayOfString ( Json const &  json,
JsonPointer const &  breadcrumb 
)

Definition at line 140 of file internalParseUtils.hpp.

◆ ParseRsyncProgress()

std::optional< RsyncProgress > daq::ParseRsyncProgress ( std::string const &  line)
noexcept

Parse progress update from rsync.

Parameters
linea single line in the format rsync outputs with option --info=progress2.
Returns
optional with value if parsing suceeds, empty optional otherwise.

Definition at line 60 of file rsyncAsyncProcess.cpp.

◆ SetAlert()

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

Set alert.

Parameters
alertsContainer of alert to modify.
alertto set.

Definition at line 19 of file status.cpp.

◆ TEST() [1/5]

daq::TEST ( TestDaqContext  ,
Files   
)

Definition at line 16 of file testDaqContext.cpp.

◆ TEST() [2/5]

daq::TEST ( TestDaqContext  ,
Keywords   
)

Definition at line 37 of file testDaqContext.cpp.

◆ TEST() [3/5]

daq::TEST ( TestJson  ,
DaqContext   
)

Definition at line 31 of file testJson.cpp.

◆ TEST() [4/5]

daq::TEST ( TestJson  ,
DaqContextWithSpecification   
)

Definition at line 49 of file testJson.cpp.

◆ TEST() [5/5]

daq::TEST ( TestJson  ,
SerializeStatus   
)

Definition at line 17 of file testJson.cpp.

◆ TEST_F() [1/24]

daq::TEST_F ( MakeDpSpecV1  ,
DefaultDaqContextFails   
)

Definition at line 98 of file testMakeDpSpec.cpp.

◆ TEST_F() [2/24]

daq::TEST_F ( MakeDpSpecV1  ,
Success   
)

Definition at line 103 of file testMakeDpSpec.cpp.

◆ TEST_F() [3/24]

daq::TEST_F ( MakeDpSpecV2  ,
DefaultDaqContextFails   
)

Definition at line 113 of file testMakeDpSpec.cpp.

◆ TEST_F() [4/24]

daq::TEST_F ( MakeDpSpecV2  ,
SuccessWithMergeTarget   
)

Definition at line 118 of file testMakeDpSpec.cpp.

◆ TEST_F() [5/24]

daq::TEST_F ( MakeDpSpecV2  ,
SuccessWithoutMergeTarget   
)

Definition at line 167 of file testMakeDpSpec.cpp.

◆ TEST_F() [6/24]

daq::TEST_F ( TestDpmDaqController  ,
AbortAsyncAbortImmediatelyIfNoPendingRequestsExist   
)

Definition at line 233 of file testDpmDaqController.cpp.

◆ TEST_F() [7/24]

daq::TEST_F ( TestDpmDaqController  ,
AbortAsyncWithStrictPolicyAbortsIfDpmAborts   
)

Definition at line 247 of file testDpmDaqController.cpp.

◆ TEST_F() [8/24]

daq::TEST_F ( TestDpmDaqController  ,
AbortAsyncWithStrictPolicyDoesNothingIfDpmAbortFails   
)

Definition at line 274 of file testDpmDaqController.cpp.

◆ TEST_F() [9/24]

daq::TEST_F ( TestDpmDaqController  ,
ScheduleMergeAsyncFailsIfAlreadyScheduled   
)

Definition at line 218 of file testDpmDaqController.cpp.

◆ TEST_F() [10/24]

daq::TEST_F ( TestDpmDaqController  ,
ScheduleMergeAsyncFailsIfDpmFails   
)

Definition at line 172 of file testDpmDaqController.cpp.

◆ TEST_F() [11/24]

daq::TEST_F ( TestDpmDaqController  ,
ScheduleMergeAsyncFailsIfTimeout   
)

Definition at line 195 of file testDpmDaqController.cpp.

◆ TEST_F() [12/24]

daq::TEST_F ( TestDpmDaqController  ,
ScheduleMergeAsyncSucceedsIfDpmSucceeds   
)

Definition at line 120 of file testDpmDaqController.cpp.

◆ TEST_F() [13/24]

daq::TEST_F ( TestDpmDaqController  ,
ScheduleMergeAsyncSucceedsIfDpmSucceedsWithStatusSignalReceivedBeforeReply   
)

Definition at line 143 of file testDpmDaqController.cpp.

◆ TEST_F() [14/24]

daq::TEST_F ( TestDpmDaqController  ,
StartAsyncThrows   
)

Definition at line 97 of file testDpmDaqController.cpp.

◆ TEST_F() [15/24]

daq::TEST_F ( TestDpmDaqController  ,
StatusOverrideFromOcmAbortedToDpmMergingSucceeds   
)

Test that DPM can override status of OCM as it is the authoratitive source of DAQ status.

Definition at line 81 of file testDpmDaqController.cpp.

◆ TEST_F() [16/24]

daq::TEST_F ( TestDpmDaqController  ,
StatusUpdateInNotScheduledSucceeds   
)

Definition at line 65 of file testDpmDaqController.cpp.

◆ TEST_F() [17/24]

daq::TEST_F ( TestDpmDaqController  ,
StopAsyncThrows   
)

Definition at line 105 of file testDpmDaqController.cpp.

◆ TEST_F() [18/24]

daq::TEST_F ( TestDpmDaqController  ,
UpdateKeywordsThrows   
)

Definition at line 114 of file testDpmDaqController.cpp.

◆ TEST_F() [19/24]

daq::TEST_F ( TestSource  ,
Accessors   
)

Definition at line 51 of file testSource.cpp.

◆ TEST_F() [20/24]

daq::TEST_F ( TestSource  ,
Constructors   
)

Definition at line 34 of file testSource.cpp.

◆ TEST_F() [21/24]

daq::TEST_F ( TestSource  ,
MetaSourceConstructionFailsIfNameIsEmpty   
)

Definition at line 77 of file testSource.cpp.

◆ TEST_F() [22/24]

daq::TEST_F ( TestSource  ,
MetaSourceConstructionFailsIfRrClientIsInvalid   
)

Definition at line 73 of file testSource.cpp.

◆ TEST_F() [23/24]

daq::TEST_F ( TestSource  ,
PrimSourceConstructionFailsIfNameIsEmpty   
)

Definition at line 68 of file testSource.cpp.

◆ TEST_F() [24/24]

daq::TEST_F ( TestSource  ,
PrimSourceConstructionFailsIfRrClientIsInvalid   
)

Definition at line 64 of file testSource.cpp.

◆ to_json() [1/5]

void daq::to_json ( nlohmann::json &  j,
Alert const &  p 
)

Definition at line 48 of file json.cpp.

◆ to_json() [2/5]

void daq::to_json ( nlohmann::json &  j,
DaqContext const &  p 
)

Definition at line 56 of file json.cpp.

◆ to_json() [3/5]

void daq::to_json ( nlohmann::json &  j,
DaqContext::Source const &  p 
)

Definition at line 77 of file json.cpp.

◆ to_json() [4/5]

void daq::to_json ( nlohmann::json &  j,
DpPart const &  p 
)

Definition at line 82 of file json.cpp.

◆ to_json() [5/5]

void daq::to_json ( nlohmann::json &  j,
Status const &  p 
)

Definition at line 37 of file json.cpp.

◆ ToString() [1/2]

std::string_view daq::ToString ( daqif::DaqState  state)
noexcept
Returns
string representation of enumeration.

Definition at line 142 of file conversion.cpp.

◆ ToString() [2/2]

std::string_view daq::ToString ( daqif::DaqSubState  state)
noexcept
Returns
string representation of enumeration.

Definition at line 158 of file conversion.cpp.

◆ UpdateKeywords()

void daq::UpdateKeywords ( DaqContext ctx,
fits::KeywordVector const &  keywords 
)

Updates (adds or replaces) primary HDU keywords.

Parameters
ctxContext to modify
keywordsKeywords to update with.

Definition at line 29 of file daqContext.cpp.