Add DDS and Copy+Push examples.

This commit is contained in:
Alexey Rybalchenko
2015-08-18 09:35:31 +02:00
committed by Mohammad Al-Turany
parent 96cd2afac7
commit 105e734808
46 changed files with 1517 additions and 143 deletions

View File

@@ -26,17 +26,18 @@ FairMQExample1Sink::FairMQExample1Sink()
void FairMQExample1Sink::Run()
{
while (GetCurrentState() == RUNNING)
while (CheckCurrentState(RUNNING))
{
FairMQMessage* msg = fTransportFactory->CreateMessage();
fChannels.at("data-in").at(0).Receive(msg);
if (fChannels.at("data-in").at(0).Receive(msg) > 0)
{
LOG(INFO) << "Received message: \""
<< string(static_cast<char*>(msg->GetData()), msg->GetSize())
<< "\"";
LOG(INFO) << "Received message: \""
<< string(static_cast<char*>(msg->GetData()), msg->GetSize())
<< "\"";
delete msg;
delete msg;
}
}
}