Dripline-Cpp  v2.4.2
Dripline Implementation in C++
run_oscillator_service_hub.cc
Go to the documentation of this file.
1 /*
2  * run_oscillator_service_hub.cc
3  *
4  * Created on: May 16, 2019
5  * Author: N.S. Oblath
6  */
7 
8 #include "agent_config.hh"
9 #include "dripline_constants.hh"
10 #include "version_store.hh"
12 
13 #include "application.hh"
14 #include "logger.hh"
15 
16 using namespace dripline;
17 
18 LOGGER( dlog, "run_oscillation_service_hub" );
19 
20 int main( int argc, char** argv )
21 {
22  scarab::main_app the_main;
23 
24  the_main.set_version( version_store::get_instance()->versions().at( "dripline-cpp" ) );
25 
26  the_main.default_config().add( "dripline", dripline_config() );
27 
28  add_dripline_options( the_main );
29 
30  int the_return = -1;
31 
32  auto t_service_callback = [&](){
33  auto the_service = std::make_shared< oscillator_service_hub >( the_main.master_config()["dripline"].as_node() );
34 
35  the_service->execute();
36 
37  the_return = the_service->get_return();
38  };
39 
40  the_main.callback( t_service_callback );
41 
42  CLI11_PARSE( the_main, argc, argv );
43 
44  return the_return;
45 }
46 
47 
48 
int main(int argc, char **argv)
Sets the default configuration used by core.
static scarab::logger dlog("agent")
void add_dripline_options(scarab::main_app &an_app)
Add basic AMQP options to an app object.