Definition at line 510 of file mcp.cc.
References HandleFadConnections(), HandleFtmStaticData(), HandleStateChange(), MCP::State::kConfigured, MCP::State::kConfiguring1, MCP::State::kConfiguring2, MCP::State::kConfiguring3, MCP::State::kConnected, MCP::State::kConnecting, MCP::State::kDimNetworkNA, MCP::State::kDisconnected, MCP::State::kIdle, MCP::State::kTakingData, MCP::State::kTriggerOn, Print(), Reset(), DimState::SetCallback(), StartRun(), StopRun(), DimState::Subscribe(), and DimDescribedState::Subscribe().
516 fService(
"MCP/CONFIGURATION",
"X:1;X:1;C",
"Run configuration information" 517 "|MaxTime[s]:Maximum time before the run gets stopped" 518 "|MaxEvents[num]:Maximum number of events before the run gets stopped" 519 "|Name[text]:Name of the chosen configuration")
547 "DIM dns server not available.");
549 "Neither ftmctrl, fadctrl, datalogger nor rate control online.");
551 "Either ftmctrl, fadctrl, datalogger or rate control not online.");
553 "All needed subsystems online.");
555 "Waiting for next configuration command");
557 "Starting configuration procedure, checking datalogger/ratecontrol state");
559 "Starting ratecontrol, waiting for FTM to get configured and Datalogger to get ready");
561 "Waiting for FADs and ratecontrol to get ready");
573 "Everything is configured, trigger will be switched on now");
575 "The trigger is switched on, waiting for FAD to receive data");
577 "The trigger is switched on, FADs are sending data");
582 (
"Start the configuration and data taking for a run-type of a pre-defined setup" 583 "|TimeMax[s]:Maximum number of seconds before the run will be closed automatically" 584 "|NumMax[count]:Maximum number events before the run will be closed automatically" 585 "|Name[text]:Name of the configuration to be used for taking data");
589 (
"Stops the trigger (either disables the FTM trigger or the internal DRS trigger)");
593 (
"If a configuration blockes because a system cannot configure itself properly, " 594 "this command can be called to leave the configuration procedure. The command " 595 "is also propagated to FTM and FAD");
599 (
"Print the states and connection status of all systems connected to the MCP.");
EventImp & AddEvent(const std::string &name, const std::string &states, const std::string &fmt)
virtual void Subscribe(StateMachineImp &imp)
int HandleFadConnections(const EventImp &d)
vector< bool > fFadNeedsReset
int StartRun(const EventImp &evt)
DimDescribedState fDimFTM
StateMachineDim(std::ostream &out=std::cout, const std::string &name="DEFAULT")
DimDescribedService fService
DimDescribedState fDimFAD
virtual void Subscribe(StateMachineImp &imp)
EventImp & Subscribe(const std::string &name)
DimDescribedState fDimLog
uint16_t fNumConnectedFtu
bool AddStateName(const int state, const std::string &name, const std::string &doc="")
void SetCallback(const callback &cb)
int HandleFtmStaticData(const EventImp &d)