DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
DaphneV3Interface.hxx
Go to the documentation of this file.
1
10template<class T>
12
13 std::unique_lock<std::mutex> lock(m_access_mutex);
14
15 _send(std::move(message), sent_type);
16
17 auto ret = _receive();
18
19 lock.unlock();
20
21 const auto ty = ret.type();
22 T out;
23 if ( ty != received_type ) {
24 throw FailedDecoding(ERS_HERE, out.GetTypeName(), ret.payload(),
25 TypeMismatch(ERS_HERE, MessageTypeV2_Name(ty), MessageTypeV2_Name(received_type)) );
26 }
27
28 if (!out.ParseFromString(ret.payload())) {
29 throw FailedDecoding(ERS_HERE, out.GetTypeName(), ret.payload());
30 }
31
32 return out;
33}
34
35
36
37
#define ERS_HERE
daphne::ControlEnvelopeV2 send(std::string &&message, daphne::MessageTypeV2)
void _send(std::string &&message, daphne::MessageTypeV2)
FELIX Initialization std::string initerror FELIX queue timed out