Skip oracle and database build by mean cmake variable
[anna.git] / example / diameter / rxSimpleTest / main.cpp
1 // ANNA - Anna is Not Nothingness Anymore                                                         //
2 //                                                                                                //
3 // (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo                         //
4 //                                                                                                //
5 // See project site at http://redmine.teslayout.com/projects/anna-suite                           //
6 // See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE //
7
8
9 // Standard
10 #include <string>
11
12 // Project
13 #include <anna/core/core.hpp>
14 #include <anna/time/functions.hpp>
15
16 // Process
17 #include <rxSimpleTest.hpp>
18
19 // To calculate the current working directory and get an absolute path for traces:
20 #include <limits.h>
21 #include <unistd.h>
22
23
24 int main(int argc, const char** argv) {
25   anna::Logger::setLevel(anna::Logger::Debug);
26
27   // Current working directory and absolute trace path file:
28   std::string trace_file = "./rxSimpleTest.trace";
29
30   anna::Logger::initialize("rxSimpleTest", new TraceWriter(trace_file.c_str(), 2048000));
31   anna::time::functions::initialize(); // before application instantiation (it have a anna::time object)
32   anna::time::functions::setControlPoint(); // start control point (application lifetime)
33   RxSimpleTest app;
34
35   try {
36     app.start();
37   } catch(anna::Exception& ex) {
38     std::cout << ex.asString() << std::endl;
39   }
40
41   return 0;
42 }
43