Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions

baci::AlarmSystemMonitorBase Class Reference

#include <baciAlarmSystemMonitorBase.h>

Inheritance diagram for baci::AlarmSystemMonitorBase:
Inheritance graph
[legend]
Collaboration diagram for baci::AlarmSystemMonitorBase:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 AlarmSystemMonitorBase (EventDispatcher *eventDispatcher)
virtual ~AlarmSystemMonitorBase ()
bool failed ()
void succeeded ()
virtual bool isSuspended ()
virtual int getId (void)
virtual const char * getName (void)
virtual const char * getObjectState (void)
virtual void setObjectState (const char *state)
virtual void suspend ()
virtual void resume ()
virtual void destroy ()
void setLevel (int level)
void setFaultFamily (const char *ff)
void setFaultMember (const char *fm)

Protected Member Functions

virtual void check (BACIValue &val, const ACSErr::Completion &c, const ACS::CBDescOut &desc)=0
void sendAlarm (int code, bool active)
virtual void clearAlarm ()
virtual void recheckAlarm ()
void setProperty (const char *name, const char *prop)
template<class VT >
void setProperty (const char *name, VT value)

Protected Attributes

ACE_CString name_m
bool suspended_m
int failureCount_m
CBDescIn desc_mIn
ACS::TimeInterval interval_m
EventDispatchereventDispatcher_mp
acsalarm::AlarmSystemInterfacealarmSource_map
int alarmRaised_m
std::string faultMember_m
std::string faultFamily_m
 alarm fault member that is used to send alarm
int alarmLevel_m
 alarm fault family that is used to send alarm
int lastAlarmFaultCode_m
 alarm's level (priorty)
BACIValue lastAlarmValue_m
 fault code of sent alarm
std::map< std::string,
std::string > 
alarmProperties_m
ACE_Recursive_Thread_Mutex faultStructMutex_m

Private Member Functions

void operator= (const AlarmSystemMonitorBase &)
 AlarmSystemMonitorBase (const AlarmSystemMonitorBase &)

Detailed Description

Base class for the Alarm System Monitor that is not template class. The purpose of this class to have a not template base class for all Alarm System monitors.


Constructor & Destructor Documentation

baci::AlarmSystemMonitorBase::AlarmSystemMonitorBase ( EventDispatcher eventDispatcher  ) 
virtual baci::AlarmSystemMonitorBase::~AlarmSystemMonitorBase (  )  [virtual]
baci::AlarmSystemMonitorBase::AlarmSystemMonitorBase ( const AlarmSystemMonitorBase  )  [private]

ALMA C++ coding standards state copy constructors should be disabled.


Member Function Documentation

virtual void baci::AlarmSystemMonitorBase::check ( BACIValue value,
const ACSErr::Completion c,
const ACS::CBDescOut desc 
) [protected, pure virtual]
virtual void baci::AlarmSystemMonitorBase::clearAlarm (  )  [protected, virtual]

Clear the alarm that was previously set/raised. For the alarm code it is used alarm code used for sending/raising the alarm. Main goal of the method is to be called when fault family or fault member is changed to clear the alarm.

Reimplemented in baci::AlarmSystemMonitorPattern.

virtual void baci::AlarmSystemMonitorBase::destroy (  )  [inline, virtual]

Destroy event subscription

Implements baci::EventStrategy.

bool baci::AlarmSystemMonitorBase::failed (  ) 
virtual int baci::AlarmSystemMonitorBase::getId ( void   )  [inline, virtual]

Get object's "recovery" id; each object type sould have unique id

Returns:
object's id

Implements baci::EventStrategy.

virtual const char* baci::AlarmSystemMonitorBase::getName ( void   )  [inline, virtual]

Returns objects name; each instance should have unique name

Returns:
object's name

Implements baci::EventStrategy.

virtual const char* baci::AlarmSystemMonitorBase::getObjectState ( void   )  [inline, virtual]

Get object's state represented as string

Returns:
pointer to stringified object's state

Implements baci::EventStrategy.

virtual bool baci::AlarmSystemMonitorBase::isSuspended (  )  [inline, virtual]

Is suspended

Implements baci::EventStrategy.

void baci::AlarmSystemMonitorBase::operator= ( const AlarmSystemMonitorBase  )  [private]

ALMA C++ coding standards state assignment operators should be disabled.

virtual void baci::AlarmSystemMonitorBase::recheckAlarm (  )  [protected, virtual]

Check last value that caused an alarm for the alarm. The purpose of the method is to be used afer fault family or fault member is changed.

virtual void baci::AlarmSystemMonitorBase::resume (  )  [inline, virtual]

Resume suspended event subscription

Implements baci::EventStrategy.

void baci::AlarmSystemMonitorBase::sendAlarm ( int  code,
bool  active 
) [protected]

Send an alarm with a certain alarm code to the AlarmSystem code alarm code active true-raise an alarm, false-clear an alarm

void baci::AlarmSystemMonitorBase::setFaultFamily ( const char *  ff  ) 

(re)set Alarm's fault family

Parameters:
fault family
void baci::AlarmSystemMonitorBase::setFaultMember ( const char *  fm  ) 

(re)set Alarm's fault member

Parameters:
fault member
void baci::AlarmSystemMonitorBase::setLevel ( int  level  )  [inline]

set level of the alarm alarm level

virtual void baci::AlarmSystemMonitorBase::setObjectState ( const char *  state  )  [inline, virtual]

Set object's state stored in given string

Parameters:
stringified object's state

Implements baci::EventStrategy.

void baci::AlarmSystemMonitorBase::setProperty ( const char *  name,
const char *  prop 
) [protected]

sets property of the alarm. If the property was already set it will be set to a new value. name - property name prop value of the property

template<class VT >
void baci::AlarmSystemMonitorBase::setProperty ( const char *  name,
VT  value 
) [inline, protected]
void baci::AlarmSystemMonitorBase::succeeded (  ) 
virtual void baci::AlarmSystemMonitorBase::suspend (  )  [inline, virtual]

Suspend event subscription

Implements baci::EventStrategy.


Member Data Documentation

alarm fault family that is used to send alarm

std::map<std::string, std::string> baci::AlarmSystemMonitorBase::alarmProperties_m [protected]

indicator (flag) if an alarm was raised. in case of pattern how many alarms were raised in case of continues types like long/dobule etc. -1 low alarm, 1 high alarm

alarm fault member that is used to send alarm

ACE_Recursive_Thread_Mutex baci::AlarmSystemMonitorBase::faultStructMutex_m [protected]
ACS::TimeInterval baci::AlarmSystemMonitorBase::interval_m [protected]

alarm's level (priorty)

fault code of sent alarm

ACE_CString baci::AlarmSystemMonitorBase::name_m [protected]

The documentation for this class was generated from the following file: