fesaGSI::AlarmField< AlarmDataType, userKeyNb > Class Template Reference

Specialized field for alarm fields. This type of field is meant to indicate an alarm in the system. More...

#include <AlarmField.h>

List of all members.

Public Member Functions

 AlarmField (const std::string &name, bool multiplexed, fesa::DataStore *pDataStore, const std::string &description, fesa::FaultSeverity severity, const char **userKeyNames=0)
 Constructor.
 ~AlarmField ()
 Destructor.
const char ** getUserKeyNames (unsigned int &size, fesa::MultiplexingContext *pCtx)
 Method to retrieve the array of userKey names. Using userKeys lets clients to define the extra information they need to pass, each time the alarm is raised.
const char ** getUserKeyValues (unsigned int &size, fesa::MultiplexingContext *pCtx)
 Method to retrieve the array of user key values. Using userKeys lets clients to define the extra information they need to pass each time the alarm is raised.
const char * getUserKeyValue (const char *userKeyName, fesa::MultiplexingContext *pCtx)
 Method to retrieve the userKey value linked to an userKey name.
void setUserKeyValue (const char *userKeyName, const char *userKeyValue, fesa::MultiplexingContext *pCtx)
 Method to link an userKey value to an userKey name. Be aware that when a faultField is lower all the userKeyValues will be cleaned.
void lower (long long time, fesa::MultiplexingContext *pCtx)
 method to lower a fault, The time of occurrence is passed as argument
void lower (fesa::MultiplexingContext *pCtx)
 method to lower a fault. The registered time of occurrence will be taken at the time of invocation

Protected Member Functions

void cleanAlarmMessages (fesa::MultiplexingContext *pCtx)

Protected Attributes

char userKeyNameCol_ [userKeyNb][KEY_VALUE_MAXSIZE]
char ** pUserKeyNameCol_
char * pUserKeyName_ [userKeyNb]

Detailed Description

template<typename AlarmDataType, unsigned int userKeyNb>
class fesaGSI::AlarmField< AlarmDataType, userKeyNb >

Specialized field for alarm fields. This type of field is meant to indicate an alarm in the system.

Definition at line 20 of file AlarmField.h.


Constructor & Destructor Documentation

template<typename AlarmDataType , unsigned int userKeyNb>
fesaGSI::AlarmField< AlarmDataType, userKeyNb >::AlarmField ( const std::string &  name,
bool  multiplexed,
fesa::DataStore *  pDataStore,
const std::string &  description,
fesa::FaultSeverity  severity,
const char **  userKeyNames = 0 
) [inline]
template<typename AlarmDataType , unsigned int userKeyNb>
fesaGSI::AlarmField< AlarmDataType, userKeyNb >::~AlarmField (  )  [inline]

Destructor.

Definition at line 116 of file AlarmField.h.


Member Function Documentation

template<typename AlarmDataType , unsigned int userKeyNb>
void fesaGSI::AlarmField< AlarmDataType, userKeyNb >::cleanAlarmMessages ( fesa::MultiplexingContext *  pCtx  )  [inline, protected]
template<typename AlarmDataType , unsigned int userKeyNb>
const char ** fesaGSI::AlarmField< AlarmDataType, userKeyNb >::getUserKeyNames ( unsigned int &  size,
fesa::MultiplexingContext *  pCtx 
) [inline]

Method to retrieve the array of userKey names. Using userKeys lets clients to define the extra information they need to pass, each time the alarm is raised.

Parameters:
size output parameter: number of user keys
pCtx the multiplexing context
Returns:
vector of string with all the user key names already defined. If there is not user keys defined an exception will be thrown.

Definition at line 122 of file AlarmField.h.

References fesaGSI::AlarmField< AlarmDataType, userKeyNb >::pUserKeyNameCol_.

template<typename AlarmDataType , unsigned int userKeyNb>
const char * fesaGSI::AlarmField< AlarmDataType, userKeyNb >::getUserKeyValue ( const char *  userKeyName,
fesa::MultiplexingContext *  pCtx 
) [inline]

Method to retrieve the userKey value linked to an userKey name.

