otsdaq  3.07.00
GatewaySupervisor.h
1 #ifndef _ots_GatewaySupervisor_h
2 #define _ots_GatewaySupervisor_h
3 #include <atomic>
4 
5 #include "otsdaq/CoreSupervisors/ConfigurationSupervisorBase.h"
6 #include "otsdaq/CoreSupervisors/CorePropertySupervisorBase.h"
7 #include "otsdaq/FiniteStateMachine/RunControlStateMachine.h"
8 #include "otsdaq/GatewaySupervisor/Iterator.h"
9 #include "otsdaq/SOAPUtilities/SOAPMessenger.h"
10 #include "otsdaq/SupervisorInfo/AllSupervisorInfo.h"
11 #include "otsdaq/WebUsersUtilities/WebUsers.h"
12 #include "otsdaq/WorkLoopManager/WorkLoopManager.h"
13 
14 #include "otsdaq/CodeEditor/CodeEditor.h"
15 #include "otsdaq/TablePlugins/DesktopIconTable.h"
16 
17 #include "otsdaq/NetworkUtilities/TransceiverSocket.h" // for UDP state changer
18 
19 #pragma GCC diagnostic push
20 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
21 #include <xdaq/Application.h>
22 #pragma GCC diagnostic pop
23 #include "otsdaq/Macros/XDAQApplicationMacros.h"
24 
25 #include <toolbox/task/WorkLoop.h>
26 #include <xdata/String.h>
27 #include <xgi/Method.h>
28 #include "otsdaq/GatewaySupervisor/PixelHistoPicGen.h"
29 
30 #include <pthread.h> // for pthread_kill
31 #include <set>
32 #include <sstream>
33 #include <string>
34 
35 // clang-format off
36 
38 // #define FSM_LAST_CONFIGURED_GROUP_ALIAS_FILE std::string("FSMLastConfiguredGroupAlias.hist")
39 // #define FSM_LAST_STARTED_GROUP_ALIAS_FILE std::string("FSMLastStartedGroupAlias.hist")
40 
41 // #define FSM_CONFIGURED_GROUP_ALIASES_FILE std::string("FSMConfiguredGroupAliases.hist")
42 // #define FSM_STARTED_GROUP_ALIASES_FILE std::string("FSMStartedGroupAlias.hist")
43 
44 // #define FSM_CONFIGURED_OR_STARTED_GROUP_ALIASES_FILE std::string("FSMConfiguredOrStartedGroupAlias.hist")
45 
46 // #define FSM_CONFIGURED_CONTEXTS_FILE std::string("FSMConfiguredContexts.hist")
47 // #define FSM_STARTED_CONTEXTS_FILE std::string("FSMStartedContexts.hist")
48 // #define FSM_CONFIGURED_OR_STARTED_CONTEXTS_FILE std::string("FSMConfiguredOrStartedContexts.hist")
49 
50 // #define FSM_CONFIGURED_BACKBONES_FILE std::string("FSMConfiguredBackbones.hist")
51 // #define FSM_STARTED_BACKBONES_FILE std::string("FSMStartedBackbones.hist")
52 // #define FSM_CONFIGURED_OR_STARTED_BACKBONES_FILE std::string("FSMConfiguredOrStartedBackbones.hist")
53 
54 // #define FSM_CONFIGURED_ITERATORS_FILE std::string("FSMConfiguredIterators.hist")
55 // #define FSM_STARTED_ITERATORS_FILE std::string("FSMStartedIterators.hist")
56 // #define FSM_CONFIGURED_OR_STARTED_ITERATORS_FILE std::string("FSMConfiguredOrStartedIterators.hist")
57 
58 
59 namespace ots
60 {
61 class ConfigurationManager;
62 class TableGroupKey;
63 class WorkLoopManager;
64 
65 
70  class GatewaySupervisor : public xdaq::Application,
71  public SOAPMessenger,
75  {
76  friend class WizardSupervisor;
77  friend class Iterator;
78 
79  static const std::string COMMAND_PARAM_LOG_ENTRY_PREAMBLE;
80  static const std::string COMMAND_PARAM_SUBSYSTEM_COMMON_PREAMBLE;
81  static const std::string COMMAND_PARAM_SUBSYSTEM_COMMON_OVERRIDE_PREAMBLE;
82 
83  public:
84  XDAQ_INSTANTIATOR();
85 
86  GatewaySupervisor (xdaq::ApplicationStub* s);
87  virtual ~GatewaySupervisor (void);
88 
89  void init (void);
90 
91  void Default (xgi::Input* in, xgi::Output* out);
92 
93  void loginRequest (xgi::Input* in, xgi::Output* out);
94  void request (xgi::Input* in, xgi::Output* out);
95  void tooltipRequest (xgi::Input* in, xgi::Output* out);
96  void XGI_Turtle (xgi::Input* in, xgi::Output* out);
97 
98  void addStateMachineStatusToXML (HttpXmlDocument& xmlOut, const std::string& fsmName, bool getRunNumber = true);
99  void addFilteredConfigAliasesToXML (HttpXmlDocument& xmlOut, const std::string& fsmName);
100  void addRequiredFsmLogInputToXML (HttpXmlDocument& xmlOut, const std::string& fsmName);
101 
102  // State Machine requests handlers
103  void stateMachineXgiHandler(xgi::Input* in, xgi::Output* out);
104  void stateMachineIterationBreakpoint(xgi::Input* in, xgi::Output* out);
105 
106  static std::string getIconHeaderString(void);
107  static bool handleAddDesktopIconRequest(const std::string& author, cgicc::Cgicc& cgiIn, HttpXmlDocument& xmlOut, std::vector<DesktopIconTable::DesktopIcon>* newIcons = nullptr);
108  static void handleGetApplicationIdRequest(AllSupervisorInfo* applicationInfo, cgicc::Cgicc& cgiIn, HttpXmlDocument& xmlOut, std::map<std::string /* requestOrigin */, std::map<std::string /* requestUrlHostPort */, std::string /* translatedHostPort */>>* portTranslationMap = nullptr);
109 
110  xoap::MessageReference stateMachineXoapHandler(xoap::MessageReference msg);
111 
112  bool stateMachineThread(toolbox::task::WorkLoop* workLoop);
113 
114  // Status requests handlers
115  void statusRequest(xgi::Input* in, xgi::Output* out);
116  void infoRequestResultHandler(xgi::Input* in, xgi::Output* out);
117  bool infoRequestThread(toolbox::task::WorkLoop* workLoop);
118 
119  // External GatewaySupervisor XOAP handlers
120  xoap::MessageReference supervisorCookieCheck(xoap::MessageReference msg);
121  xoap::MessageReference supervisorGetActiveUsers(xoap::MessageReference msg);
122  xoap::MessageReference supervisorSystemMessage(xoap::MessageReference msg);
123  xoap::MessageReference supervisorGetUserInfo(xoap::MessageReference msg);
124  xoap::MessageReference supervisorSystemLogbookEntry(xoap::MessageReference msg);
125  xoap::MessageReference supervisorLastTableGroupRequest(xoap::MessageReference msg);
126 
127  // Finite State Machine States
128  void stateInitial(toolbox::fsm::FiniteStateMachine& fsm) override;
129  void statePaused(toolbox::fsm::FiniteStateMachine& fsm) override;
130  void stateRunning(toolbox::fsm::FiniteStateMachine& fsm) override;
131  void stateHalted(toolbox::fsm::FiniteStateMachine& fsm) override;
132  void stateConfigured(toolbox::fsm::FiniteStateMachine& fsm) override;
133  void inError(toolbox::fsm::FiniteStateMachine& fsm) override;
134 
135  void transitionConfiguring(toolbox::Event::Reference e) override;
136  void transitionHalting(toolbox::Event::Reference e) override;
137  void transitionInitializing(toolbox::Event::Reference e) override;
138  void transitionPausing(toolbox::Event::Reference e) override;
139  void transitionResuming(toolbox::Event::Reference e) override;
140  void transitionStarting(toolbox::Event::Reference e) override;
141  void transitionStopping(toolbox::Event::Reference e) override;
142  void transitionShuttingDown(toolbox::Event::Reference e) override;
143  void transitionStartingUp(toolbox::Event::Reference e) override;
144  void enteringError(toolbox::Event::Reference e) override;
145 
146  void makeSystemLogEntry(const std::string& entryText, const std::string& subjectText = "");
147  static void addSystemMessage(std::string toUserCSV, std::string message);
148 
149  void checkForAsyncError(void);
150 
151  // CorePropertySupervisorBase override functions
152  virtual void setSupervisorPropertyDefaults (void) override;
153  virtual void forceSupervisorPropertyValues (void) override;
154 
155 
156  private:
157  unsigned int getNextRunNumber (const std::string& fsmName = "");
158  void setNextRunNumber (unsigned int runNumber, const std::string& fsmName = "");
159  std::string getLastLogEntry (const std::string& logType, const std::string& fsmName = "");
160  void setLastLogEntry (const std::string& logType, const std::string& logEntry, const std::string& fsmName = "");
161 
162 
163  static xoap::MessageReference lastTableGroupRequestHandler (const SOAPParameters& parameters);
164  static void launchStartOTSCommand (const std::string& command, ConfigurationManager* cfgMgr);
165  static void launchStartOneServerCommand (const std::string& command, ConfigurationManager* cfgMgr, const std::string& contextName);
166 
167  static void indicateOtsAlive (const CorePropertySupervisorBase* properties = 0);
168  xoap::MessageReference TRACESupervisorRequest (xoap::MessageReference message);
169 
170  static void StateChangerWorkLoop (GatewaySupervisor* supervisorPtr);
171  static void AppStatusWorkLoop (GatewaySupervisor* supervisorPtr, const bool doDisconnected = false);
172 
173  std::string attemptStateMachineTransition (HttpXmlDocument* xmldoc,
174  std::ostringstream* out,
175  const std::string& command,
176  const std::string& fsmName,
177  const std::string& fsmWindowName,
178  const std::string& username,
179  const std::vector<std::string>& parameters,
180  std::string logEntry = "");
181  void broadcastMessage (xoap::MessageReference msg);
182  void broadcastMessageToRemoteGateways (const xoap::MessageReference msg);
183  void broadcastMessageToRemoteGatewaysComplete (const xoap::MessageReference msg);
184  void signalAndWaitForBroadcastThreads (unsigned int numberOfThreads);
185 
186  struct BroadcastMessageIterationsDoneStruct
187  {
188  // Creating std::vector<std::vector<bool>>
189  // because of problems with the standard library
190  // not allowing passing by reference of bool types.
191  // Broadcast thread implementation requires passing by reference.
192  ~BroadcastMessageIterationsDoneStruct()
193  {
194  for (auto& arr : iterationsDone_)
195  delete[] arr;
196  iterationsDone_.clear();
197  arraySizes_.clear();
198  } // end destructor
199 
200  void push(const unsigned int& size)
201  {
202  iterationsDone_.push_back(new bool[size]);
203  arraySizes_.push_back(size);
204 
205  // initialize to false
206  for (unsigned int i = 0; i < size; ++i)
207  iterationsDone_[iterationsDone_.size() - 1][i] = false;
208  } // end push()
209 
210  bool* operator[](unsigned int i) { return iterationsDone_[i]; }
211  const bool* operator[](unsigned int i) const { return iterationsDone_[i]; }
212  unsigned int size(unsigned int i = -1)
213  {
214  if (i == (unsigned int)-1)
215  return iterationsDone_.size();
216  return arraySizes_[i];
217  }
218 
219  private:
220  std::vector<bool*> iterationsDone_;
221  std::vector<unsigned int> arraySizes_;
222  }; // end BroadcastMessageIterationsDoneStruct definition
223 
224  struct BroadcastThreadStruct
225  {
226  //===================
227  BroadcastThreadStruct()
228  : threadIndex_(-1)
229  , exitThread_(false)
230  , working_(true)
231  , workToDo_(false)
232  , error_(false)
233  , hardCancelRequested_(false)
234  , hasPthreadId_(false)
235  {
236  } // end BroadcastThreadStruct constructor()
237 
238  //===================
239  BroadcastThreadStruct(BroadcastThreadStruct &&b)
240  : threadIndex_(b.threadIndex_)
241  , exitThread_(b.exitThread_.load())
242  , working_(b.working_.load())
243  , workToDo_(b.workToDo_.load())
244  , error_(b.error_.load())
245  , hardCancelRequested_(b.hardCancelRequested_.load())
246  , pthreadId_(b.pthreadId_)
247  , hasPthreadId_(b.hasPthreadId_.load())
248  {
249  } // end BroadcastThreadStruct move constructor()
250 
251 
253  {
254  //===================
255  BroadcastMessageStruct(const SupervisorInfo& appInfo,
256  xoap::MessageReference message,
257  const std::string& command,
258  const unsigned int& iteration,
259  bool& iterationsDone,
260  std::shared_ptr<BroadcastMessageIterationsDoneStruct> iterationsDoneOwner)
261  : appInfo_(appInfo)
262  , message_(message)
263  , command_(command)
264  , iteration_(iteration)
265  , iterationsDone_(iterationsDone)
266  , iterationsDoneOwner_(iterationsDoneOwner)
267  {
268  }
269 
270  const SupervisorInfo& appInfo_;
271  xoap::MessageReference message_;
272  const std::string command_;
273  const unsigned int iteration_;
274  bool& iterationsDone_;
275  // Keep the BroadcastMessageIterationsDoneStruct alive while this message
276  // is in use by a thread, preventing UAF even if broadcastMessage() returns
277  // early (e.g. on timeout or exception) before the thread finishes.
278  std::shared_ptr<BroadcastMessageIterationsDoneStruct> iterationsDoneOwner_;
279 
280  std::string reply_;
281  }; // end BroadcastMessageStruct definition
282 
283  //===================
284  void setMessage(const SupervisorInfo& appInfo,
285  xoap::MessageReference message,
286  const std::string& command,
287  const unsigned int& iteration,
288  bool& iterationsDone,
289  std::shared_ptr<BroadcastMessageIterationsDoneStruct> iterationsDoneOwner)
290  {
291  messages_.clear();
293  appInfo, message, command, iteration, iterationsDone, iterationsDoneOwner));
294  workToDo_ = true;
295  } // end setMessage()
296 
297  const SupervisorInfo& getAppInfo() { return messages_[0].appInfo_; }
298  xoap::MessageReference getMessage() { return messages_[0].message_; }
299  const std::string& getCommand() { return messages_[0].command_; }
300  const unsigned int& getIteration() { return messages_[0].iteration_; }
301  std::string& getReply() { return messages_[0].reply_; }
302  bool& getIterationsDone() { return messages_[0].iterationsDone_; }
303 
304  // each thread accesses these members
305  std::mutex threadMutex_;
306  unsigned int threadIndex_;
307  std::atomic<bool> exitThread_, working_, workToDo_, error_;
308  std::atomic<bool> hardCancelRequested_;
309  pthread_t pthreadId_;
310  std::atomic<bool> hasPthreadId_;
311  // always just 1 message (for now)
312  std::vector<BroadcastThreadStruct::BroadcastMessageStruct> messages_;
313 
314  }; // end BroadcastThreadStruct declaration
315  static void broadcastMessageThread(
316  GatewaySupervisor* supervisorPtr,
317  std::shared_ptr<GatewaySupervisor::BroadcastThreadStruct> threadStruct);
318  bool handleBroadcastMessageTarget(const SupervisorInfo& appInfo,
319  xoap::MessageReference message,
320  const std::string& command,
321  const unsigned int& iteration,
322  std::string& reply,
323  unsigned int threadIndex = 0);
324 
325 
326  // Member Variables -----------------------
327 
328  bool supervisorGuiHasBeenLoaded_;
329  static WebUsers theWebUsers_;
330  std::map<std::string /* requestOrigin */, std::map<std::string /* requestUrlHostPort */,
331  std::string /* translatedHostPort */>>
332  portTranslationMap_;
333 
334  WorkLoopManager stateMachineWorkLoopManager_;
335  toolbox::BSem stateMachineSemaphore_;
336 
337  std::string activeStateMachineName_;
338  std::string activeStateMachineWindowName_;
339  std::string activeStateMachineDumpFormatOnRun_, activeStateMachineDumpFormatOnConfigure_;
340  std::string activeStateMachineSystemDumpOnRun_, activeStateMachineSystemDumpOnConfigure_;
341  bool activeStateMachineSystemDumpOnRunEnable_, activeStateMachineSystemDumpOnConfigureEnable_;
342  std::string activeStateMachineSystemDumpOnRunFilename_, activeStateMachineSystemDumpOnConfigureFilename_;
343  bool activeStateMachineRequireUserLogOnRun_, activeStateMachineRequireUserLogOnConfigure_;
344  std::string activeStateMachineRunInfoPluginType_;
345  std::map<std::string /* fsmName */, std::string /* logEntry */>
346  stateMachineConfigureLogEntry_, stateMachineStartLogEntry_, stateMachineStopLogEntry_;
347  std::string activeStateMachineRunNumber_, activeStateMachineRunAlias_, activeStateMachineConfigurationAlias_;
348  bool activeStateMachineRollOverLogOnConfigure_, activeStateMachineRollOverLogOnStart_;
349  std::chrono::steady_clock::time_point
350  activeStateMachineRunStartTime;
351  int activeStateMachineRunDuration_ms;
352  unsigned int activeStateMachineConfigureConditionID_, activeStateMachineRunConditionID_;
353  std::string activeStateMachineSubsystemCommonList_, activeStateMachineSubsystemCommonOverrideList_;
354 
355  std::mutex systemStatusMutex_;
356  std::string lastLogbookEntry_;
357  time_t lastLogbookEntryTime_ = 0;
358 
359  std::string lastConsoleErr_, lastConsoleWarn_, lastConsoleInfo_, lastConsoleErrTime_, lastConsoleWarnTime_, lastConsoleInfoTime_;
360  std::string firstConsoleErr_, firstConsoleWarn_, firstConsoleInfo_, firstConsoleErrTime_, firstConsoleWarnTime_, firstConsoleInfoTime_;
361  size_t systemConsoleErrCount_ = 0, systemConsoleWarnCount_ = 0, systemConsoleInfoCount_ = 0;
362 
363  std::pair<std::string /*group name*/, TableGroupKey>
364  theConfigurationTableGroup_;
365  std::string stateMachineTransitionUsername_;
366 
367  Iterator theIterator_;
368  std::mutex stateMachineAccessMutex_;
370  std::string stateMachineLastCommandInput_;
371  enum
372  {
373  VERBOSE_MUTEX = 0
374  };
375 
376  CodeEditor codeEditor_;
377 
378  std::mutex broadcastCommandMessageIndexMutex_, broadcastIterationsDoneMutex_;
379  unsigned int broadcastCommandMessageIndex_;
380  bool broadcastIterationsDone_;
381  std::mutex broadcastIterationBreakpointMutex_;
382  unsigned int broadcastIterationBreakpoint_;
384  std::mutex broadcastCommandStatusUpdateMutex_;
385  std::string broadcastCommandStatus_;
386  static std::vector<std::shared_ptr<GatewaySupervisor::BroadcastThreadStruct>> broadcastThreadStructs_;
387 
388  std::string securityType_;
389  PixelHistoPicGen picGen_;
390 
391  //Variable used by the RunInfo plugin
392  unsigned int conditionID_;
393 
394 public: //used by remote subsystem control and status
395 
398 
399  enum class ConfigDumpTypes
400  {
401  Text,
402  JSON_all,
403  Unknown
404  };
405 
406  std::string command, fsmName;
407  private: //make error private to connect to set timestamp
408  std::string error;
409  time_t errorTimestamp = 0;
410  public:
411  void setError(const std::string& err) { error = err; errorTimestamp = time(0); }
412  void clearError() { error = ""; errorTimestamp = 0; }
413  void copyError(const RemoteGatewayInfo& r) { error = r.error; errorTimestamp = r.errorTimestamp; }
414  const std::string& getError() const { return error; }
415  const std::string getErrorTimestamp() const { return StringMacros::getTimestampString(errorTimestamp); }
416 
417  std::string config_dump;
418  ConfigDumpTypes config_dump_type = ConfigDumpTypes::Unknown;
419 
420  size_t ignoreStatusCount = 0;
421 
422  size_t consoleErrCount = 0, consoleWarnCount = 0;
423 
424  std::string fullName;
425  std::string user_data_path_record;
426  std::string setupType, instancePath, instanceHost, instanceUser;
427 
428  std::string selected_config_alias;
429  std::set<std::string> config_aliases;
430  std::string iconString, parentIconFolderPath, landingPage, permissionThresholdString;
431 
432  std::string usernameWithLock;
433 
434  enum class FSM_ModeTypes
435  {
436  Follow_FSM,
437  DoNotHalt,
438  OnlyConfigure,
439  };
440  FSM_ModeTypes fsm_mode = FSM_ModeTypes::Follow_FSM;
441  bool fsm_included = true;
442 
443  std::string getFsmMode() const {
444  switch(fsm_mode)
445  {
446  case FSM_ModeTypes::Follow_FSM: return "Follow FSM";
447  case FSM_ModeTypes::DoNotHalt: return "Do Not Halt";
448  case FSM_ModeTypes::OnlyConfigure: return "Only Configure";
449  default: return "Impossible";
450  }
451  } //end getFsmMode()
452 
453  std::string getConfigDumpType() const {
454  switch(config_dump_type)
455  {
456  case ConfigDumpTypes::Text: return "Text";
457  case ConfigDumpTypes::JSON_all: return "JSON all";
458  default: return "Unknown";
459  }
460  } //end getFsmMode()
461 
462  std::map<std::string, SupervisorInfo::SubappInfo> subapps;
463  }; //end GatewaySupervisor::RemoteGatewayInfo struct
464 
465  std::vector<GatewaySupervisor::RemoteGatewayInfo> remoteGatewayApps_;
466  std::mutex remoteGatewayAppsMutex_;
467  std::map<std::string /* appName */,
468  bool /* lastStatusGood */> appLastStatusGood_;
469  std::mutex dualStatusThreadMutex_;
470 
471  std::map<unsigned int /* lid */, SupervisorInfo> localAllSupervisorInfo_;
472 
473 
474  std::mutex latestGatewayIconsMutex_;
475  std::vector<DesktopIconTable::DesktopIcon> latestGatewayIcons_;
476  std::pair<std::string /* latestIconContext group */, TableGroupKey>
478 
480  std::pair<std::string /* latestIconContext group */, TableGroupKey>
482 
483  static void CheckRemoteGatewayStatus (GatewaySupervisor::RemoteGatewayInfo& remoteGatewayApp, const std::unique_ptr<TransceiverSocket>& remoteGatewaySocket, const std::string& ipForReverseLoginOverUDP, int portForReverseLoginOverUDP);
484  static void SendRemoteGatewayCommand (GatewaySupervisor::RemoteGatewayInfo& remoteGatewayApp, const std::unique_ptr<TransceiverSocket>& remoteGatewaySocket);
485  static void GetRemoteGatewayIcons (GatewaySupervisor::RemoteGatewayInfo& remoteGatewayApp, const std::unique_ptr<TransceiverSocket>& remoteGatewaySocket);
486  void loadRemoteGatewaySettings (std::vector<GatewaySupervisor::RemoteGatewayInfo>& remoteGateways, bool onlyNotFound = false) const;
487  void saveRemoteGatewaySettings (void) const;
488  static std::string translateURLForRequestOrigin (const std::string& url, const std::string& requestOrigin, std::map<std::string /* requestOrigin */, std::map<std::string /* requestUrlHostPort */, std::string /* translatedHostPort */>>& portTranslationMap);
489  static std::string translateRemoteIconStringForRequestOrigin (const std::string& iconString, const std::string& requestOrigin, std::map<std::string /* requestOrigin */, std::map<std::string /* requestUrlHostPort */, std::string /* translatedHostPort */>>& portTranslationMap);
490 
491  };
492 // clang-format on
493 
494 } // namespace ots
495 
496 #endif
friend class GatewaySupervisor
for access to indicateOtsAlive()
std::string latestGatewayRemoteIconsString_
cached string of remote gateway icons for quick access
virtual void setSupervisorPropertyDefaults(void) override
override to control supervisor specific defaults
void stateHalted(toolbox::fsm::FiniteStateMachine &fsm) override
virtual void forceSupervisorPropertyValues(void) override
override to force supervisor property values (and ignore user settings)
std::vector< DesktopIconTable::DesktopIcon > latestGatewayIcons_
used to track the latest desktop icons (which are defined by the active context but allowed to change...
void statePaused(toolbox::fsm::FiniteStateMachine &fsm) override
void stateRunning(toolbox::fsm::FiniteStateMachine &fsm) override
std::map< unsigned int, SupervisorInfo > localAllSupervisorInfo_
only use in main thread, stable copy of app status
std::pair< std::string, TableGroupKey > latestGatewayIconsContextGroup_
used to track the table group key for the latest desktop icons
void stateConfigured(toolbox::fsm::FiniteStateMachine &fsm) override
void stateInitial(toolbox::fsm::FiniteStateMachine &fsm) override
std::pair< std::string, TableGroupKey > latestGatewayRemoteIconsContextGroup_
used to track the table group key for the latest remote desktop icons
defines used also by OtsConfigurationWizardSupervisor
ConfigDumpTypes
<FSM Modes: 'Follow FSM,' 'Do not Halt' (artdaq), or 'Only Configure' (DCS/DQM)
FSM_ModeTypes
<FSM Modes: 'Follow FSM,' 'Do not Halt' (artdaq), or 'Only Configure' (DCS/DQM)
std::string permissionThresholdString
used for desktop icons
std::set< std::string > config_aliases
used for remote gateway subapp control
std::string selected_config_alias
used for remote gateway subapp control
FSM_ModeTypes fsm_mode
used for remote gateway subapp control
std::string fsmName
when not "", need to send
std::map< std::string, SupervisorInfo::SubappInfo > subapps
remote gateways can have subapps
size_t ignoreStatusCount
if non-zero, do not ask for status
std::string instanceUser
used for remote ots instance ssh launch
std::string user_data_path_record
used for remote gateway subapp control
static std::string getTimestampString(const std::string &linuxTimeInSeconds)