otsdaq  v2_04_01
DispatcherApp.h
1 #ifndef _ots_ARTDAQDispatcherSupervisor_h
2 #define _ots_ARTDAQDispatcherSupervisor_h
3 
4 #include "otsdaq-core/CoreSupervisors/CoreSupervisorBase.h"
5 //#include "otsdaq-core/FiniteStateMachine/RunControlStateMachine.h"
6 //#include "otsdaq-core/SOAPUtilities/SOAPMessenger.h"
7 //#include "otsdaq-core/WorkLoopManager/WorkLoopManager.h"
8 //
9 //#include "otsdaq-core/SupervisorInfo/AllSupervisorInfo.h"
10 
11 #include "artdaq/Application/DispatcherApp.hh"
12 //
13 //#pragma GCC diagnostic push
14 //#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
15 //#include <xdaq/Application.h>
16 //#pragma GCC diagnostic pop
17 //#include <xgi/Method.h>
18 //#include "otsdaq-core/Macros/XDAQApplicationMacros.h"
19 //
20 //#include <map>
21 //#include <string>
22 //
23 //#include <memory>
24 
25 namespace ots
26 {
27 // class ConfigurationManager;
28 // class TableGroupKey;
29 
30 // DispatcherApp
31 // This class provides the otsdaq interface to a single artdaq Dispatcher.
33 // public xdaq::Application,
34 // public SOAPMessenger,
35 // public RunControlStateMachine
36 {
37  public:
38  XDAQ_INSTANTIATOR();
39 
40  DispatcherApp(xdaq::ApplicationStub* stub);
41  virtual ~DispatcherApp(void);
42 
43  void init(void);
44  void destroy(void);
45 
46  // void Default(xgi::Input* in, xgi::Output* out);
47  //
48  // // State Machine requests handlers
49  // void stateMachineXgiHandler(xgi::Input* in, xgi::Output* out);
50  // void stateMachineResultXgiHandler(xgi::Input* in, xgi::Output*
51  // out); xoap::MessageReference stateMachineXoapHandler(xoap::MessageReference
52  // message); xoap::MessageReference
53  // stateMachineResultXoapHandler(xoap::MessageReference message); bool
54  // stateMachineThread(toolbox::task::WorkLoop* workLoop);
55  //
56  // xoap::MessageReference stateMachineStateRequest(xoap::MessageReference message);
57  // xoap::MessageReference stateMachineErrorMessageRequest(
58  // xoap::MessageReference message);
59  //
60  // void stateInitial(toolbox::fsm::FiniteStateMachine& fsm);
61  // void statePaused(toolbox::fsm::FiniteStateMachine& fsm);
62  // void stateRunning(toolbox::fsm::FiniteStateMachine& fsm);
63  // void stateHalted(toolbox::fsm::FiniteStateMachine& fsm);
64  // void stateConfigured(toolbox::fsm::FiniteStateMachine& fsm);
65  // void inError(toolbox::fsm::FiniteStateMachine& fsm);
66  //
67  virtual void transitionConfiguring(toolbox::Event::Reference e) override;
68  virtual void transitionHalting(toolbox::Event::Reference e) override;
69  virtual void transitionInitializing(toolbox::Event::Reference e) override;
70  virtual void transitionPausing(toolbox::Event::Reference e) override;
71  virtual void transitionResuming(toolbox::Event::Reference e) override;
72  virtual void transitionStarting(toolbox::Event::Reference e) override;
73  virtual void transitionStopping(toolbox::Event::Reference e) override;
74  // void enteringError(toolbox::Event::Reference e);
75 
76  private:
77  // WorkLoopManager stateMachineWorkLoopManager_;
78  // toolbox::BSem stateMachineSemaphore_;
79  //
80  // AllSupervisorInfo allSupervisorInfo_;
81  // ConfigurationManager* theConfigurationManager_;
82  // const std::string XDAQContextTableName_;
83  // std::string supervisorConfigurationPath_;
84  // std::string supervisorContextUID_;
85  // std::string supervisorApplicationUID_;
86 
87  std::unique_ptr<artdaq::DispatcherApp> theDispatcherInterface_;
88 };
89 
90 } // namespace ots
91 
92 #endif