#include <AlarmSourceImpl.h>
List of all members.
Public Member Functions |
| 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 () |
void | runLoop () |
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 |
Detailed Description
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
Constructor & Destructor Documentation
acsalarm::AlarmSourceImpl::AlarmSourceImpl |
( |
|
) |
|
virtual acsalarm::AlarmSourceImpl::~AlarmSourceImpl |
( |
|
) |
[virtual] |
Member Function Documentation
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 |
| faultMember | The Fault Member |
| faultCode | The Fault Code |
void acsalarm::AlarmSourceImpl::clearAlarm |
( |
std::string |
faultFamily, |
|
|
std::string |
faultMember, |
|
|
int |
faultCode | |
|
) |
| | |
void acsalarm::AlarmSourceImpl::disableAlarms |
( |
|
) |
|
void acsalarm::AlarmSourceImpl::enableAlarms |
( |
|
) |
|
void acsalarm::AlarmSourceImpl::flushAlarms |
( |
|
) |
|
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 |
| faultMember | The FaultMember |
| faultCode | The FaultCode |
| alarmProps | The user properties. It can be null or empty. |
| active | if true the alarm is activated otherwise it is terminated. |
void acsalarm::AlarmSourceImpl::queueAlarms |
( |
|
) |
|
void acsalarm::AlarmSourceImpl::queueAlarms |
( |
ACS::TimeInterval |
time |
) |
|
void acsalarm::AlarmSourceImpl::raiseAlarm |
( |
std::string |
faultFamily, |
|
|
std::string |
faultMember, |
|
|
int |
faultCode, |
|
|
Properties |
properties | |
|
) |
| | |
void acsalarm::AlarmSourceImpl::raiseAlarm |
( |
std::string |
faultFamily, |
|
|
std::string |
faultMember, |
|
|
int |
faultCode | |
|
) |
| | |
void acsalarm::AlarmSourceImpl::runLoop |
( |
|
) |
[virtual] |
void acsalarm::AlarmSourceImpl::setAlarm |
( |
std::string |
faultFamily, |
|
|
std::string |
faultMember, |
|
|
int |
faultCode, |
|
|
Properties |
alarmProps, |
|
|
bool |
active | |
|
) |
| | |
void acsalarm::AlarmSourceImpl::setAlarm |
( |
std::string |
faultFamily, |
|
|
std::string |
faultMember, |
|
|
int |
faultCode, |
|
|
bool |
active | |
|
) |
| | |
void acsalarm::AlarmSourceImpl::start |
( |
|
) |
|
void acsalarm::AlarmSourceImpl::tearDown |
( |
|
) |
|
void acsalarm::AlarmSourceImpl::terminateAllAlarms |
( |
|
) |
|
Member Data Documentation
The alarms that have been activated and not yet terminated.
This is used by the terminateAllAlarms()
The map to avoid repeating alarms if their states did not change.
The source to send alarms to the AS
The map of queued alarms
The key is the ID of the alarm
The documentation for this class was generated from the following file: