Specialized field for alarm fields. This type of field is meant to indicate an alarm in the system. More...
#include <AlarmField.h>
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] |
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.
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] |
Constructor.
Definition at line 101 of file AlarmField.h.
References KEY_VALUE_MAXSIZE, fesaGSI::AlarmField< AlarmDataType, userKeyNb >::pUserKeyName_, fesaGSI::AlarmField< AlarmDataType, userKeyNb >::pUserKeyNameCol_, and fesaGSI::AlarmField< AlarmDataType, userKeyNb >::userKeyNameCol_.
fesaGSI::AlarmField< AlarmDataType, userKeyNb >::~AlarmField | ( | ) | [inline] |
Destructor.
Definition at line 116 of file AlarmField.h.
void fesaGSI::AlarmField< AlarmDataType, userKeyNb >::cleanAlarmMessages | ( | fesa::MultiplexingContext * | pCtx | ) | [inline, protected] |
Definition at line 206 of file AlarmField.h.
References fesaGSI::AlarmField_DataType< userKeyNb >::userKeyValueCol_.
Referenced by fesaGSI::AlarmField< AlarmDataType, userKeyNb >::lower().
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.
size | output parameter: number of user keys | |
pCtx | the multiplexing context |
Definition at line 122 of file AlarmField.h.
References fesaGSI::AlarmField< AlarmDataType, userKeyNb >::pUserKeyNameCol_.
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.
userKeyName | supplies the name of the userKey. | |
pCtx | the multiplexing context |
Definition at line 143 of file AlarmField.h.
References FesaGSIErrorAlarmFieldEmptyKeyValues, FesaGSIErrorAlarmFieldKeyNameNotFound, and fesaGSI::AlarmField< AlarmDataType, userKeyNb >::userKeyNameCol_.
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.
size | output parameter: number of user keys | |
pCtx | the multiplexing context |
Definition at line 130 of file AlarmField.h.
References FesaGSIErrorAlarmFieldEmptyKeyValues.
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
pCtx | multiplexing context. |
Definition at line 199 of file AlarmField.h.
References fesaGSI::AlarmField< AlarmDataType, userKeyNb >::cleanAlarmMessages(), and fesaGSI::AlarmField< AlarmDataType, userKeyNb >::lower().
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
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().
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.
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_.
char* fesaGSI::AlarmField< AlarmDataType, userKeyNb >::pUserKeyName_[userKeyNb] [protected] |
Definition at line 94 of file AlarmField.h.
Referenced by fesaGSI::AlarmField< AlarmDataType, userKeyNb >::AlarmField().
char** fesaGSI::AlarmField< AlarmDataType, userKeyNb >::pUserKeyNameCol_ [protected] |
Definition at line 93 of file AlarmField.h.
Referenced by fesaGSI::AlarmField< AlarmDataType, userKeyNb >::AlarmField(), and fesaGSI::AlarmField< AlarmDataType, userKeyNb >::getUserKeyNames().
char fesaGSI::AlarmField< AlarmDataType, userKeyNb >::userKeyNameCol_[userKeyNb][KEY_VALUE_MAXSIZE] [protected] |
Definition at line 92 of file AlarmField.h.
Referenced by fesaGSI::AlarmField< AlarmDataType, userKeyNb >::AlarmField(), fesaGSI::AlarmField< AlarmDataType, userKeyNb >::getUserKeyValue(), and fesaGSI::AlarmField< AlarmDataType, userKeyNb >::setUserKeyValue().