DUNE-DAQ
DUNE Trigger and Data Acquisition software
Toggle main menu visibility
Loading...
Searching...
No Matches
dunedaq
sourcecode
daphnemodules
src
DaphneV3Interface.hxx
Go to the documentation of this file.
1
8
9
10
template
<
class
T>
11
T
dunedaq::daphnemodules::DaphneV3Interface::send
( std::string && message,
daphne::MessageTypeV2
sent_type,
daphne::MessageTypeV2
received_type ) {
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
ERS_HERE
#define ERS_HERE
Definition
LocalContext.hpp:141
dunedaq::daphnemodules::DaphneV3Interface::m_access_mutex
std::mutex m_access_mutex
Definition
DaphneV3Interface.hpp:125
dunedaq::daphnemodules::DaphneV3Interface::send
daphne::ControlEnvelopeV2 send(std::string &&message, daphne::MessageTypeV2)
Definition
DaphneV3Interface.cpp:78
dunedaq::daphnemodules::DaphneV3Interface::_send
void _send(std::string &&message, daphne::MessageTypeV2)
Definition
DaphneV3Interface.cpp:88
dunedaq::daphnemodules::DaphneV3Interface::_receive
daphne::ControlEnvelopeV2 _receive()
Definition
DaphneV3Interface.cpp:109
daphne::MessageTypeV2
MessageTypeV2
Definition
daphne_control_high.pb.h:248
dunedaq::out
FELIX Initialization std::string initerror FELIX queue timed out
Definition
FelixIssues.hpp:24
Generated on
for DUNE-DAQ by
1.17.0