00001 #ifndef _ots_ControlsDashboardSupervisor_h_
00002 #define _ots_ControlsDashboardSupervisor_h_
00003
00004 #include "otsdaq-core/CoreSupervisors/CoreSupervisorBase.h"
00005
00006
00007
00008
00009
00010
00011 namespace ots
00012 {
00013
00014 class ControlsVInterface;
00015 class ConfigurationManager;
00016
00017
00018
00019 class ControlsDashboardSupervisor: public CoreSupervisorBase
00020 {
00021
00022 public:
00023
00024 XDAQ_INSTANTIATOR();
00025
00026 ControlsDashboardSupervisor (xdaq::ApplicationStub* s);
00027 virtual ~ControlsDashboardSupervisor (void);
00028
00029 void init (void);
00030 void destroy (void);
00031
00032
00033 virtual void request (const std::string& requestType, cgicc::Cgicc& cgiIn, HttpXmlDocument& xmlOut, const WebUsers::RequestUserInfo& userInfo) override;
00034
00035 virtual void setSupervisorPropertyDefaults (void) override;
00036 virtual void forceSupervisorPropertyValues (void) override;
00037
00038
00039 void Poll (cgicc::Cgicc& cgiIn, HttpXmlDocument& xmlOut, std::string UID) ;
00040 void GetPVSettings (cgicc::Cgicc& cgiIn, HttpXmlDocument& xmlOut, std::string pvList);
00041 void GenerateUID (cgicc::Cgicc& cgiIn, HttpXmlDocument& xmlOut, std::string pvlist);
00042 void GetList (cgicc::Cgicc& cgiIn, HttpXmlDocument& xmlOut) ;
00043 void GetPages (cgicc::Cgicc& cgiIn, HttpXmlDocument& xmlOut) ;
00044 void loadPage (cgicc::Cgicc& cgiIn, HttpXmlDocument& xmlOut, std::string page) ;
00045 void Subscribe (cgicc::Cgicc& cgiIn, HttpXmlDocument& xmlOut) ;
00046 void Unsubscribe (cgicc::Cgicc& cgiIn, HttpXmlDocument& xmlOut) ;
00047
00048
00049
00050
00051 bool isDir (std::string dir );
00052 void listFiles (std::string baseDir, bool recursive, std::vector<std::string> * pages );
00053
00054
00055 private:
00056
00057
00058
00059 ControlsVInterface* interface_;
00060
00061
00062
00063 std::map<int, std::set<std::string>> pvDependencyLookupMap_;
00064 int UID_;
00065
00066
00067 };
00068
00069 }
00070
00071 #endif