8 #include <gtest/gtest.h>
13 using namespace ::testing;
15 TEST(Conversion, MakeOcmIfSubState) {
17 using daqif::operator==;
19 FullState({daqif::StateAcquiring, daqif::NotStarted}));
21 FullState({daqif::StateAcquiring, daqif::Acquiring}));
23 FullState({daqif::StateAcquiring, daqif::Stopping}));
25 FullState({daqif::StateAcquiring, daqif::Stopped}));
27 FullState({daqif::StateAcquiring, daqif::Aborting}));
30 FullState({daqif::StateMerging, daqif::NotScheduled}));
32 FullState({daqif::StateMerging, daqif::Scheduled}));
34 FullState({daqif::StateMerging, daqif::Transferring}));
36 FullState({daqif::StateMerging, daqif::Merging}));
38 FullState({daqif::StateMerging, daqif::Releasing}));
40 FullState({daqif::StateMerging, daqif::Aborting}));
43 FullState({daqif::StateCompleted, daqif::Completed}));
45 FullState({daqif::StateCompleted, daqif::Aborted}));
48 TEST(Conversion, MakeDaqState) {
66 EXPECT_THROW(
daq::MakeState({daqif::StateAcquiring,
static_cast<daqif::DaqSubState
>(-123)}),
67 std::invalid_argument);
Contains support functions for daqif.
Declares daq::State and related functions.
daqif::FullState MakeState(State state) noexcept
Converts daq::State to DaqSubstate.
@ Completed
Completed DAQ.
@ NotScheduled
Before daq is acknowledged by dpm it remains in NotScheduled.
@ Scheduled
daq is acknowledged by dpm and is scheduled for merging (i.e.
@ Releasing
Releasing Data Product to receivers.
@ Aborted
Data acquisition has been aborted by user.
@ Merging
DAQ is being merged.
@ Stopping
Transitional state between Acquiring and Stopped.
@ AbortingMerging
Transitional state for aborting during merging.
@ Transferring
Input files are being transferred.
@ Acquiring
All data sources have reported data acquisition is in progress.
@ Stopped
All data sources have reported they have stopped acquiring data.
@ AbortingAcquiring
Transitional state for aborting during acquisition.
@ NotStarted
Initial state of data acquisition.
Describes the full state and substate.
TEST(Conversion, MakeOcmIfSubState)
EXPECT_EQ(meta.rr_uri, "zpb.rr://meta")