FairMQ/fairmq/test/pub-sub/runTestPub.cxx
Florian Uhlig fa7040fe65 Fix compiler warnings.
Initialize all data members in initializer lists.
Reorder data members in initializer list to have the same order as in the class declaration.
Comment or remove unused parameters and unused variables.
Convert all old style casts to the correct and explicit c++ cast like const_cast, static_cast,
dynamic_cast or reinterpret_cast. In most cases static_cast is used.
2016-03-14 13:37:55 +01:00

53 lines
1.7 KiB
C++

/********************************************************************************
* Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* *
* This software is distributed under the terms of the *
* GNU Lesser General Public Licence version 3 (LGPL) version 3, *
* copied verbatim in the file "LICENSE" *
********************************************************************************/
/**
* runTestPub.cxx
*
* @since 2015-09-05
* @author A. Rybalchenko
*/
#include "FairMQLogger.h"
#include "FairMQTestPub.h"
int main(int /*argc*/, char** /*argv*/)
{
FairMQTestPub testPub;
testPub.CatchSignals();
testPub.SetTransport("zeromq");
testPub.SetProperty(FairMQTestPub::Id, "testPub");
FairMQChannel controlChannel("pull", "bind", "tcp://127.0.0.1:5555");
controlChannel.UpdateRateLogging(0);
testPub.fChannels["control"].push_back(controlChannel);
FairMQChannel pubChannel("pub", "bind", "tcp://127.0.0.1:5556");
pubChannel.UpdateRateLogging(0);
testPub.fChannels["data"].push_back(pubChannel);
testPub.ChangeState("INIT_DEVICE");
testPub.WaitForEndOfState("INIT_DEVICE");
testPub.ChangeState("INIT_TASK");
testPub.WaitForEndOfState("INIT_TASK");
testPub.ChangeState("RUN");
testPub.WaitForEndOfState("RUN");
testPub.ChangeState("RESET_TASK");
testPub.WaitForEndOfState("RESET_TASK");
testPub.ChangeState("RESET_DEVICE");
testPub.WaitForEndOfState("RESET_DEVICE");
testPub.ChangeState("END");
return 0;
}