tdaq-develop-2025-02-12
|
#include <otsdaq/CoreSupervisors/CoreSupervisorBase.h>
Public Member Functions | |
CoreSupervisorBase (xdaq::ApplicationStub *stub) | |
void | destroy (void) |
unsigned int | getSupervisorLID (void) const |
virtual void | defaultPage (xgi::Input *in, xgi::Output *out) |
virtual void | request (const std::string &requestType, cgicc::Cgicc &cgiIn, HttpXmlDocument &xmlOut, const WebUsers::RequestUserInfo &userInfo) |
virtual void | nonXmlRequest (const std::string &requestType, cgicc::Cgicc &cgiIn, std::ostream &out, const WebUsers::RequestUserInfo &userInfo) |
virtual std::string | getStatusProgressDetail (void) |
virtual std::vector< SupervisorInfo::SubappInfo > | getSubappInfo (void) |
void | stateMachineXgiHandler (xgi::Input *in, xgi::Output *out) |
State Machine request handlers. | |
xoap::MessageReference | stateMachineXoapHandler (xoap::MessageReference message) |
xoap::MessageReference | stateMachineStateRequest (xoap::MessageReference message) |
xoap::MessageReference | stateMachineErrorMessageRequest (xoap::MessageReference message) |
void | sendAsyncExceptionToGateway (const std::string &errMsg, bool isPauseException, bool isStopException) |
virtual xoap::MessageReference | workLoopStatusRequest (xoap::MessageReference message) |
virtual xoap::MessageReference | applicationStatusRequest (xoap::MessageReference message) |
bool | stateMachineThread (toolbox::task::WorkLoop *workLoop) |
virtual void | stateInitial (toolbox::fsm::FiniteStateMachine &fsm) |
virtual void | statePaused (toolbox::fsm::FiniteStateMachine &fsm) |
virtual void | stateRunning (toolbox::fsm::FiniteStateMachine &fsm) |
virtual void | stateHalted (toolbox::fsm::FiniteStateMachine &fsm) |
virtual void | stateConfigured (toolbox::fsm::FiniteStateMachine &fsm) |
virtual void | inError (toolbox::fsm::FiniteStateMachine &fsm) |
virtual void | transitionConfiguring (toolbox::Event::Reference event) |
virtual void | transitionHalting (toolbox::Event::Reference event) |
virtual void | transitionInitializing (toolbox::Event::Reference event) |
virtual void | transitionPausing (toolbox::Event::Reference event) |
virtual void | transitionResuming (toolbox::Event::Reference event) |
virtual void | transitionStarting (toolbox::Event::Reference event) |
virtual void | transitionStopping (toolbox::Event::Reference event) |
virtual void | enteringError (toolbox::Event::Reference event) |
![]() | |
SOAPMessenger (xdaq::Application *application) | |
SOAPMessenger (const SOAPMessenger &aSOAPMessenger) | |
std::string | send (XDAQ_CONST_CALL xdaq::ApplicationDescriptor *d, xoap::MessageReference message) |
std::string | send (XDAQ_CONST_CALL xdaq::ApplicationDescriptor *d, SOAPCommand soapCommand) |
std::string | send (XDAQ_CONST_CALL xdaq::ApplicationDescriptor *d, std::string command) |
std::string | send (XDAQ_CONST_CALL xdaq::ApplicationDescriptor *d, std::string command, SOAPParameters parameters) |
std::string | sendStatus (XDAQ_CONST_CALL xdaq::ApplicationDescriptor *d, std::string message) |
xoap::MessageReference | sendWithSOAPReply (XDAQ_CONST_CALL xdaq::ApplicationDescriptor *d, xoap::MessageReference message) |
xoap::MessageReference | sendWithSOAPReply (XDAQ_CONST_CALL xdaq::ApplicationDescriptor *d, SOAPCommand soapCommand) |
xoap::MessageReference | sendWithSOAPReply (XDAQ_CONST_CALL xdaq::ApplicationDescriptor *d, std::string command) |
xoap::MessageReference | sendWithSOAPReply (XDAQ_CONST_CALL xdaq::ApplicationDescriptor *d, std::string command, SOAPParameters parameters) |
![]() | |
CorePropertySupervisorBase (xdaq::Application *application) | |
XDAQ_CONST_CALL xdaq::ApplicationDescriptor * | getGatewaySupervisorDescriptor (void) |
will be wizard supervisor in wiz mode More... | |
virtual void | setSupervisorPropertyDefaults (void) |
override to control supervisor specific defaults More... | |
virtual void | forceSupervisorPropertyValues (void) |
override to force supervisor property values (and ignore user settings) | |
void | getRequestUserInfo (WebUsers::RequestUserInfo &requestUserInfo) |
ConfigurationTree | getContextTreeNode (void) const |
ConfigurationTree | getSupervisorTableNode (void) const |
const std::string & | getContextUID (void) const |
const std::string & | getSupervisorUID (void) const |
const std::string & | getSupervisorConfigurationPath (void) const |
void | resetPropertiesAreSetup (void) |
ConfigurationTree | getSupervisorTreeNode (void) |
void | loadUserSupervisorProperties (void) |
template<class T > | |
void | setSupervisorProperty (const std::string &propertyName, const T &propertyValue) |
void | setSupervisorProperty (const std::string &propertyName, const std::string &propertyValue) |
template<class T > | |
void | addSupervisorProperty (const std::string &propertyName, const T &propertyValue) |
void | addSupervisorProperty (const std::string &propertyName, const std::string &propertyValue) |
template<class T > | |
T | getSupervisorProperty (const std::string &propertyName) |
template<class T > | |
T | getSupervisorProperty (const std::string &propertyName, const T &defaultValue) |
std::string | getSupervisorProperty (const std::string &propertyName) |
std::string | getSupervisorProperty (const std::string &propertyName, const std::string &defaultValue) |
getSupervisorProperty | |
WebUsers::permissionLevel_t | getSupervisorPropertyUserPermissionsThreshold (const std::string &requestType) |
time_t | getSupervisorUptime (void) const |
![]() | |
RunControlStateMachine (const std::string &name="Undefined Name") | |
void | reset (void) |
void | setStateMachineName (const std::string &name) |
const std::string & | getErrorMessage (void) const |
void | setAsyncPauseExceptionMessage (const std::string &error) |
void | setAsyncStopExceptionMessage (const std::string &error) |
template<class OBJECT > | |
void | addStateTransition (toolbox::fsm::State from, toolbox::fsm::State to, const std::string &input, const std::string &transitionName, OBJECT *obj, void(OBJECT::*func)(toolbox::Event::Reference)) |
template<class OBJECT > | |
void | addStateTransition (toolbox::fsm::State from, toolbox::fsm::State to, const std::string &input, const std::string &transitionName, const std::string &transitionParameter, OBJECT *obj, void(OBJECT::*func)(toolbox::Event::Reference)) |
virtual void | stateShutdown (toolbox::fsm::FiniteStateMachine &) |
virtual void | transitionShuttingDown (toolbox::Event::Reference) |
virtual void | transitionStartingUp (toolbox::Event::Reference) |
xoap::MessageReference | runControlMessageHandler (xoap::MessageReference message) |
Run Control Messages. More... | |
unsigned int | getIterationIndex (void) |
unsigned int | getSubIterationIndex (void) |
void | indicateIterationWork (void) |
void | clearIterationWork (void) |
bool | getIterationWork (void) |
void | indicateSubIterationWork (void) |
void | clearSubIterationWork (void) |
bool | getSubIterationWork (void) |
const std::string & | getLastCommand (void) |
const std::string & | getLastAttemptedConfigureGroup (void) |
Static Public Attributes | |
static const std::string | WORK_LOOP_DONE = "Done" |
static const std::string | WORK_LOOP_WORKING = "Working" |
![]() | |
static const std::string | FAILED_STATE_NAME = FiniteStateMachine::FAILED_STATE_NAME |
static const std::string | INITIAL_STATE_NAME = "Initial" |
static const std::string | HALTED_STATE_NAME = "Halted" |
static const std::string | PAUSED_STATE_NAME = "Paused" |
static const std::string | RUNNING_STATE_NAME = "Running" |
static const std::string | SHUTDOWN_STATE_NAME = "Shutdown" |
static const std::string | CONFIGURED_STATE_NAME = "Configured" |
static const std::string | SHUTDOWN_TRANSITION_NAME = "Shutdown" |
static const std::string | STARTUP_TRANSITION_NAME = "Startup" |
static const std::string | INIT_TRANSITION_NAME = "Initialize" |
static const std::string | ERROR_TRANSITION_NAME = FiniteStateMachine::ERROR_TRANSITION_NAME |
static const std::string | FAIL_TRANSITION_NAME = "Fail" |
static const std::string | CONFIGURE_TRANSITION_NAME = "Configure" |
static const std::string | HALT_TRANSITION_NAME = "Halt" |
static const std::string | ABORT_TRANSITION_NAME = "Abort" |
static const std::string | PAUSE_TRANSITION_NAME = "Pause" |
static const std::string | RESUME_TRANSITION_NAME = "Resume" |
static const std::string | START_TRANSITION_NAME = "Start" |
static const std::string | STOP_TRANSITION_NAME = "Stop" |
Protected Member Functions | |
void | transitionConfiguringFSMs (void) |
void | preStateMachineExecution (unsigned int i) |
void | postStateMachineExecution (unsigned int i) |
void | preStateMachineExecutionLoop (void) |
void | postStateMachineExecutionLoop (void) |
![]() | |
xoap::MessageReference | TRACESupervisorRequest (xoap::MessageReference message) |
const std::string & | getTraceLevels (void) |
const std::string & | setTraceLevels (std::string const &host, std::string const &mode, std::string const &labelsStr, uint32_t setValueMSB, uint32_t setValueLSB) |
const std::string & | setIndividualTraceLevels (std::string const &host, std::string const &mode, std::string const &labelValuesStr) |
const std::string & | getTraceTriggerStatus (void) |
const std::string & | setTraceTriggerEnable (std::string const &host, size_t entriesAfterTrigger) |
const std::string & | resetTRACE (std::string const &host) |
const std::string & | enableTRACE (std::string const &host, bool enable) |
const std::string & | getTraceSnapshot (std::string const &host, std::string const &filterFor, std::string const &filterOut) |
Protected Attributes | |
WorkLoopManager | stateMachineWorkLoopManager_ |
toolbox::BSem | stateMachineSemaphore_ |
std::vector< VStateMachine * > | theStateMachineImplementation_ |
std::vector< bool > | stateMachinesIterationDone_ |
for managing transition iterations | |
unsigned int | stateMachinesIterationWorkCount_ |
unsigned int | subIterationWorkStateMachineIndex_ |
RemoteWebUsers | theRemoteWebUsers_ |
![]() | |
xdaq::Application * | theApplication_ |
![]() | |
const std::string | supervisorClass_ |
const std::string | supervisorClassNoNamespace_ |
ITRACEController * | theTRACEController_ |
only define for an app that receives a command | |
![]() | |
FiniteStateMachine | theStateMachine_ |
ProgressBar | theProgressBar_ |
volatile bool | asyncFailureReceived_ |
volatile bool | asyncPauseExceptionReceived_ |
volatile bool | asyncStopExceptionReceived_ |
unsigned int | iterationIndex_ = 0 |
unsigned int | subIterationIndex_ = 0 |
bool | iterationWorkFlag_ |
bool | subIterationWorkFlag_ |
toolbox::fsm::State | lastIterationState_ |
std::string | lastIterationCommand_ |
std::string | lastAttemptedConfigureGroup_ |
std::string | lastIterationResult_ |
unsigned int | lastIterationIndex_ |
unsigned int | lastSubIterationIndex_ |
std::map< toolbox::fsm::State, std::map< std::string, void(RunControlStateMachine::*)(toolbox::Event::Reference), std::less< std::string > > > | stateTransitionFunctionTable_ |
Friends | |
class | MacroMakerSupervisor |
Additional Inherited Members | |
![]() | |
static void | extractPermissionsMapFromString (const std::string &permissionsString, std::map< std::string, WebUsers::permissionLevel_t > &permissionsMap) |
static bool | doPermissionsGrantAccess (std::map< std::string, WebUsers::permissionLevel_t > &permissionLevelsMap, std::map< std::string, WebUsers::permissionLevel_t > &permissionThresholdsMap) |
![]() | |
AllSupervisorInfo | allSupervisorInfo_ |
ConfigurationManager * | theConfigurationManager_ |
![]() | |
static void | indicateOtsAlive (const CorePropertySupervisorBase *properties=0) |
static void | indicateOtsDead (const CorePropertySupervisorBase *properties=0) |
![]() | |
static const struct ots::CorePropertySupervisorBase::SupervisorProperties | SUPERVISOR_PROPERTIES |
CoreSupervisorBase This class should be the base class for all client otsdaq, XDAQ-based, supervisors. That is, all supervisors that need web requests through the ots desktop with access verified by the Gateway Supervisor, or that need a state machines driven by the Gateway Supervisor.
Definition at line 44 of file CoreSupervisorBase.h.
|
virtual |
Here are the common web request handlers: defaultPage returns the public html page request checks the login before proceeding to virtual request
Reimplemented in ots::CodeEditorSupervisor.
Definition at line 90 of file CoreSupervisorBase.cc.
|
virtual |
virtual progress string that can be overridden with more info e.g. steps and sub-steps however integer 0-100 should be first number, then separated by : colons e.g. 94:FE0:1:2
Reimplemented in ots::ARTDAQSupervisor.
Definition at line 468 of file CoreSupervisorBase.cc.
|
virtual |
nonXmlRequest Supervisors should override this function. It will be called after user access has been verified according to the Supervisor Property settings. The CoreSupervisorBase class provides consistent access, responses, and error handling across all inheriting supervisors that use ::request.
Definition at line 357 of file CoreSupervisorBase.cc.
|
virtual |
request Supervisors should override this function. It will be called after user access has been verified according to the Supervisor Property settings. The CoreSupervisorBase class provides consistent access, responses, and error handling across all inheriting supervisors that use ::request.
Reimplemented in ots::CodeEditorSupervisor.
Definition at line 291 of file CoreSupervisorBase.cc.
void CoreSupervisorBase::sendAsyncExceptionToGateway | ( | const std::string & | errorMessage, |
bool | isPauseException, | ||
bool | isStopException | ||
) |
SendAsyncErrorToGateway Static – thread Send async error or soft error to gateway Call this as thread so that parent calling function (workloop) can end.
Definition at line 1281 of file CoreSupervisorBase.cc.
|
virtual |
Reimplemented from ots::RunControlStateMachine.
Definition at line 592 of file CoreSupervisorBase.cc.
|
virtual |
Reimplemented from ots::RunControlStateMachine.
Definition at line 580 of file CoreSupervisorBase.cc.
|
virtual |
using stateMachineFunction_t = void (ots::RunControlStateMachine::* )(toolbox::Event::Reference); stateMachineFunction_t getTransitionFunction (const toolbox::fsm::State from, const std::string &transition);
Finite State Machine States
Reimplemented from ots::RunControlStateMachine.
Definition at line 574 of file CoreSupervisorBase.cc.
|
virtual |
Reimplemented from ots::RunControlStateMachine.
Definition at line 598 of file CoreSupervisorBase.cc.
|
virtual |
Reimplemented from ots::RunControlStateMachine.
Definition at line 586 of file CoreSupervisorBase.cc.
|
virtual |
transitionHalting Ignore errors if coming from Failed state
Reimplemented from ots::RunControlStateMachine.
Reimplemented in ots::FESupervisor, ots::ARTDAQSupervisor, and ots::ARTDAQOnlineMonitorSupervisor.
Definition at line 895 of file CoreSupervisorBase.cc.
|
virtual |
Inheriting supervisor classes should not override this function, or should at least also call it in the override to maintain property functionality.
Reimplemented from ots::RunControlStateMachine.
Reimplemented in ots::ARTDAQSupervisor, and ots::ARTDAQOnlineMonitorSupervisor.
Definition at line 989 of file CoreSupervisorBase.cc.
|
friend |
to allow MacroMakerSupervisor to call requestWrapper in Macro Maker mode
Definition at line 49 of file CoreSupervisorBase.h.