* add the soleil pom.xml file
[diffractometer.git] / src / main.cpp
blob3a6f426c6c65a741eae14926fdfa6414396a6ba4
1 static const char *RcsId = "$Header: /cvsroot/tango-ds/Instrumentation/Diffractometer/src/main.cpp,v 1.2 2008/09/22 08:46:32 piccaf Exp $";
2 //+=============================================================================
3 //
4 // file : main.cpp
5 //
6 // description : C++ source for a TANGO device server main.
7 // The main rule is to initialise (and create) the Tango
8 // system and to create the DServerClass singleton.
9 // The main should be the same for every Tango device server.
11 // project : TANGO Device Server
13 // $Author: piccaf $
15 // $Revision: 1.2 $ $
17 // $Log: main.cpp,v $
18 // Revision 1.2 2008/09/22 08:46:32 piccaf
19 // * add files from the new diffractometer Device
21 // Revision 1.4 2007/05/15 08:26:57 hardion
22 // * Merge with branch DIFFRACTO_KAPPA_6C
24 // Revision 1.3.4.2 2007/02/19 13:14:48 hardion
25 // * compil with rhel and test on cristal beamline
27 // Revision 1.3.4.1 2006/08/21 14:08:07 hardion
28 // * Creation of class Diffractometer which is a common base for all diffractometer
29 // * Creation of class Kappa6C inherit from Diffractometer
31 // Test in progress
34 // copyleft : Synchrotron SOLEIL
35 // L'Orme des Merisiers
36 // Saint-Aubin - BP 48
38 //-=============================================================================
40 // This file is generated by POGO
41 // (Program Obviously used to Generate tango Object)
43 // (c) - Software Engineering Group - ESRF
44 //=============================================================================
46 #include <tango.h>
49 int main(int argc,char *argv[])
52 Tango::Util *tg = NULL;
53 try
55 // Initialise the device server
56 //----------------------------------------
57 tg = Tango::Util::init(argc,argv);
59 // Create the device server singleton
60 // which will create everything
61 //----------------------------------------
62 tg->server_init(false);
64 // Run the endless loop
65 //----------------------------------------
66 cout << "Ready to accept request" << endl;
67 tg->server_run();
69 catch (bad_alloc)
71 cout << "Can't allocate memory to store device object !!!" << endl;
72 cout << "Exiting" << endl;
74 catch (CORBA::Exception &e)
76 Tango::Except::print_exception(e);
78 cout << "Received a CORBA_Exception" << endl;
79 cout << "Exiting" << endl;
82 // clean ORB, threads.....
83 //--------------------------
84 if (tg)
85 tg->server_cleanup();
87 return(0);