acsalarm::AlarmSourceImpl − |
#include <AlarmSourceImpl.h> Inherits acsalarm::AlarmSource. |
Public Member Functions |
AlarmSourceImpl (const AlarmSourceThread *updaterThread) |
AlarmSourceImpl () |
virtual ~AlarmSourceImpl () |
void raiseAlarm (std::string faultFamily, std::string faultMember, int faultCode) |
void raiseAlarm (std::string faultFamily, std::string faultMember, int faultCode, Properties properties) |
void clearAlarm (std::string faultFamily, std::string faultMember, int faultCode) |
void setAlarm (std::string faultFamily, std::string faultMember, int faultCode, Properties alarmProps, bool active) |
void setAlarm (std::string faultFamily, std::string faultMember, int faultCode, bool active) |
void terminateAllAlarms () |
void queueAlarms (ACS::TimeInterval time) |
void queueAlarms () |
void flushAlarms () |
void disableAlarms () |
void enableAlarms () |
virtual void update (ACS::Time now) |
void start () |
void tearDown () |
Private Member Functions |
std::string buildAlarmID (std::string faultFamily, std::string faultMember, int faultCode) |
void internalAlarmSender (std::string faultFamily, std::string faultMember, int faultCode, Properties alarmProps, bool active) |
Private Attributes |
bool m_disabled |
bool m_queuing |
ACE_Recursive_Thread_Mutex m_mutex |
std::map< std::string, AlarmToQueue * > m_queue |
std::set< std::string > m_activatedAlarms |
AlarmsMap m_alarms |
auto_ptr< acsalarm::AlarmSystemInterface > m_alarmSource_ap |
const AlarmSourceThread * m_updaterThread_p |
bool m_locallyInstantiatedThread |
ACS::Time m_nextMapUpdateTime |
ACS::Time m_nextFlushTime |
An implementation of AlarmSource. This class uses the ACSAlarmInterfaceFactory to publish alarms. It assumes that the ACSAlarmInterfaceFactory is already initialized before using this class. In the same way, it assumes that ACSAlarmInterfaceFactory is shutdown after terminated using objects from this class. At the present, this is usually done by ACS for example for the components and the clients. It is possible to send alarms with several overloaded methods like raise(...), clear(...) and set(...). All the overloaded methods delegate to set(...). internalAlarmSend(..) does the real sending of alarms to the alarm server. See also: |
AlarmSource |
Author: |
acaproni |
acsalarm::AlarmSourceImpl::AlarmSourceImpl (const AlarmSourceThread * updaterThread) Constructor |
Parameters: |
updaterThread The thread to update the state of the object |
acsalarm::AlarmSourceImpl::AlarmSourceImpl () Constructor |
The thread to update the state of the object is instantiated by AlarmSourceImpl and therefore will not be shared between different instances. |
virtual acsalarm::AlarmSourceImpl::~AlarmSourceImpl () [virtual] Destructor |
std::string acsalarm::AlarmSourceImpl::buildAlarmID (std::string faultFamily, std::string faultMember, int faultCode) [private] Build the ID of an alarm from the triplet |
Parameters: |
faultFamily The Fault Family |
void acsalarm::AlarmSourceImpl::clearAlarm (std::string faultFamily, std::string faultMember, int faultCode) [virtual] See also: |
AlarmSource |
Implements acsalarm::AlarmSource. |
void acsalarm::AlarmSourceImpl::disableAlarms () [virtual] See also: |
AlarmSource |
Implements acsalarm::AlarmSource. |
void acsalarm::AlarmSourceImpl::enableAlarms () [virtual] See also: |
AlarmSource |
Implements acsalarm::AlarmSource. |
void acsalarm::AlarmSourceImpl::flushAlarms () [virtual] See also: |
AlarmSource |
Implements acsalarm::AlarmSource. |
void acsalarm::AlarmSourceImpl::internalAlarmSender (std::string faultFamily, std::string faultMember, int faultCode, Properties alarmProps, bool active) [private] Send an alarm to the alarm server. |
Parameters: |
faultFamily The FaultFamily |
void acsalarm::AlarmSourceImpl::queueAlarms () [virtual] See also: |
AlarmSource |
Implements acsalarm::AlarmSource. |
void acsalarm::AlarmSourceImpl::queueAlarms (ACS::TimeInterval time) [virtual] See also: |
AlarmSource |
Implements acsalarm::AlarmSource. |
void acsalarm::AlarmSourceImpl::raiseAlarm (std::string faultFamily, std::string faultMember, int faultCode, Properties properties) [virtual] See also: |
AlarmSource |
Implements acsalarm::AlarmSource. |
void acsalarm::AlarmSourceImpl::raiseAlarm (std::string faultFamily, std::string faultMember, int faultCode) [virtual] See also: |
AlarmSource |
Implements acsalarm::AlarmSource. |
void acsalarm::AlarmSourceImpl::setAlarm (std::string faultFamily, std::string faultMember, int faultCode, Properties alarmProps, bool active) [virtual] See also: |
AlarmSource |
Implements acsalarm::AlarmSource. |
void acsalarm::AlarmSourceImpl::setAlarm (std::string faultFamily, std::string faultMember, int faultCode, bool active) [virtual] See also: |
AlarmSource |
Implements acsalarm::AlarmSource. |
void acsalarm::AlarmSourceImpl::start () [virtual] See also: |
AlarmSource |
Implements acsalarm::AlarmSource. |
void acsalarm::AlarmSourceImpl::tearDown () [virtual] See also: |
AlarmSource |
Implements acsalarm::AlarmSource. |
void acsalarm::AlarmSourceImpl::terminateAllAlarms () [virtual] See also: |
AlarmSource |
Implements acsalarm::AlarmSource. |
virtual void acsalarm::AlarmSourceImpl::update (ACS::Time now) [virtual] See also: |
AlarmSource |
Reimplemented from acsalarm::AlarmSource. |
std::set<std::string> acsalarm::AlarmSourceImpl::m_activatedAlarms [private] The alarms that have been activated and not yet terminated. |
This is used by the terminateAllAlarms() |
AlarmsMap acsalarm::AlarmSourceImpl::m_alarms [private] The map to avoid repeating alarms if their states did not change. |
The map requires to be updated from time to time ( See also: |
AlarmsMap documentation). The updating is explicitly requested by the thread loop. |
auto_ptr<acsalarm::AlarmSystemInterface> acsalarm::AlarmSourceImpl::m_alarmSource_ap [private] The source to send alarms to the AS |
bool acsalarm::AlarmSourceImpl::m_disabled [private] |
bool acsalarm::AlarmSourceImpl::m_locallyInstantiatedThread [private] true if the thread is instantiated locally (empty constructor) and false otherwise. |
ACE_Recursive_Thread_Mutex acsalarm::AlarmSourceImpl::m_mutex [private] |
ACS::Time acsalarm::AlarmSourceImpl::m_nextFlushTime [private] The time when the alarms must be flushed. |
See also: |
AlarmSource.queueaAlarms(...) |
ACS::Time acsalarm::AlarmSourceImpl::m_nextMapUpdateTime [private] The time when the map needs to be updated |
std::map<std::string, AlarmToQueue*> acsalarm::AlarmSourceImpl::m_queue [private] The map of queued alarms |
The key is the ID of the alarm |
bool acsalarm::AlarmSourceImpl::m_queuing [private] |
const AlarmSourceThread* acsalarm::AlarmSourceImpl::m_updaterThread_p [private] The thread to update |
Generated automatically by Doxygen for ACS-2015.2 C++ API from the source code. |