This class is responsible for doing diagnostics in the framework. It turns on or off topics and diagnostic mode. More...
#include <RTDiagnosticSetting.h>
Public Member Functions | |
RTDiagnosticSetting (RTActionConfig &rtActionConfig, const AbstractServiceLocator *serviceLocator, const std::map< std::string, const AbstractServiceLocator * > serviceLocatorRelatedClasses) | |
virtual | ~RTDiagnosticSetting () |
void | execute (RTEvent *event) |
Modify topics and diagnostic paramters according to information passed as a payload in the event. That payload must extend the class DiagnosticEventPayload. | |
virtual void | printConfig (FesaStream *) |
Print the action configuration into the stream passed by argument. | |
virtual void | printState (FesaStream *, double) |
Print the actual state of the action (frequency of the completed actions) into the stream passed by argument. | |
Private Attributes | |
double | processStartTS_ |
time whe the process started | |
double | lastStateTS_ |
bool | splitProcess_ |
true if the equipment is split server and real time |
This class is responsible for doing diagnostics in the framework. It turns on or off topics and diagnostic mode.
Definition at line 16 of file RTDiagnosticSetting.h.
fesa::RTDiagnosticSetting::RTDiagnosticSetting | ( | RTActionConfig & | rtActionConfig, | |
const AbstractServiceLocator * | serviceLocator, | |||
const std::map< std::string, const AbstractServiceLocator * > | serviceLocatorRelatedClasses | |||
) |
Constructor
rtActionConfig | contains the information to configure the real time action |
Definition at line 25 of file RTDiagnosticSetting.cpp.
References fesa::AbstractRTAction::completedActionCount_, fesa::DiagnosticUtils::DiagStateCounter::current_, fesa::AbstractEquipment::getInstance(), fesa::AbstractEquipment::getProcessType(), fesa::TsCounter::getTimeOfDay(), fesa::DiagnosticUtils::DiagStateCounter::last_, lastStateTS_, fesa::FesaLogger::logTsc_, fesa::DiagnosticUtils::DiagStateCounter::max_, processStartTS_, S_UNIT, splitProcess_, and fesa::unsplit.
fesa::RTDiagnosticSetting::~RTDiagnosticSetting | ( | ) | [virtual] |
Destructor
Definition at line 122 of file RTDiagnosticSetting.cpp.
void fesa::RTDiagnosticSetting::execute | ( | RTEvent * | event | ) | [virtual] |
Modify topics and diagnostic paramters according to information passed as a payload in the event. That payload must extend the class DiagnosticEventPayload.
Implements fesa::AbstractRTAction.
Definition at line 41 of file RTDiagnosticSetting.cpp.
References fesa::DiagnosticEventPayload::className_, fesa::AbstractRTAction::completedActionCount_, fesa::FesaLogger::connectedHostName_, fesa::FesaLogger::connectedPortNumber_, fesa::DiagnosticUtils::DiagStateCounter::current_, fesa::DiagnosticEventPayload::customTopic_, fesa::DiagnosticEventPayload::fwkTopic_, fesa::FesaLogger::fwkTopic_, fesa::DiagnosticEventPayload::hostName_, fesa::DiagnosticUtils::initDiag, fesa::FesaLogger::modeDiagnostic_, fesa::DiagnosticEventPayload::port_, fesa::FesaLogger::reinit(), fesa::TsCounter::setCountPeriod(), fesa::FesaLogger::setCustomTopic(), fesa::FesaLogger::setDiagnosticMode(), splitProcess_, fesa::DiagnosticUtils::startDiag, fesa::DiagnosticEventPayload::state_, fesa::DiagnosticUtils::stopDiag, fesa::DiagnosticEventPayload::tsCounterPeriod_, fesa::DiagnosticUtils::updateCustomTopic, fesa::DiagnosticUtils::updateFwkTopic, and fesa::DiagnosticUtils::updateTsPeriod.
void fesa::RTDiagnosticSetting::printConfig | ( | FesaStream * | configStream | ) | [virtual] |
Print the action configuration into the stream passed by argument.
configStream | in which the information will be printed |
Implements fesa::AbstractRTAction.
Definition at line 102 of file RTDiagnosticSetting.cpp.
References fesa::AbstractAction::name_, and fesa::AbstractRTAction::selectionCriterion_.
void fesa::RTDiagnosticSetting::printState | ( | FesaStream * | fesaStream, | |
double | elapsedTime | |||
) | [virtual] |
Print the actual state of the action (frequency of the completed actions) into the stream passed by argument.
fesaStream | in which the information will be printed |
Implements fesa::AbstractRTAction.
Definition at line 110 of file RTDiagnosticSetting.cpp.
References fesa::AbstractRTAction::abortedActionCount_, fesa::AbstractRTAction::completedActionCount_, fesa::DiagnosticUtils::DiagStateCounter::current_, fesa::DiagnosticUtils::DiagStateCounter::last_, and fesa::AbstractAction::name_.
double fesa::RTDiagnosticSetting::lastStateTS_ [private] |
CRFESA-764 not used
Definition at line 54 of file RTDiagnosticSetting.h.
Referenced by RTDiagnosticSetting().
time whe the process started
Definition at line 50 of file RTDiagnosticSetting.h.
Referenced by RTDiagnosticSetting().
fesa::RTDiagnosticSetting::splitProcess_ [private] |
true if the equipment is split server and real time
Definition at line 59 of file RTDiagnosticSetting.h.
Referenced by execute(), and RTDiagnosticSetting().