ifw-daq
2.1.0-pre1
IFW Data Acquisition modules
|
Go to the documentation of this file.
8 #ifndef OCM_DAQ_TEST_ASYNC_OP_BASE_HPP_
9 #define OCM_DAQ_TEST_ASYNC_OP_BASE_HPP_
12 #include <gmock/gmock.h>
13 #include <gtest/gtest.h>
14 #include <log4cplus/logger.h>
15 #include <boost/asio/io_context.hpp>
29 *result_listener <<
"where the id is" << (arg->getId());
30 return arg && arg->getId() == id;
50 std::shared_ptr<daq::ObservableStatus>
m_status;
64 void SetUp()
override;
67 template<
class SourceType>
68 std::vector<daq::Source<SourceType>>
70 std::vector<daq::Source<SourceType>> dest;
71 dest.reserve(sources.size());
72 std::transform(std::make_move_iterator(sources.begin()), std::make_move_iterator(sources.end()),
74 return daq::Source<SourceType>{std::move(s)};
82 #endif // #ifndef OCM_DAQ_TEST_ASYNC_OP_BASE_HPP_
std::vector< daq::Source< daq::MetaSource > > m_meta_sources
Contains declaration for classes related to pending replies.
Declarations for daq::Source and related classes.
std::shared_ptr< daq::MetaDaqAsyncMock > m_meta_rr_client
StatusObserverMock m_observer
Defines shared test utilities.
log4cplus::Logger m_logger
std::shared_ptr< daq::RecCmdsAsyncMock > m_prim_rr_client2
std::shared_ptr< daq::ObservableEventLog > m_event_log
Adapts boost::asio::io_context into a compatible boost::thread Executor type.
std::shared_ptr< daq::MetaDaqAsyncMock > m_meta_rr_client2
Simple class that holds the source and associated state.
Mockup of metadaqif classes.
std::vector< daq::Source< daq::PrimSource > > m_prim_sources
boost::promise< std::string > m_string_promise2
rad::IoExecutor m_executor
boost::promise< std::shared_ptr< recif::RecStatus > > m_recstatus_promise1
Base fixture for async operation tests.
Contains declaration for Status and ObservableStatus.
MATCHER_P(RecPropertyIdEq, id, "")
daq::op::AlertState m_alerts
Simple observer used for testing.
boost::asio::io_context m_io_ctx
std::shared_ptr< daq::RecCmdsAsyncMock > m_prim_rr_client
boost::promise< std::shared_ptr< recif::RecStatus > > m_recstatus_promise2
std::vector< daq::Source< SourceType > > MakeSources(std::vector< SourceType > sources)
Parameters required for each async operation.
std::shared_ptr< daq::PendingReplies > m_pending_replies
std::shared_ptr< daq::ObservableStatus > m_status
boost::promise< std::string > m_string_promise1