19 #ifndef MBS_MonitorSlowControl
23 #ifndef DABC_SocketThread
27 #ifndef MBS_MbsTypeDefs
Represents command with its arguments.
Represents objects hierarchy of remote (or local) DABC process.
Reference on the arbitrary object
@ evntSocketLast
from this event number one can add more socket system events
Socket addon for handling I/O events.
Active object, which is working inside dabc::Thread.
DaqLogWorker(const dabc::Reference &parent, const std::string &name, const std::string &mbsnode, int port)
virtual void ProcessEvent(const dabc::EventId &)
virtual double ProcessTimeout(double last_diff)
virtual std::string RequiredThrdClass() const
Method returns name of required thread class for processor.
virtual void OnThreadAssigned()
Worker to handle connection with MBS remote command server.
void ProcessNextMbsCommand()
virtual void OnThreadAssigned()
virtual ~DaqRemCmdWorker()
virtual double ProcessTimeout(double last_diff)
virtual void ProcessEvent(const dabc::EventId &)
DaqRemCmdWorker(const dabc::Reference &parent, const std::string &name, const std::string &mbsnode, int port)
virtual int ExecuteCommand(dabc::Command cmd)
Main method where commands are executed.
dabc::CommandsQueue fCmds
Addon class to retrieve status record from MBS server
virtual void OnThreadAssigned()
virtual void OnRecvCompleted()
Method called when receive operation is completed.
virtual double ProcessTimeout(double last_diff)
mbs::DaqStatus & GetStatus()
Base class for monitoring of slow control data.
Interface module for MBS monitoring and control.
double fPeriod
period how often status is requested in seconds
double fRateInterval
period for measuring the rate averages in seconds
virtual void OnThreadAssigned()
virtual std::string RequiredThrdClass() const
Method returns name of required thread class for processor.
int fHistory
length of parameter history buffer
bool fWaitingLogger
waiting logger to create cmd port
void SetRateInterval(double t)
set sampling interval for rates calculation
dabc::Hierarchy fHierarchy
void NewMessage(const std::string &msg)
Called by LogWorker to inform about new message.
int fLoggerPort
port, providing log information
std::string fFileStateName
name of filestate parameter
void FillStatistic(const std::string &options, const std::string &itemname, mbs::DaqStatus *old_daqst, mbs::DaqStatus *new_daqst, double difftime)
virtual int ExecuteCommand(dabc::Command cmd)
Main method where commands are executed.
void UpdateSetupState(int isloaded)
update mbs setup loaded state
void NewSendCommand(const std::string &cmd, int res=-1)
Called by CmdWorker to inform about new command send (or getting reply)
std::string fSetupStateName
name of "daq setup is loaded" parameter
bool fPrintf
use printf for major debug output
dabc::Command fWaitingCmd
command waiting when logger channel is ready
void UpdateMbsState(int isrunning)
update mbs acq running state
Monitor(const std::string &name, dabc::Command cmd=nullptr)
std::string fMbsNode
name of MBS node to connect
void UpdateFileState(int isopen)
update file on/off state
std::string fRateIntervalName
name of rate sample interval parameter
dabc::TimeStamp fStatStamp
time when last status was obtained
int fStatPort
port, providing stat information (normally 6008)
int fCmdPort
port, providing remote command access
void SetHistoryDepth(int entries)
set depth of variable history buffer
std::string fHistoryName
name of variable history parameter
std::string MbsNodeName() const
mbs::DaqStatus fStatus
current DAQ status
void CreateCommandWorker()
void LoggerAddonCreated()
Called by LogWorker to inform that connection is established.
void NewStatus(mbs::DaqStatus &stat)
Called by DaqStatusAddon to inform about new daq status.
virtual void ProcessTimerEvent(unsigned timer)
Method called by framework when timer event is produced.
std::string fAcqStateName
name of acquisition running parameter
virtual unsigned WriteRecRawData(void *ptr, unsigned maxsize)
Worker to handle connection with MBS prompter.
virtual void ProcessEvent(const dabc::EventId &)
dabc::CommandsQueue fCmds
void ProcessNextMbsCommand()
virtual double ProcessTimeout(double last_diff)
PrompterWorker(const dabc::Reference &parent, const std::string &name, const std::string &mbsnode, int port)
virtual ~PrompterWorker()
virtual void OnThreadAssigned()
virtual int ExecuteCommand(dabc::Command cmd)
Main method where commands are executed.
const char * typeSocketThread
Support for MBS - standard GSI DAQ.
void SwapData(void *data, unsigned bytessize)
Event structure, exchanged between DABC threads.
Class for acquiring and holding timestamps.