1 #ifndef _ots_CoreSupervisorBase_h_
2 #define _ots_CoreSupervisorBase_h_
4 #include "otsdaq-core/WorkLoopManager/WorkLoopManager.h"
5 #include "otsdaq-core/FiniteStateMachine/RunControlStateMachine.h"
6 #include "otsdaq-core/Supervisor/SupervisorsInfo.h"
7 #include "otsdaq-core/SOAPUtilities/SOAPMessenger.h"
8 #include "otsdaq-core/SupervisorDescriptorInfo/SupervisorDescriptorInfo.h"
9 #pragma GCC diagnostic push
10 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
11 #include <xdaq/Application.h>
12 #pragma GCC diagnostic pop
13 #include "xgi/Method.h"
23 class ConfigurationManager;
25 class FEVInterfacesManager;
36 void Default (xgi::Input* in, xgi::Output* out)
throw (xgi::exception::Exception);
37 void request (xgi::Input* in, xgi::Output* out)
throw (xgi::exception::Exception);
40 void stateMachineXgiHandler (xgi::Input* in, xgi::Output* out )
throw (xgi::exception::Exception);
41 void stateMachineResultXgiHandler (xgi::Input* in, xgi::Output* out )
throw (xgi::exception::Exception);
42 xoap::MessageReference stateMachineXoapHandler (xoap::MessageReference message )
throw (xoap::exception::Exception);
43 xoap::MessageReference stateMachineResultXoapHandler (xoap::MessageReference message )
throw (xoap::exception::Exception);
45 xoap::MessageReference stateMachineStateRequest (xoap::MessageReference message )
throw (xoap::exception::Exception);
46 xoap::MessageReference stateMachineErrorMessageRequest (xoap::MessageReference message )
throw (xoap::exception::Exception);
47 xoap::MessageReference macroMakerSupervisorRequest (xoap::MessageReference message )
throw (xoap::exception::Exception);
48 xoap::MessageReference workLoopStatusRequest (xoap::MessageReference message )
throw (xoap::exception::Exception);
50 bool stateMachineThread (toolbox::task::WorkLoop* workLoop);
52 virtual void stateInitial (toolbox::fsm::FiniteStateMachine& fsm)
throw (toolbox::fsm::exception::Exception);
53 virtual void statePaused (toolbox::fsm::FiniteStateMachine& fsm)
throw (toolbox::fsm::exception::Exception);
54 virtual void stateRunning (toolbox::fsm::FiniteStateMachine& fsm)
throw (toolbox::fsm::exception::Exception);
55 virtual void stateHalted (toolbox::fsm::FiniteStateMachine& fsm)
throw (toolbox::fsm::exception::Exception);
56 virtual void stateConfigured (toolbox::fsm::FiniteStateMachine& fsm)
throw (toolbox::fsm::exception::Exception);
57 virtual void inError (toolbox::fsm::FiniteStateMachine& fsm)
throw (toolbox::fsm::exception::Exception);
59 virtual void transitionConfiguring (toolbox::Event::Reference e)
throw (toolbox::fsm::exception::Exception);
60 virtual void transitionHalting (toolbox::Event::Reference e)
throw (toolbox::fsm::exception::Exception);
61 virtual void transitionInitializing(toolbox::Event::Reference e)
throw (toolbox::fsm::exception::Exception);
62 virtual void transitionPausing (toolbox::Event::Reference e)
throw (toolbox::fsm::exception::Exception);
63 virtual void transitionResuming (toolbox::Event::Reference e)
throw (toolbox::fsm::exception::Exception);
64 virtual void transitionStarting (toolbox::Event::Reference e)
throw (toolbox::fsm::exception::Exception);
65 virtual void transitionStopping (toolbox::Event::Reference e)
throw (toolbox::fsm::exception::Exception);
66 virtual void enteringError (toolbox::Event::Reference e)
throw (toolbox::fsm::exception::Exception);
75 toolbox::BSem stateMachineSemaphore_;
79 std::string XDAQContextConfigurationName_;
80 std::string supervisorConfigurationPath_;
82 std::string supervisorContextUID_;
83 std::string supervisorApplicationUID_;
84 std::string supervisorClass_;
85 std::string supervisorClassNoNamespace_;
88 std::vector<VStateMachine*> theStateMachineImplementation_;