Parameters:
userKeyName supplies the name of the userKey.
pCtx the multiplexing context
Returns:
the keyUser value. If the userKeyName is not registered an exception is thrown. If a faultField was lower all the userKeyValues were cleaned

Definition at line 143 of file AlarmField.h.

References FesaGSIErrorAlarmFieldEmptyKeyValues, FesaGSIErrorAlarmFieldKeyNameNotFound, and fesaGSI::AlarmField< AlarmDataType, userKeyNb >::userKeyNameCol_.

template<typename AlarmDataType , unsigned int userKeyNb>
const char ** fesaGSI::AlarmField< AlarmDataType, userKeyNb >::getUserKeyValues ( unsigned int &  size,
fesa::MultiplexingContext *  pCtx 
) [inline]

Method to retrieve the array of user key values. Using userKeys lets clients to define the extra information they need to pass each time the alarm is raised.

Parameters:
size output parameter: number of user keys
pCtx the multiplexing context
Returns:
array with all the user key values. If there are not User Key registered for the alarm an exception is trown, as there would not be any UserKeyValue. If a faultField was lower all the userKeyValues were cleaned

Definition at line 130 of file AlarmField.h.

References FesaGSIErrorAlarmFieldEmptyKeyValues.

template<typename AlarmDataType , unsigned int userKeyNb>
void fesaGSI::AlarmField< AlarmDataType, userKeyNb >::lower ( fesa::MultiplexingContext *  pCtx  )  [inline]

method to lower a fault. The registered time of occurrence will be taken at the time of invocation

Parameters:
pCtx multiplexing context.

Definition at line 199 of file AlarmField.h.

References fesaGSI::AlarmField< AlarmDataType, userKeyNb >::cleanAlarmMessages(), and fesaGSI::AlarmField< AlarmDataType, userKeyNb >::lower().

template<typename AlarmDataType , unsigned int userKeyNb>
void fesaGSI::AlarmField< AlarmDataType, userKeyNb >::lower ( long long  time,
fesa::MultiplexingContext *  pCtx 
) [inline]

method to lower a fault, The time of occurrence is passed as argument

Parameters:
time time of occurrence in nanoseconds.
pCtx multiplexing context.

Definition at line 192 of file AlarmField.h.

References fesaGSI::AlarmField< AlarmDataType, userKeyNb >::cleanAlarmMessages().

Referenced by fesaGSI::AlarmField< AlarmDataType, userKeyNb >::lower().

template<typename AlarmDataType , unsigned int userKeyNb>
void fesaGSI::AlarmField< AlarmDataType, userKeyNb >::setUserKeyValue ( const char *  userKeyName,
const char *  userKeyValue,
fesa::MultiplexingContext *  pCtx 
) [inline]

Method to link an userKey value to an userKey name. Be aware that when a faultField is lower all the userKeyValues will be cleaned.

Parameters:
userKeyName supplies the name of the userKey. If the userKeyName is not registered an exception is thrown
userKeyValue supplies the userKey value. The value should be a string with a max length of 16 char (including the terminating character)

Definition at line 167 of file AlarmField.h.

References FesaGSIErrorAlarmFieldKeyNameExceedsMaxSize, FesaGSIErrorAlarmFieldKeyNameNotFound, KEY_VALUE_MAXSIZE, fesaGSI::AlarmField< AlarmDataType, userKeyNb >::userKeyNameCol_, and fesaGSI::AlarmField_DataType< userKeyNb >::userKeyValueCol_.


Member Data Documentation

template<typename AlarmDataType , unsigned int userKeyNb>
char* fesaGSI::AlarmField< AlarmDataType, userKeyNb >::pUserKeyName_[userKeyNb] [protected]
template<typename AlarmDataType , unsigned int userKeyNb>
char** fesaGSI::AlarmField< AlarmDataType, userKeyNb >::pUserKeyNameCol_ [protected]
template<typename AlarmDataType , unsigned int userKeyNb>
char fesaGSI::AlarmField< AlarmDataType, userKeyNb >::userKeyNameCol_[userKeyNb][KEY_VALUE_MAXSIZE] [protected]

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

Generated on 25 Jan 2013 for fesa-core-gsi by  doxygen 1.6.1