00001 #ifndef SCTCALIBRATIONRUNCONTROLLER_H
00002 #define SCTCALIBRATIONRUNCONTROLLER_H
00003
00004 #ifdef linux
00005 #undef linux
00006 #endif
00007
00008 #include <rc/UserRoutines.h>
00009 #include <boost/utility.hpp>
00010 #include <string>
00011
00012 using std::string;
00013
00014 class ISCallbackInfo;
00015
00016 namespace SctCalibrationController {
00017
00018 class CalibrationControllerImpl;
00019
00020 class RunControl : public RC::UserRoutines, boost::noncopyable {
00021 public:
00022 enum ErrorState {
00023 SCTAPI_ACCESS_FAILURE
00024 };
00025
00026 static RunControl& instance();
00027
00028
00029
00030
00031
00032 virtual bool resetAction ();
00033
00034
00035
00036
00041 virtual bool loadAction ();
00042
00043
00044
00045
00046
00047
00048
00049
00050 virtual bool prepareAction();
00051
00052 virtual bool stopEFAction();
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072 virtual bool unloadAction ();
00073 virtual bool configureAction ();
00074
00078 void sctApiError(const string& reason);
00079 private:
00080 int getRunNumber();
00081 std::string getRunType() const;
00082 bool sendRunTypeToSctApi() const;
00083 RunControl();
00084 CalibrationControllerImpl& cc;
00085 Sct_SctApi::SctApiIPC_var api;
00086 boost::shared_ptr<ISInfoDictionary> m_isInfoDictionary;
00087 public:
00088 static const int defaultRunNumber = 0;
00089 };
00090
00091 }
00092
00093 #endif //SCTCALIBRATIONRUNCONTROLLER_H