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

acsalarm::AlarmSystemInterface Class Reference

#include <AlarmSystemInterface.h>

Inheritance diagram for acsalarm::AlarmSystemInterface:
Inheritance graph
[legend]
Collaboration diagram for acsalarm::AlarmSystemInterface:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 AlarmSystemInterface ()
virtual ~AlarmSystemInterface ()
virtual void setSourceName (std::string newSourceName)
virtual std::string getSourceName ()
virtual void setHostName (std::string newHostName)
virtual std::string getHostName ()
virtual void push (FaultState &state)
virtual void push (std::vector< FaultState > &states)
virtual void pushActiveList (std::vector< FaultState > &activeFaults)
virtual void close ()=0

Protected Member Functions

virtual bool publishMessage (ASIMessage msg)=0

Protected Attributes

std::string sourceName
std::string hostName
acsalarm::ASIConfiguration configuration
ACE_Recursive_Thread_Mutex m_mutex

Private Member Functions

void commonPush (std::vector< FaultState > &states, bool backup)

Detailed Description

Alarm System interface for C++ alarm generators

Author:
sharring Based on cern's java implementation

Constructor & Destructor Documentation

acsalarm::AlarmSystemInterface::AlarmSystemInterface (  )  [inline]
virtual acsalarm::AlarmSystemInterface::~AlarmSystemInterface (  )  [inline, virtual]

Member Function Documentation

virtual void acsalarm::AlarmSystemInterface::close (  )  [pure virtual]

Cleanup. Must be implemented by concrete sub classes; may be called by destructor or explicitly by client; it's up to you how you wish the cleanup process to be initiated.

Implemented in ACSAlarmSystemInterfaceProxy, and laserSource::CERNAlarmSystemInterfaceProxy.

void acsalarm::AlarmSystemInterface::commonPush ( std::vector< FaultState > &  states,
bool  backup 
) [private]

Private method to push a collection of fault states, containing the logic which is common to both the push() and pushActiveList() methods.

Parameters:
states 
backup whether we are sending 'backup' alarms or not. backup alarms are alarms in the active list that are sent on startup, when the source starts and periodically according to the expected backup frequency.
Exceptions:
ASIException if the fault state collection can not be pushed.
virtual std::string acsalarm::AlarmSystemInterface::getHostName (  )  [inline, virtual]

Get the host name.

Returns:
the host name.

References hostName.

virtual std::string acsalarm::AlarmSystemInterface::getSourceName (  )  [inline, virtual]

Get the source name.

Returns:
the source name.

References sourceName.

virtual bool acsalarm::AlarmSystemInterface::publishMessage ( ASIMessage  msg  )  [protected, pure virtual]

Sends the message to the alarm server; concrete classes must override this and use the communication mechanism of their choice. For an example of a concrete class, see ACSLaser/laser-source-cpp/CERNAlarmSystemInterfaceProxy.

Implemented in ACSAlarmSystemInterfaceProxy, and laserSource::CERNAlarmSystemInterfaceProxy.

virtual void acsalarm::AlarmSystemInterface::push ( FaultState state  )  [virtual]

Push a fault state.

Parameters:
state the fault state change to push.
Exceptions:
ASIException if the fault state can not be pushed.

Reimplemented in ACSAlarmSystemInterfaceProxy.

virtual void acsalarm::AlarmSystemInterface::push ( std::vector< FaultState > &  states  )  [virtual]

Push a collection of fault states.

Parameters:
states 
Exceptions:
ASIException if the fault state collection can not be pushed.

Reimplemented in ACSAlarmSystemInterfaceProxy.

virtual void acsalarm::AlarmSystemInterface::pushActiveList ( std::vector< FaultState > &  activeFaults  )  [virtual]

Push the set of active fault states.

Parameters:
activeFaults the active fault states.
Exceptions:
ASIException if the fault state active list can not be pushed.

Reimplemented in ACSAlarmSystemInterfaceProxy.

virtual void acsalarm::AlarmSystemInterface::setHostName ( std::string  newHostName  )  [inline, virtual]

Set the host name.

Parameters:
newHostName the source name.

References hostName.

virtual void acsalarm::AlarmSystemInterface::setSourceName ( std::string  newSourceName  )  [inline, virtual]

Set the source name.

Parameters:
newSourceName the source name.

References sourceName.


Member Data Documentation

Referenced by getHostName(), and setHostName().

ACE_Recursive_Thread_Mutex acsalarm::AlarmSystemInterface::m_mutex [protected]

Referenced by getSourceName(), and setSourceName().


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