EUROPEAN SYNCHROTRON RADIATION FACILITY
INSTALLATION EUROPEENNE DE RAYONNEMENT SYNCHROTRON
ESRF Logo
Main Page   Namespace List   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

StarterClass.h

Go to the documentation of this file.
00001 //=============================================================================
00002 //
00003 // file :         StarterClass.h
00004 //
00005 // description :  Include for the StarterClass root class.
00006 //                This class is represents the singleton class for
00007 //                the Starter device class.
00008 //                It contains all properties and methods which the 
00009 //                Starter requires only once e.g. the commands.
00010 //                      
00011 // project :      TANGO Device Server
00012 //
00013 // $Author: pascal_verdier $
00014 //
00015 // $Revision: 1.2 $
00016 //
00017 // $Log: StarterClass_8h-source.html,v $
00017 // Revision 1.2  2003/12/08 08:53:53  pascal_verdier
00017 // Cluster (multi-host) control implemented.
00017 // Control of notify daemon implemented but not tested.
00017 //
00018 // Revision 3.0.1.1  2003/09/18 12:02:50  pascal_verdier
00019 // Problem on Windows service startup fixed.
00020 //
00021 // Revision 3.0  2003/06/17 12:06:36  pascal_verdier
00022 // TANGO 3.x server.
00023 // polling bugs fixed.
00024 //
00025 // Revision 2.0  2003/01/09 13:35:50  verdier
00026 // TANGO 2.2
00027 //
00028 // Revision 1.22  2002/12/18 08:09:19  verdier
00029 // omniORB compatibility
00030 //
00031 // Revision 1.6  2002/10/15 18:55:21  verdier
00032 // The host state is now calculated during the State polled command.
00033 //
00034 // Revision 1.5  2002/02/27 15:19:32  verdier
00035 // WinNt services implemented.
00036 //
00037 // Revision 1.4  2001/04/03 09:40:50  verdier
00038 // WInNt version is running.
00039 //
00040 // Revision 1.3  2001/02/12 09:34:21  verdier
00041 // SunOS and Linux OK.
00042 //
00043 //
00044 // copyleft :     European Synchrotron Radiation Facility
00045 //                BP 220, Grenoble 38043
00046 //                FRANCE
00047 //
00048 //=============================================================================
00049 //
00050 //              This file is generated by POGO
00051 //      (Program Obviously used to Generate tango Object)
00052 //
00053 //             (c) - Pascal Verdier - ESRF
00054 //=============================================================================
00055 
00056 #ifndef _STARTERCLASS_H
00057 #define _STARTERCLASS_H
00058 
00059 #include <tango.h>
00060 
00061 
00062 namespace Starter
00063 {
00064 
00065 //
00066 // Define classes for commands
00067 //
00068 class StartPollingThreadCmd : public Tango::Command
00069 {
00070 public:
00071         StartPollingThreadCmd(const char *,Tango::CmdArgType, Tango::CmdArgType,const char *,const char *, Tango::DispLevel);
00072         StartPollingThreadCmd(const char *,Tango::CmdArgType, Tango::CmdArgType);
00073         ~StartPollingThreadCmd() {};
00074         
00075         virtual bool is_allowed (Tango::DeviceImpl *, const CORBA::Any &);
00076         virtual CORBA::Any *execute (Tango::DeviceImpl *, const CORBA::Any &);
00077 };
00078 
00079 
00080 class UpdateServersInfoCmd : public Tango::Command
00081 {
00082 public:
00083         UpdateServersInfoCmd(const char *,Tango::CmdArgType, Tango::CmdArgType,const char *,const char *, Tango::DispLevel);
00084         UpdateServersInfoCmd(const char *,Tango::CmdArgType, Tango::CmdArgType);
00085         ~UpdateServersInfoCmd() {};
00086         
00087         virtual bool is_allowed (Tango::DeviceImpl *, const CORBA::Any &);
00088         virtual CORBA::Any *execute (Tango::DeviceImpl *, const CORBA::Any &);
00089 };
00090 
00091 
00092 class DevReadLogCmd : public Tango::Command
00093 {
00094 public:
00095         DevReadLogCmd(const char *,Tango::CmdArgType, Tango::CmdArgType,const char *,const char *, Tango::DispLevel);
00096         DevReadLogCmd(const char *,Tango::CmdArgType, Tango::CmdArgType);
00097         ~DevReadLogCmd() {};
00098         
00099         virtual bool is_allowed (Tango::DeviceImpl *, const CORBA::Any &);
00100         virtual CORBA::Any *execute (Tango::DeviceImpl *, const CORBA::Any &);
00101 };
00102 
00103 
00104 class DevStopCmd : public Tango::Command
00105 {
00106 public:
00107         DevStopCmd(const char *,Tango::CmdArgType, Tango::CmdArgType,const char *,const char *, Tango::DispLevel);
00108         DevStopCmd(const char *,Tango::CmdArgType, Tango::CmdArgType);
00109         ~DevStopCmd() {};
00110         
00111         virtual bool is_allowed (Tango::DeviceImpl *, const CORBA::Any &);
00112         virtual CORBA::Any *execute (Tango::DeviceImpl *, const CORBA::Any &);
00113 };
00114 
00115 
00116 class DevStartCmd : public Tango::Command
00117 {
00118 public:
00119         DevStartCmd(const char *,Tango::CmdArgType, Tango::CmdArgType,const char *,const char *, Tango::DispLevel);
00120         DevStartCmd(const char *,Tango::CmdArgType, Tango::CmdArgType);
00121         ~DevStartCmd() {};
00122         
00123         virtual bool is_allowed (Tango::DeviceImpl *, const CORBA::Any &);
00124         virtual CORBA::Any *execute (Tango::DeviceImpl *, const CORBA::Any &);
00125 };
00126 
00127 
00128 class DevGetStopServersCmd : public Tango::Command
00129 {
00130 public:
00131         DevGetStopServersCmd(const char *,Tango::CmdArgType, Tango::CmdArgType,const char *,const char *, Tango::DispLevel);
00132         DevGetStopServersCmd(const char *,Tango::CmdArgType, Tango::CmdArgType);
00133         ~DevGetStopServersCmd() {};
00134         
00135         virtual bool is_allowed (Tango::DeviceImpl *, const CORBA::Any &);
00136         virtual CORBA::Any *execute (Tango::DeviceImpl *, const CORBA::Any &);
00137 };
00138 
00139 
00140 class DevGetRunningServersCmd : public Tango::Command
00141 {
00142 public:
00143         DevGetRunningServersCmd(const char *,Tango::CmdArgType, Tango::CmdArgType,const char *,const char *, Tango::DispLevel);
00144         DevGetRunningServersCmd(const char *,Tango::CmdArgType, Tango::CmdArgType);
00145         ~DevGetRunningServersCmd() {};
00146         
00147         virtual bool is_allowed (Tango::DeviceImpl *, const CORBA::Any &);
00148         virtual CORBA::Any *execute (Tango::DeviceImpl *, const CORBA::Any &);
00149 };
00150 
00151 
00152 class DevStopAllCmd : public Tango::Command
00153 {
00154 public:
00155         DevStopAllCmd(const char *,Tango::CmdArgType, Tango::CmdArgType,const char *,const char *, Tango::DispLevel);
00156         DevStopAllCmd(const char *,Tango::CmdArgType, Tango::CmdArgType);
00157         ~DevStopAllCmd() {};
00158         
00159         virtual bool is_allowed (Tango::DeviceImpl *, const CORBA::Any &);
00160         virtual CORBA::Any *execute (Tango::DeviceImpl *, const CORBA::Any &);
00161 };
00162 
00163 
00164 class DevStartAllCmd : public Tango::Command
00165 {
00166 public:
00167         DevStartAllCmd(const char *,Tango::CmdArgType, Tango::CmdArgType,const char *,const char *, Tango::DispLevel);
00168         DevStartAllCmd(const char *,Tango::CmdArgType, Tango::CmdArgType);
00169         ~DevStartAllCmd() {};
00170         
00171         virtual bool is_allowed (Tango::DeviceImpl *, const CORBA::Any &);
00172         virtual CORBA::Any *execute (Tango::DeviceImpl *, const CORBA::Any &);
00173 };
00174 
00175 
00176 
00177 //
00178 // The StarterClass singleton definition
00179 //
00180 
00181 class StarterClass : public Tango::DeviceClass
00182 {
00183 public:
00184 //      properties member data
00188         Tango::DevShort readInfoDbPeriod;
00192         Tango::DevShort nbStartupLevels;
00196         Tango::DevLong  cmdPollingTimeout;
00197 
00198 //      add your own data members here
00199 //------------------------------------
00200 
00201 public:
00202 
00203 //      Method prototypes
00204         static StarterClass *init(const char *);
00205         static StarterClass *instance();
00206         ~StarterClass();
00207         
00208 protected:
00209         StarterClass(string &);
00210         static StarterClass *_instance;
00211         void command_factory();
00212         void get_class_property();
00213         void write_class_property();
00214 
00215 private:
00216         void device_factory(const Tango::DevVarStringArray *);
00217 };
00218 
00219 
00220 }       //      namespace Starter
00221 
00222 #endif // _STARTERCLASS_H
Tango Device Server User's Guide



(c) ESRF - Software Engineering Group