Line data Source code
1 : #include "artdaq-core/Utilities/configureMessageFacility.hh"
2 : #include "artdaq/Application/Commandable.hh"
3 : #include "artdaq/Application/LoadParameterSet.hh"
4 : #include "artdaq/DAQdata/Globals.hh"
5 : #include "artdaq/ExternalComms/MakeCommanderPlugin.hh"
6 :
7 : #include <boost/lexical_cast.hpp>
8 : #include <boost/program_options.hpp>
9 :
10 : #include <iostream>
11 :
12 0 : int main(int argc, char* argv[])
13 : try
14 : {
15 0 : artdaq::configureMessageFacility("commandable");
16 :
17 0 : fhicl::ParameterSet config = LoadParameterSet<artdaq::CommanderInterface::Config>(argc, argv, "stateResponder", "This simple application sets up a CommanderInterface plugin and reports any received commands.");
18 :
19 0 : artdaq::setMsgFacAppName("Commandable", config.get<int>("id"));
20 :
21 : // create the Commandable object
22 0 : artdaq::Commandable commandable;
23 :
24 0 : auto commander = artdaq::MakeCommanderPlugin(config, commandable);
25 0 : commander->run_server();
26 :
27 0 : return 0;
28 0 : }
29 0 : catch (...)
30 : {
31 0 : return -1;
32 0 : }
|