| 1 | #include <string>
|
---|
| 2 | #include "ariba/utility/system/StartupWrapper.h"
|
---|
| 3 | #include "PingPong.h"
|
---|
| 4 |
|
---|
| 5 | using std::string;
|
---|
| 6 | using ariba::utility::StartupWrapper;
|
---|
| 7 | using ariba::application::pingpong::PingPong;
|
---|
| 8 |
|
---|
| 9 | //*************************************************
|
---|
| 10 | /*
|
---|
| 11 | #include <iostream>
|
---|
| 12 | #include <boost/cstdint.hpp>
|
---|
| 13 |
|
---|
| 14 | using std::cout;
|
---|
| 15 | using std::endl;
|
---|
| 16 |
|
---|
| 17 | void debugging(){
|
---|
| 18 |
|
---|
| 19 | cout << "int" << " - \t \t" << sizeof(int) << endl;
|
---|
| 20 | cout << "unsigned int" << " - \t \t" << sizeof(unsigned int) << endl;
|
---|
| 21 | cout << "long" << " - \t \t" << sizeof(long) << endl;
|
---|
| 22 | cout << "unsigned long" << " - \t \t" << sizeof(unsigned long) << endl;
|
---|
| 23 | cout << "char" << " - \t \t" << sizeof(char) << endl;
|
---|
| 24 | cout << "unsigned char" << " - \t \t" << sizeof(unsigned char) << endl;
|
---|
| 25 | cout << "short" << " - \t \t" << sizeof(short) << endl;
|
---|
| 26 | cout << "unsigned short" << " - \t \t" << sizeof(unsigned short) << endl;
|
---|
| 27 | cout << "uint16_t" << " - \t \t" << sizeof(uint16_t) << endl;
|
---|
| 28 | cout << "uint8_t" << " - \t \t" << sizeof(uint8_t) << endl;
|
---|
| 29 | cout << "uint32_t" << " - \t \t" << sizeof(uint32_t) << endl;
|
---|
| 30 | cout << "int8_t" << " - \t \t" << sizeof(int8_t) << endl;
|
---|
| 31 | cout << "int16_t" << " - \t \t" << sizeof(int16_t) << endl;
|
---|
| 32 | cout << "int32_t" << " - \t \t" << sizeof(int32_t) << endl;
|
---|
| 33 | cout << "boost::uint16_t" << " - \t \t" << sizeof(boost::uint16_t) << endl;
|
---|
| 34 | cout << "boost::uint8_t" << " - \t \t" << sizeof(boost::uint8_t) << endl;
|
---|
| 35 | cout << "boost::uint32_t" << " - \t \t" << sizeof(boost::uint32_t) << endl;
|
---|
| 36 | cout << "boost::int8_t" << " - \t \t" << sizeof(boost::int8_t) << endl;
|
---|
| 37 | cout << "boost::int16_t" << " - \t \t" << sizeof(boost::int16_t) << endl;
|
---|
| 38 | cout << "boost::int32_t" << " - \t \t" << sizeof(boost::int32_t) << endl;
|
---|
| 39 |
|
---|
| 40 | }
|
---|
| 41 | */
|
---|
| 42 | //*************************************************
|
---|
| 43 |
|
---|
| 44 |
|
---|
| 45 | int main( int argc, char** argv ) {
|
---|
| 46 |
|
---|
| 47 | // get config file
|
---|
| 48 | string config = "../etc/settings.cnf";
|
---|
| 49 | if (argc >= 2) config = argv[1];
|
---|
| 50 |
|
---|
| 51 | StartupWrapper::initConfig( config );
|
---|
| 52 | StartupWrapper::startSystem();
|
---|
| 53 |
|
---|
| 54 | // this will do the main functionality and block
|
---|
| 55 | PingPong ping;
|
---|
| 56 | StartupWrapper::startup(&ping);
|
---|
| 57 |
|
---|
| 58 | // --> we will run blocking until <enter> is hit
|
---|
| 59 |
|
---|
| 60 | StartupWrapper::shutdown(&ping);
|
---|
| 61 | StartupWrapper::stopSystem();
|
---|
| 62 |
|
---|
| 63 | return 0;
|
---|
| 64 | }
|
---|