Update multi-part features (nanomsg) and various fixes

- Implement nanomsg multipart with MessagePack.
 - Use the MessagePack from FairSoft and handle not found case.
 - Update splitter, merger and proxy devices to handle multi-part.
 - Let FairMQParts.At() return pointer reference (can be used for moving).
 - Add missing const specifier in the message interface.
 - Add transmit kernel size setting to channels (ZMQ_SNDBUF).
 - Remove FairMQBuffer device.
 - Remove old multi-part methods from Tutorial3 example (to be replaced with Parts API).
 - Make callback mandatory for newMsg(data, size, callback).
 - Add missing <vector> include in FairMQSocket.
This commit is contained in:
Alexey Rybalchenko
2016-03-21 09:59:00 +01:00
parent 54ff30f055
commit 54a9e44d21
3 changed files with 14 additions and 6 deletions

View File

@@ -39,12 +39,17 @@ void FairMQExample8Sampler::Run()
// Set stopFlag to 1 for the first 4 messages, and to 0 for the 5th.
counter < 5 ? header->stopFlag = 0 : header->stopFlag = 1;
LOG(INFO) << "Sending header with stopFlag: " << header->stopFlag;
FairMQParts parts;
parts.AddPart(NewMessage(header, sizeof(Ex8Header)));
parts.AddPart(NewMessage(header, // data pointer
sizeof(Ex8Header), // data size
[](void* data, void* hint) { delete static_cast<Ex8Header*>(data); } // callback to deallocate after the transfer
));
parts.AddPart(NewMessage(1000));
LOG(INFO) << "Sending header with stopFlag: " << header->stopFlag;
LOG(INFO) << "Sending body of size: " << parts.At(1).GetSize();
LOG(INFO) << "Sending body of size: " << parts.At(1)->GetSize();
Send(parts, "data-out");