45 .
name =
"fairmq-device-proxy",
60 std::function<fair::mq::Channel&(std::string
const&)> bindByName = [device](std::string
const& channelName) -> fair::mq::Channel& {
61 auto channel = device->GetChannels().find(channelName);
62 if (channel == device->GetChannels().end()) {
63 LOGP(fatal,
"Expected channel {} not configured.", channelName);
65 return channel->second.at(0);
68 std::function<bool()> newStateCallback = [device]() ->
bool {
69 return device->NewStatePending();
71 proxy->bind(outputs, inputs, forwards, bindByName, newStateCallback); },
78 .
name =
"fairmq-backend",
79 .uniqueId = CommonServices::simpleServiceId<MessageContext>(),
86 auto dispatcher = [&dataSender](fair::mq::Parts&& parts,
ChannelIndex channelIndex,
unsigned int) {
87 dataSender.send(parts, channelIndex);
91 if (policy.triggerMatcher ==
nullptr) {
94 return policy.triggerMatcher(
Output{header});