1 #ifndef _ots_ARTDAQDispatcherSupervisor_h
2 #define _ots_ARTDAQDispatcherSupervisor_h
4 #include "otsdaq-core/WorkLoopManager/WorkLoopManager.h"
5 #include "otsdaq-core/FiniteStateMachine/RunControlStateMachine.h"
6 #include "otsdaq-core/SOAPUtilities/SOAPMessenger.h"
8 #include "otsdaq-core/SupervisorInfo/AllSupervisorInfo.h"
10 #include "artdaq/Application/DispatcherApp.hh"
12 #pragma GCC diagnostic push
13 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
14 #include <xdaq/Application.h>
15 #pragma GCC diagnostic pop
16 #include "otsdaq-core/Macros/XDAQApplicationMacros.h"
17 #include <xgi/Method.h>
27 class ConfigurationManager;
28 class ConfigurationGroupKey;
43 void Default (xgi::Input* in, xgi::Output* out) ;
47 void stateMachineXgiHandler (xgi::Input* in, xgi::Output* out ) ;
48 void stateMachineResultXgiHandler (xgi::Input* in, xgi::Output* out ) ;
49 xoap::MessageReference stateMachineXoapHandler (xoap::MessageReference message ) ;
50 xoap::MessageReference stateMachineResultXoapHandler (xoap::MessageReference message ) ;
51 bool stateMachineThread (toolbox::task::WorkLoop* workLoop);
53 xoap::MessageReference stateMachineStateRequest (xoap::MessageReference message ) ;
54 xoap::MessageReference stateMachineErrorMessageRequest (xoap::MessageReference message ) ;
56 void stateInitial (toolbox::fsm::FiniteStateMachine& fsm) ;
57 void statePaused (toolbox::fsm::FiniteStateMachine& fsm) ;
58 void stateRunning (toolbox::fsm::FiniteStateMachine& fsm) ;
59 void stateHalted (toolbox::fsm::FiniteStateMachine& fsm) ;
60 void stateConfigured (toolbox::fsm::FiniteStateMachine& fsm) ;
61 void inError (toolbox::fsm::FiniteStateMachine& fsm) ;
63 void transitionConfiguring (toolbox::Event::Reference e) ;
64 void transitionHalting (toolbox::Event::Reference e) ;
65 void transitionInitializing(toolbox::Event::Reference e) ;
66 void transitionPausing (toolbox::Event::Reference e) ;
67 void transitionResuming (toolbox::Event::Reference e) ;
68 void transitionStarting (toolbox::Event::Reference e) ;
69 void transitionStopping (toolbox::Event::Reference e) ;
70 void enteringError (toolbox::Event::Reference e) ;
74 toolbox::BSem stateMachineSemaphore_;
78 std::string XDAQContextConfigurationName_;
79 std::string supervisorConfigurationPath_;
80 std::string supervisorContextUID_;
81 std::string supervisorApplicationUID_;
83 artdaq::DispatcherApp* theDispatcherInterface_;