mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-12-20 01:40:17 +00:00
FairMQ: Extend Multipart and messaging API
- Extend the multipart API to allow sending vectors of messages or helper
thin wrapper FairMQParts. See example in examples/MQ/8-multipart.
- NewMessage() can be used in devices instead of
fTransportFactory->CreateMessage().
Possible arguments remain unchanged (no args, size or data+size).
- Send()/Receive() methods can be used in devices instead of
fChannels.at("chan").at(i).Send()/Receive():
Send(msg, "chan", i = 0), Receive(msg, "chan", i = 0).
- Use the new methods in MQ examples and tests.
- No breaking changes, but FAIRMQ_INTERFACE_VERSION is incremented to 3
to allow to check for new methods.
This commit is contained in:
committed by
Mohammad Al-Turany
parent
1bb72fea38
commit
bbadf09aad
@@ -55,12 +55,12 @@ int main(int argc, char** argv)
|
||||
// configure data output channel
|
||||
FairMQChannel dataInChannel("pull", "connect", "");
|
||||
dataInChannel.UpdateRateLogging(0);
|
||||
processor.fChannels["data-in"].push_back(dataInChannel);
|
||||
processor.fChannels["data1"].push_back(dataInChannel);
|
||||
|
||||
// configure data output channel
|
||||
FairMQChannel dataOutChannel("push", "connect", "");
|
||||
dataOutChannel.UpdateRateLogging(0);
|
||||
processor.fChannels["data-out"].push_back(dataOutChannel);
|
||||
processor.fChannels["data2"].push_back(dataOutChannel);
|
||||
|
||||
// Waiting for DDS properties
|
||||
dds::key_value::CKeyValue ddsKeyValue;
|
||||
@@ -97,8 +97,8 @@ int main(int argc, char** argv)
|
||||
}
|
||||
}
|
||||
|
||||
processor.fChannels.at("data-in").at(0).UpdateAddress(samplerValues.begin()->second);
|
||||
processor.fChannels.at("data-out").at(0).UpdateAddress(sinkValues.begin()->second);
|
||||
processor.fChannels.at("data1").at(0).UpdateAddress(samplerValues.begin()->second);
|
||||
processor.fChannels.at("data2").at(0).UpdateAddress(sinkValues.begin()->second);
|
||||
|
||||
processor.ChangeState("INIT_DEVICE");
|
||||
processor.WaitForEndOfState("INIT_DEVICE");
|
||||
|
||||
Reference in New Issue
Block a user