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
template
<
class
T>
10
T
11
dunedaq::daphnemodules::DaphneV3Interface::send
(std::string&& message,
12
daphne::MessageTypeV2
sent_type,
13
daphne::MessageTypeV2
received_type)
14
{
15
16
std::unique_lock<std::mutex> lock(
m_access_mutex
);
17
18
_send
(std::move(message), sent_type);
19
20
auto
ret =
_receive
();
21
22
lock.unlock();
23
24
const
auto
ty = ret.type();
25
T
out
;
26
if
(ty != received_type) {
27
throw
FailedDecoding(
ERS_HERE
,
28
out
.GetTypeName(),
29
ret.payload(),
30
TypeMismatch(
ERS_HERE
, MessageTypeV2_Name(ty), MessageTypeV2_Name(received_type)));
31
}
32
33
if
(!
out
.ParseFromString(ret.payload())) {
34
throw
FailedDecoding(
ERS_HERE
,
out
.GetTypeName(), ret.payload());
35
}
36
37
return
out
;
38
}
ERS_HERE
#define ERS_HERE
Definition
LocalContext.hpp:127
dunedaq::daphnemodules::DaphneV3Interface::m_access_mutex
std::mutex m_access_mutex
Definition
DaphneV3Interface.hpp:103
dunedaq::daphnemodules::DaphneV3Interface::send
daphne::ControlEnvelopeV2 send(std::string &&message, daphne::MessageTypeV2)
Definition
DaphneV3Interface.cpp:74
dunedaq::daphnemodules::DaphneV3Interface::_send
void _send(std::string &&message, daphne::MessageTypeV2)
Definition
DaphneV3Interface.cpp:85
dunedaq::daphnemodules::DaphneV3Interface::_receive
daphne::ControlEnvelopeV2 _receive()
Definition
DaphneV3Interface.cpp:108
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.18.0