Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

ACSAlarmSystemInterfaceFactory Class Reference

#include <ACSAlarmSystemInterfaceFactory.h>

Collaboration diagram for ACSAlarmSystemInterfaceFactory:

Collaboration graph
[legend]
List of all members.

Static Public Member Functions

maci::Manager_ptr getManager ()
bool init (maci::Manager_ptr manager) throw (acsErrTypeAlarmSourceFactory::ErrorLoadingCERNDLLExImpl)
bool usingACSAlarmSystem () throw (acsErrTypeAlarmSourceFactory::ACSASFactoryNotInitedExImpl)
void done ()
std::auto_ptr< acsalarm::AlarmSystemInterfacecreateSource (std::string sourceName) throw (acsErrTypeAlarmSourceFactory::ACSASFactoryNotInitedExImpl)
std::auto_ptr< acsalarm::AlarmSystemInterfacecreateSource () throw (acsErrTypeAlarmSourceFactory::ACSASFactoryNotInitedExImpl)
std::auto_ptr< acsalarm::FaultStatecreateFaultState (std::string family, std::string member, int code) throw (acsErrTypeAlarmSourceFactory::ACSASFactoryNotInitedExImpl)
std::auto_ptr< acsalarm::FaultStatecreateFaultState () throw (acsErrTypeAlarmSourceFactory::ACSASFactoryNotInitedExImpl)
void createAndSendAlarm (std::string &faultFamily, std::string &faultMember, int faultCode, bool active, std::string sourceName=asiConfigurationConstants::ALARM_SOURCE_NAME) throw (acsErrTypeAlarmSourceFactory::ACSASFactoryNotInitedExImpl)
void createAndSendAlarm (std::string &faultFamily, std::string &faultMember, int faultCode, bool active, acsalarm::Properties &faultProperties, std::string sourceName=asiConfigurationConstants::ALARM_SOURCE_NAME) throw (acsErrTypeAlarmSourceFactory::ACSASFactoryNotInitedExImpl)

Private Member Functions

 ACSAlarmSystemInterfaceFactory ()
 ACSAlarmSystemInterfaceFactory (const ACSAlarmSystemInterfaceFactory &)
ACSAlarmSystemInterfaceFactory operator= (const ACSAlarmSystemInterfaceFactory &)
 ~ACSAlarmSystemInterfaceFactory ()

Static Private Member Functions

void cleanUpAlarmSystemInterfacePtr ()
void cleanUpSharedSource ()
void cleanUpDLL ()
void cleanUpBooleanPtr ()
void cleanUpManagerReference ()
void initImplementationType (maci::Manager_ptr manager)
bool initDLL ()

Static Private Attributes

void * dllHandle
std::auto_ptr< acsalarm::AlarmSystemInterfacesharedSource
bool * m_useACSAlarmSystem
maci::Manager_ptr m_manager
AlarmSystemInterfaceFactorym_AlarmSystemInterfaceFactory_p
ACE_Recursive_Thread_Mutex main_mutex

Detailed Description

The class to create sources and fault states. It extends the laser source but it returns different implementations of the sources depending of a value of a property of the CDB

The ACS implementation of the source logs a message for each alarm

Before using the static methods of this class, the init method must be called otherwise an exception is thrown.


Constructor & Destructor Documentation

ACSAlarmSystemInterfaceFactory::ACSAlarmSystemInterfaceFactory  )  [private]
 

Default constructor.

ACSAlarmSystemInterfaceFactory::ACSAlarmSystemInterfaceFactory const ACSAlarmSystemInterfaceFactory  )  [private]
 

ACSAlarmSystemInterfaceFactory::~ACSAlarmSystemInterfaceFactory  )  [private]
 


Member Function Documentation

void ACSAlarmSystemInterfaceFactory::cleanUpAlarmSystemInterfacePtr  )  [static, private]
 

void ACSAlarmSystemInterfaceFactory::cleanUpBooleanPtr  )  [static, private]
 

void ACSAlarmSystemInterfaceFactory::cleanUpDLL  )  [static, private]
 

void ACSAlarmSystemInterfaceFactory::cleanUpManagerReference  )  [static, private]
 

void ACSAlarmSystemInterfaceFactory::cleanUpSharedSource  )  [static, private]
 

void ACSAlarmSystemInterfaceFactory::createAndSendAlarm std::string &  faultFamily,
std::string &  faultMember,
int  faultCode,
bool  active,
acsalarm::Properties faultProperties,
std::string  sourceName = asiConfigurationConstants::ALARM_SOURCE_NAME
throw (acsErrTypeAlarmSourceFactory::ACSASFactoryNotInitedExImpl) [static]
 

Convenience API for creating/sending an alarm in a single step, with user-defined properties.

Parameters:
family a string indicating the 'family' of the alarm (see alarm system documentation for explanation).
member a string indicating the 'member' of the alarm (see alarm system documentation for explanation).
code an int indicating the 'code' of the alarm (see alarm system documentation for explanation).
active a boolean indicating if the alarm is active (true) or not (false)
faultProperties user-defined properties associated with the alarm.
sourceName the source name, defaults to ALARM_SOURCE_NAME constant defined in "asiConfigurationConstants.h"
Exceptions:
ACSASFactoryNotInitedExImpl if the alarm system has not been previously initialized.

