This class represents a real time action on the system. Real time actions are fired by an event source to carry out operations in the devices. More...
#include <AbstractRTAction.h>
Public Member Functions | |
AbstractRTAction (RTActionConfig &rtActionConfig, const AbstractServiceLocator *serviceLocator, const std::map< std::string, const AbstractServiceLocator * > serviceLocatorRelatedClasses) | |
Stores the RT action configuration. | |
virtual | ~AbstractRTAction () |
destructor | |
void | executeAction (RTEvent *event) |
This method will be called by the scheduler when the event arrives. | |
virtual void | execute (RTEvent *event)=0 |
this method contains the logic of the real time action | |
virtual void | printConfig (FesaStream *)=0 |
virtual void | printState (FesaStream *, double)=0 |
Protected Member Functions | |
void | sendManualNotification (MultiplexingContext *muxContext) |
this method sends a manual notification message in order to notify the properties and devices specified in the message | |
Protected Attributes | |
std::string | eventName_ |
name of the event that fires the action | |
std::string | selectionCriterion_ |
selection criterion to select devices used for notification | |
std::set< std::string > | manuallyNotifiedPropertiesCol_ |
std::string | eventSourceName_ |
event source name (timing, timingSim, timer, user, <custom-name>) | |
std::vector< AbstractDevice * > | abstractDeviceCol_ |
set of devices to which the real time action has access | |
GlobalDevice * | globalDevice_ |
DiagnosticUtils::DiagStateCounter | completedActionCount_ |
number of completed actions | |
uint32_t | abortedActionCount_ |
number of real time actions aborted | |
uint32_t | notificationID_ |
key to identify the notification that will be used in the real time action | |
ManualNotificationMessage * | manualNotificationMessage_ |
internal message used | |
Private Attributes | |
std::set< std::string > | automaticallyNotifiedPropertiesCol_ |
list of properties that will be notified automatically, after the RT-action has finished | |
NotificationProducer * | theNotificationProducer_ |
the notification producer is used to send properties' notifications to the server side | |
bool | devicesShareTimingDomain_ |
std::string | timingDomain_ |
Contain the timingDomain of the device collection + global device, if such timingDomain is shared by all the devices, otherwise contains "Undefined". |
This class represents a real time action on the system. Real time actions are fired by an event source to carry out operations in the devices.
Definition at line 102 of file AbstractRTAction.h.
fesa::AbstractRTAction::AbstractRTAction | ( | RTActionConfig & | rtActionConfig, | |
const AbstractServiceLocator * | serviceLocator, | |||
const std::map< std::string, const AbstractServiceLocator * > | serviceLocatorRelatedClasses | |||
) |
Stores the RT action configuration.
rtActionConfig | structure that contains all the necessary parameters to configure a real time action |
Definition at line 30 of file AbstractRTAction.cpp.
References abstractDeviceCol_, automaticallyNotifiedPropertiesCol_, fesa::RTActionConfig::className_, fesa::AbstractAction::className_, fesa::NotificationIDManager::createNotificationID(), devicesShareTimingDomain_, fesa::ConfigFieldString::getAsString(), fesa::NotificationProducer::getInstance(), fesa::NotificationIDManager::getInstance(), fesa::AbstractDevice::getName(), globalDevice_, fesa::RTActionConfig::isGlobalPropertyToBeNotified_, fesa::AbstractDevice::isMultiplexed(), manuallyNotifiedPropertiesCol_, manualNotificationMessage_, fesa::NO_NOTIFICATION, notificationID_, theNotificationProducer_, fesa::AbstractDevice::timingDomain, and timingDomain_.
fesa::AbstractRTAction::~AbstractRTAction | ( | ) | [virtual] |
destructor
Definition at line 99 of file AbstractRTAction.cpp.
References automaticallyNotifiedPropertiesCol_, manuallyNotifiedPropertiesCol_, and theNotificationProducer_.
virtual void fesa::AbstractRTAction::execute | ( | RTEvent * | event | ) | [pure virtual] |
this method contains the logic of the real time action
event | that triggers the execution |
Implemented in fesa::RTDiagnosticSetting.
Referenced by executeAction().
void fesa::AbstractRTAction::executeAction | ( | RTEvent * | event | ) |
This method will be called by the scheduler when the event arrives.
event | that triggers the execution |
Definition at line 110 of file AbstractRTAction.cpp.
References abortedActionCount_, fesa::DiagnosticUtils::DiagnosticMessage::action, automaticallyNotifiedPropertiesCol_, fesa::AbstractAction::className_, completedActionCount_, fesa::DiagnosticUtils::DiagStateCounter::current_, devicesShareTimingDomain_, execute(), FesaErrorDevColHasMultipleTimingDomains, FesaErrorInconsistentTimingDomain, fesa::DiagnosticUtils::framework, fesa::AbstractEquipment::getDiagnostics(), fesa::EquipmentData::getInstance(), fesa::AbstractEquipment::getInstance(), fesa::AbstractEvent::getMultiplexingContext(), manualNotificationMessage_, fesa::DiagnosticUtils::DiagnosticMessage::msg, fesa::DiagnosticUtils::DiagnosticMessage::name, fesa::AbstractAction::name_, fesa::NO_NOTIFICATION, notificationID_, fesa::ManualNotificationMessage::reset(), fesa::DiagnosticUtils::rt, fesa::NotificationProducer::sendAutomaticNotification(), fesa::EquipmentData::serverUp_, fesa::AbstractAction::serviceLocator_, fesa::DiagnosticUtils::DiagnosticMessage::side, fesa::DiagnosticUtils::DiagnosticMessage::source, fesa::DiagnosticUtils::start, fesa::DiagnosticUtils::stop, fesa::AbstractServiceLocator::synchronizeSettingFields(), theNotificationProducer_, timingDomain_, and fesa::AbstractAction::triggerAllAutomaticallyTriggeredOnDemandEventSources().
virtual void fesa::AbstractRTAction::printConfig | ( | FesaStream * | ) | [pure virtual] |
\
Implemented in fesa::RTAction< DeviceType >, and fesa::RTDiagnosticSetting.
virtual void fesa::AbstractRTAction::printState | ( | FesaStream * | , | |
double | ||||
) | [pure virtual] |
Implemented in fesa::RTAction< DeviceType >, and fesa::RTDiagnosticSetting.
void fesa::AbstractRTAction::sendManualNotification | ( | MultiplexingContext * | muxContext | ) | [protected] |
this method sends a manual notification message in order to notify the properties and devices specified in the message
Definition at line 188 of file AbstractRTAction.cpp.
References fesa::EquipmentData::getInstance(), manualNotificationMessage_, fesa::ManualNotificationMessage::muxContext_, fesa::NotificationProducer::sendManualNotification(), fesa::EquipmentData::serverUp_, and theNotificationProducer_.
fesa::AbstractRTAction::abortedActionCount_ [protected] |
number of real time actions aborted
Definition at line 176 of file AbstractRTAction.h.
Referenced by executeAction(), fesa::RTDiagnosticSetting::printState(), and fesa::RTAction< DeviceType >::printState().
fesa::AbstractRTAction::abstractDeviceCol_ [protected] |
set of devices to which the real time action has access
Definition at line 162 of file AbstractRTAction.h.
Referenced by AbstractRTAction().
list of properties that will be notified automatically, after the RT-action has finished
Definition at line 201 of file AbstractRTAction.h.
Referenced by AbstractRTAction(), executeAction(), and ~AbstractRTAction().
fesa::AbstractRTAction::completedActionCount_ [protected] |
number of completed actions
Definition at line 170 of file AbstractRTAction.h.
Referenced by fesa::RTDiagnosticSetting::execute(), executeAction(), fesa::RTDiagnosticSetting::printState(), fesa::RTAction< DeviceType >::printState(), and fesa::RTDiagnosticSetting::RTDiagnosticSetting().
bool fesa::AbstractRTAction::devicesShareTimingDomain_ [private] |
Definition at line 212 of file AbstractRTAction.h.
Referenced by AbstractRTAction(), and executeAction().
fesa::AbstractRTAction::eventName_ [protected] |
name of the event that fires the action
Definition at line 141 of file AbstractRTAction.h.
std::string fesa::AbstractRTAction::eventSourceName_ [protected] |
event source name (timing, timingSim, timer, user, <custom-name>)
Definition at line 156 of file AbstractRTAction.h.
GlobalDevice* fesa::AbstractRTAction::globalDevice_ [protected] |
Definition at line 164 of file AbstractRTAction.h.
Referenced by AbstractRTAction().
std::set<std::string> fesa::AbstractRTAction::manuallyNotifiedPropertiesCol_ [protected] |
Definition at line 153 of file AbstractRTAction.h.
Referenced by AbstractRTAction(), and ~AbstractRTAction().
internal message used
Definition at line 193 of file AbstractRTAction.h.
Referenced by AbstractRTAction(), executeAction(), and sendManualNotification().
fesa::AbstractRTAction::notificationID_ [protected] |
key to identify the notification that will be used in the real time action
Definition at line 182 of file AbstractRTAction.h.
Referenced by AbstractRTAction(), and executeAction().
fesa::AbstractRTAction::selectionCriterion_ [protected] |
selection criterion to select devices used for notification
Definition at line 147 of file AbstractRTAction.h.
Referenced by fesa::RTDiagnosticSetting::printConfig(), and fesa::RTAction< DeviceType >::printConfig().
the notification producer is used to send properties' notifications to the server side
Definition at line 206 of file AbstractRTAction.h.
Referenced by AbstractRTAction(), executeAction(), sendManualNotification(), and ~AbstractRTAction().
fesa::AbstractRTAction::timingDomain_ [private] |
Contain the timingDomain of the device collection + global device, if such timingDomain is shared by all the devices, otherwise contains "Undefined".
Definition at line 219 of file AbstractRTAction.h.
Referenced by AbstractRTAction(), and executeAction().