Refactor DDS example and tools to be able to run with/without DDS

This commit is contained in:
Alexey Rybalchenko
2016-05-19 10:22:02 +02:00
committed by Mohammad Al-Turany
parent dc72912b19
commit e7ad0d6c34
5 changed files with 16 additions and 42 deletions

View File

@@ -13,9 +13,9 @@
*/
#include "FairMQLogger.h"
#include "FairMQDDSTools.h"
#include "FairMQProgOptions.h"
#include "FairMQExample3Sampler.h"
#include "runSimpleMQStateMachine.h"
int main(int argc, char** argv)
{
@@ -25,17 +25,7 @@ int main(int argc, char** argv)
config.ParseAll(argc, argv);
FairMQExample3Sampler sampler;
sampler.CatchSignals();
sampler.SetConfig(config);
sampler.ChangeState("INIT_DEVICE");
HandleConfigViaDDS(sampler);
sampler.WaitForEndOfState("INIT_DEVICE");
sampler.ChangeState("INIT_TASK");
sampler.WaitForEndOfState("INIT_TASK");
runDDSStateHandler(sampler);
runStateMachine(sampler, config);
}
catch (std::exception& e)
{