Dripline-Cpp  v2.4.2
Dripline Implementation in C++
run_oscillator_service_endpoints.cc
Go to the documentation of this file.
1 /*
2  * run_oscillator_service_endpoints.cc
3  *
4  * Created on: May 21, 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_endpoints" );
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_endpoints >( the_main.master_config()["dripline"].as_node() );
34 
35  the_service->set_pointers();
36  the_service->execute();
37 
38  the_return = the_service->get_return();
39  };
40 
41  the_main.callback( t_service_callback );
42 
43  CLI11_PARSE( the_main, argc, argv );
44 
45  return the_return;
46 }
47 
48 
49 
Sets the default configuration used by core.
int main(int argc, char **argv)
static scarab::logger dlog("agent")
void add_dripline_options(scarab::main_app &an_app)
Add basic AMQP options to an app object.