void ACSAlarmSystemInterfaceFactory::createAndSendAlarm std::string &  faultFamily,
std::string &  faultMember,
int  faultCode,
bool  active,
std::string  sourceName = asiConfigurationConstants::ALARM_SOURCE_NAME
throw (acsErrTypeAlarmSourceFactory::ACSASFactoryNotInitedExImpl) [static]
 

Convenience API for creating/sending an alarm in a single step, without user defined properties.

Parameters:
family a string indicating the 'family' of the alarm (see alarm system documentation for explanation).
member a string indicating the 'member' of the alarm (see alarm system documentation for explanation).
code an int indicating the 'code' of the alarm (see alarm system documentation for explanation).
active a boolean indicating if the alarm is active (true) or not (false)
sourceName the source name, defaults to ALARM_SOURCE_NAME constant defined in "asiConfigurationConstants.h"
Exceptions:
ACSASFactoryNotInitedExImpl if the alarm system has not been previously initialized.

std::auto_ptr<acsalarm::FaultState> ACSAlarmSystemInterfaceFactory::createFaultState  )  throw (acsErrTypeAlarmSourceFactory::ACSASFactoryNotInitedExImpl) [static]
 

Create a fault state

Exceptions:
ACSASFactoryNotInitedExImpl if the alarm system has not been previously initialized.

std::auto_ptr<acsalarm::FaultState> ACSAlarmSystemInterfaceFactory::createFaultState std::string  family,
std::string  member,
int  code
throw (acsErrTypeAlarmSourceFactory::ACSASFactoryNotInitedExImpl) [static]
 

Create a fault state with the given family, member and code

Parameters:
family a string indicating the 'family' of the alarm (see alarm system documentation for explanation).
member a string indicating the 'member' of the alarm (see alarm system documentation for explanation).
code an int indicating the 'code' of the alarm (see alarm system documentation for explanation).
Exceptions:
ACSASFactoryNotInitedExImpl if the alarm system has not been previously initialized.

std::auto_ptr<acsalarm::AlarmSystemInterface> ACSAlarmSystemInterfaceFactory::createSource  )  throw (acsErrTypeAlarmSourceFactory::ACSASFactoryNotInitedExImpl) [static]
 

Create a new instance of an alarm system interface without binding it to any source.

Exceptions:
ACSASFactoryNotInitedExImpl if the alarm system has not been previously initialized.
Returns:
the interface instance.

std::auto_ptr<acsalarm::AlarmSystemInterface> ACSAlarmSystemInterfaceFactory::createSource std::string  sourceName  )  throw (acsErrTypeAlarmSourceFactory::ACSASFactoryNotInitedExImpl) [static]
 

Create a new instance of an alarm system interface.

Parameters:
sourceName the source name.
Exceptions:
ACSASFactoryNotInitedExImpl if the alarm system has not been previously initialized.
Returns:
the interface instance.

void ACSAlarmSystemInterfaceFactory::done  )  [static]
 

Release the resources: must be called when finished using the methods of this class

maci::Manager_ptr ACSAlarmSystemInterfaceFactory::getManager  )  [static]
 

bool ACSAlarmSystemInterfaceFactory::init maci::Manager_ptr  manager  )  throw (acsErrTypeAlarmSourceFactory::ErrorLoadingCERNDLLExImpl) [static]
 

Init the object of the class: must be called before using the other methods of this class otherwise an exception will be thrown.

Parameters:
manager ptr to the acs manager.
Exceptions:
acsErrTypeAlarmSourceFactory::ErrorLoadingCERNDLLExImpl if there was a problem loading the DLL
Returns:
true if the initialization went ok

bool ACSAlarmSystemInterfaceFactory::initDLL  )  [static, private]
 

void ACSAlarmSystemInterfaceFactory::initImplementationType maci::Manager_ptr  manager  )  [static, private]
 

ACSAlarmSystemInterfaceFactory ACSAlarmSystemInterfaceFactory::operator= const ACSAlarmSystemInterfaceFactory  )  [private]
 

bool ACSAlarmSystemInterfaceFactory::usingACSAlarmSystem  )  throw (acsErrTypeAlarmSourceFactory::ACSASFactoryNotInitedExImpl) [static]
 

Getter for whether we're using the ACS Alarm system (true) or not (false).

Exceptions:
ACSASFactoryNotInitedExImpl if the alarm system has not been previously initialized.
Returns:
boolean indicating whether the ACS alarm system is in use (true) or not (false), where ACS alarm system means alarms are sent to the logs, otherwise they are sent to the alarm channel.


Member Data Documentation

void* ACSAlarmSystemInterfaceFactory::dllHandle [static, private]
 

AlarmSystemInterfaceFactory* ACSAlarmSystemInterfaceFactory::m_AlarmSystemInterfaceFactory_p [static, private]
 

maci::Manager_ptr ACSAlarmSystemInterfaceFactory::m_manager [static, private]
 

bool* ACSAlarmSystemInterfaceFactory::m_useACSAlarmSystem [static, private]
 

ACE_Recursive_Thread_Mutex ACSAlarmSystemInterfaceFactory::main_mutex [static, private]
 

std::auto_ptr<acsalarm::AlarmSystemInterface> ACSAlarmSystemInterfaceFactory::sharedSource [static, private]
 


The documentation for this class was generated from the following file:
Generated on Thu Apr 30 02:35:46 2009 for ACS C++ API by doxygen 1.3.8