fwConfigs
fwAlertConfig.ctl File Reference

Functions

 _fwAlertConfig_activateOrDeactivate (dyn_string dpes, bool activate, dyn_string &exceptionInfo, bool acknowledgeOnDeactivate=TRUE, bool checkIfExists=TRUE, bool storeInParamHistory=FALSE)
 _fwAlertConfig_checkAlertClasses (dyn_dyn_string &alertClasses, dyn_string &exceptionInfo)
 _fwAlertConfig_checkClassPriorities (dyn_string systemsToCheck, dyn_string &alertClasses, bool &classesOk, dyn_string &exceptionInfo, bool useAlternativeClassPriorities=FALSE)
 _fwAlertConfig_checkLimits (dyn_float limitValues, bool &limitsOk, dyn_string &exceptionInfo)
 _fwAlertConfig_createDpeAlertConfigObject (dyn_dyn_anytype &dpeAlertConfigObject, string dpe, int type, bool active, dyn_float limits, dyn_string classes, dyn_string texts, string panel, dyn_string panelParameters, string help, dyn_string &exceptionInfo, int dpeType=-1)
 _fwAlertConfig_generateExtraAnalogConfig (int ranges, dyn_float limits, dyn_int &alertHandlingTypes, dyn_float &hysteresisLimits, dyn_bool &hysteresisType, dyn_bool &includeLimits, dyn_string &exceptionInfo)
 _fwAlertConfig_get (string dpe, int &alertType, dyn_string &alertTexts, dyn_float &alertLimits, dyn_string &alertClass, dyn_string &summaryDpeList, string &alertPanel, dyn_string &alertPanelParameters, string &alertHelp, bool &alertActive, dyn_string &exceptionInfo)
 _fwAlertConfig_getDiscrete (string dpe, int &alertType, dyn_string &alertTexts, dyn_float &alertLimits, dyn_string &alertClass, string &alertPanel, dyn_string &alertPanelParameters, string &alertHelp, bool &alertActive, bool &discrete, bool &impulse, dyn_bool &discreteNegation, string &stateBits, dyn_string &stateMatch, dyn_string &exceptionInfo)
 _fwAlertConfig_prepareAnalog (string dpe, int currentConfigType, int currentNumberOfRanges, dyn_int alertHandlingType, dyn_float limits, dyn_string alertTexts, dyn_string alertClasses, dyn_bool includeLimits, int minimumPriority, string alertPanel, dyn_string alertPanelParameters, string alertHelp, dyn_int hysteresisType, dyn_float hysteresisLimits, dyn_string &attributes, dyn_mixed &values, dyn_string &exceptionInfo, bool modifyOnly=FALSE, bool fallBackToSet=FALSE, dyn_string alertWentTexts=makeDynString())
 _fwAlertConfig_prepareAnalogDiscrete (string dpe, int currentConfigType, int currentNumberOfRanges, dyn_int alertHandlingType, dyn_string limitsMatch, dyn_string alertTexts, dyn_string alertClasses, int minimumPriority, string alertPanel, dyn_string alertPanelParameters, string alertHelp, bool impulse, dyn_bool discreteNegation, dyn_string stateBits, dyn_string stateMatch, dyn_string &attributes, dyn_mixed &values, dyn_string &exceptionInfo, bool modifyOnly=FALSE, bool fallBackToSet=FALSE, dyn_string alertWentTexts=makeDynString())
 _fwAlertConfig_prepareDigital (string dpe, int currentConfigType, dyn_string alertTexts, dyn_string alertClasses, int minimumPriority, string alertPanel, dyn_string alertPanelParameters, string alertHelp, dyn_string &attributes, dyn_mixed &values, dyn_string &exceptionInfo, bool modifyOnly=FALSE, bool fallBackToSet=FALSE)
 _fwAlertConfig_prepareDigitalDiscrete (string dpe, int currentConfigType, dyn_string alertTexts, dyn_string alertClasses, int minimumPriority, string alertPanel, dyn_string alertPanelParameters, string alertHelp, bool impulse, dyn_string stateBits, dyn_string &attributes, dyn_mixed &values, dyn_string &exceptionInfo, bool modifyOnly=FALSE, bool fallBackToSet=FALSE)
 _fwAlertConfig_prepareSummary (string dpe, int currentConfigType, float threshold, dyn_string alertTexts, dyn_string dpElementList, int minimumPriority, string alertPanel, dyn_string alertPanelParameters, string alertHelp, dyn_string &attributes, dyn_mixed &values, dyn_string &exceptionInfo, bool modifyOnly=FALSE, bool fallBackToSet=FALSE)
 _fwAlertConfig_readDpeAlertConfigObject (dyn_dyn_anytype dpeAlertConfigObject, string &dpe, int &type, bool &active, dyn_float &limits, dyn_string &classes, dyn_string &texts, string &panel, dyn_string &panelParameters, string &help, dyn_string &exceptionInfo, int &dpeType)
 fwAlertConfig_addDpInAlertSummary (string dpe, string dpeToAdd, dyn_string &exceptionInfo, bool errorIfPresent=TRUE, bool storeInParamHistory=TRUE)
 fwAlertConfig_checkIsDpInAlertSummary (string dpe, string dpeToLookFor, bool &dpeFound, dyn_string &exceptionInfo)
 fwAlertConfig_deleteDpFromAlertSummary (string dpe, string dpeToDelete, dyn_string &exceptionInfo, bool errorIfNotPresent=TRUE, bool storeInParamHistory=TRUE)
 fwAlertConfig_generateAbsoluteLimitsMany (dyn_string dpes, int limitsType, dyn_dyn_mixed relativeLimits, dyn_dyn_mixed &absoluteLimits, dyn_string &exceptionInfo)
 fwAlertConfig_generateAbsoluteLimitsMultiple (dyn_string dpes, int limitsType, dyn_mixed relativeLimits, dyn_dyn_mixed &absoluteLimits, dyn_string &exceptionInfo)
 fwAlertConfig_getAlertClasses (dyn_string searchSystems, dyn_string &alertClassDps, dyn_int &acknowledgeTypes, dyn_int &priorities, dyn_string &exceptionInfo)
 fwAlertConfig_getLimits (string dpe, dyn_int &limitNumbers, dyn_float &limitValues, dyn_string &exceptionInfo)
 fwAlertConfig_queryAlertsOnSystem (string systemName, dyn_dyn_string &alertData, dyn_string &exceptionInfo)
 fwAlertConfig_setLimits (string dpe, dyn_int limitNumbers, dyn_float limitValues, dyn_string &exceptionInfo, bool checkBeforeSetting=FALSE, bool storeInParamHistory=TRUE)
 _fwAlertConfig_objectCreateParams (dyn_dyn_anytype &alarmParams, dyn_dyn_anytype &alarmLimits, int totalRanges)
Utility functions

Used to access the configuration object attributes (object of type dyn_mixed).

 fwAlertConfig_objectInitialize (dyn_mixed &paramsObject, int totalRanges)
bool fwAlertConfig_objectConfigExists (dyn_mixed alertConfigObject, int &configType, dyn_string &exceptionInfo)
 fwAlertConfig_objectCreateAnalog (dyn_mixed &alertConfigObject, dyn_string alertTexts, dyn_float alertLimits, dyn_string alertClasses, string alertPanel, dyn_string alertPanelParameters, string alertHelp, dyn_bool limitsIncluded, dyn_string &exceptionInfo, bool modifyOnly=FALSE, bool fallBackToSet=FALSE, string addDpeInSummary="", bool storeInParamHistory=TRUE)
 fwAlertConfig_objectCreateDigital (dyn_mixed &alertConfigObject, dyn_string alertTexts, dyn_string alertClasses, string alertPanel, dyn_string alertPanelParameters, string alertHelp, dyn_string &exceptionInfo, bool modifyOnly=FALSE, bool fallBackToSet=FALSE, string addDpeInSummary="", bool storeInParamHistory=TRUE)
 fwAlertConfig_objectCreateDiscrete (dyn_mixed &alertConfigObject, dyn_string alertTexts, dyn_string alertMatch, dyn_string alertClasses, string alertPanel, dyn_string alertPanelParameters, string alertHelp, bool impulse, dyn_bool discreteNegation, string stateBits, dyn_string stateMatch, dyn_string &exceptionInfo, bool modifyOnly=FALSE, bool fallBackToSet=FALSE, string addDpeInSummary="", bool storeInParamHistory=TRUE)
 fwAlertConfig_objectCreateSummary (dyn_mixed &alertConfigObject, dyn_string alertTexts, int threshold, dyn_string alertClasses, dyn_string summaryDpeList, string alertPanel, dyn_string alertPanelParameters, string alertHelp, dyn_string &exceptionInfo, bool modifyOnly=FALSE, bool fallBackToSet=FALSE, string addDpeInSummary="", bool storeInParamHistory=TRUE)
 fwAlertConfig_objectExtractAnalog (dyn_mixed alertConfigObject, int &alertType, dyn_string &alertTexts, dyn_float &alertLimits, dyn_string &alertClasses, string &alertPanel, dyn_string &alertPanelParameters, string &alertHelp, dyn_bool &limitsIncluded, bool &isActive, dyn_string &exceptionInfo)
 fwAlertConfig_objectExtractType (dyn_mixed alertConfigObject, int &alertType, bool &isActive, dyn_string &exceptionInfo)
 fwAlertConfig_objectExtractDiscrete (dyn_mixed alertConfigObject, int &alertType, dyn_string &alertTexts, dyn_string &alertMatches, dyn_string &alertClasses, string &alertPanel, dyn_string &alertPanelParameters, string &alertHelp, bool &isDiscrete, bool &impulse, dyn_bool &discreteNegation, string &stateBits, dyn_string &stateMatch, bool &isActive, dyn_string &exceptionInfo)
 fwAlertConfig_objectExtractDigital (dyn_mixed alertConfigObject, int &alertType, dyn_string &alertTexts, dyn_string &alertClasses, string &alertPanel, dyn_string &alertPanelParameters, string &alertHelp, bool &isActive, dyn_string &exceptionInfo)
 fwAlertConfig_objectExtractSummary (dyn_mixed alertConfigObject, int &alertType, dyn_string &alertTexts, dyn_string &summaryDpeList, int &threshold, string &alertClass, string &alertPanel, dyn_string &alertPanelParameters, string &alertHelp, bool &isActive, dyn_string &exceptionInfo)
Set/Get functions

Used to set/get the alarm settings to/from the dpe. The settings are stored into the settings object.

 fwAlertConfig_objectSet (string dpe, dyn_mixed alertConfigObject, dyn_string &exceptionInfo)
 fwAlertConfig_objectSetMany (dyn_string &dpes, dyn_dyn_mixed &alertConfigObjects, dyn_string &exceptionInfo)
 fwAlertConfig_objectGet (string dpe, dyn_mixed &alertConfigObject, dyn_string &exceptionInfo)
 fwAlertConfig_objectGetMany (dyn_string &dpes, dyn_dyn_mixed &alertConfigObjects, dyn_string &exceptionInfo)
 fwAlertConfig_deleteMultiple (dyn_string dpes, dyn_string &exceptionInfo, string removeDpeInSummary="", bool storeInParamHistory=TRUE)
 fwAlertConfig_deleteMany (dyn_string dpes, dyn_string &exceptionInfo, string removeDpeInSummary="", bool storeInParamHistory=TRUE)
 fwAlertConfig_delete (string dpe, dyn_string &exceptionInfo, string removeDpeInSummary="", bool storeInParamHistory=TRUE)
Activation functions

Used to activate, deactivate, acknowledge alarms.

 fwAlertConfig_acknowledge (string dpe, dyn_string &exceptionInfo, bool checkIfExists=TRUE, bool storeInParamHistory=FALSE)
 fwAlertConfig_acknowledgeMany (dyn_string dpes, dyn_string &exceptionInfo, bool checkIfExists=TRUE, bool storeInParamHistory=FALSE)
 fwAlertConfig_activate (string dpe, dyn_string &exceptionInfo, bool checkIfExists=TRUE, bool storeInParamHistory=FALSE)
 fwAlertConfig_activateMultiple (dyn_string dpes, dyn_string &exceptionInfo, bool checkIfExists=TRUE, bool storeInParamHistory=FALSE)
 fwAlertConfig_deactivate (string dpe, dyn_string &exceptionInfo, bool acknowledge=TRUE, bool checkIfExists=TRUE, bool storeInParamHistory=FALSE)
 fwAlertConfig_deactivateMultiple (dyn_string dpes, dyn_string &exceptionInfo, bool acknowledge=TRUE, bool checkIfExists=TRUE, bool storeInParamHistory=FALSE)

Variables

const string fwAlertConfig_FW_ALERT_CLASS_DPTYPE = "_FwAlertClass"
const string fwAlertConfig_FW_ALERT_CLASS_ALTERNATIVE_PATTERN = "_*_[0123456789][0123456789]*"
const string fwAlertConfig_FW_NULL_PATTERN = "JCOPFW_NULL_PATTERN"
const int fwAlertConfig_ALERT_MAX_PARAM_RANGES = 20
Alarm Settings object indexes

Used to access directly the alert settings object (object of type dyn_mixed). For advanced use.

const int fwAlertConfig_ALERT_LIMIT_TEXT = 1
const int fwAlertConfig_ALERT_LIMIT_VALUE = 2
const int fwAlertConfig_ALERT_LIMIT_VALUE_INCLUDED = 3
const int fwAlertConfig_ALERT_LIMIT_CLASS = 4
const int fwAlertConfig_ALERT_LIMIT_VALUE_MATCH = 5
const int fwAlertConfig_ALERT_LIMIT_NEGATION = 8
const int fwAlertConfig_ALERT_LIMIT_STATE_BITS = 9
const int fwAlertConfig_ALERT_LIMIT_LIMITS_STATE_BITS = 10
const int fwAlertConfig_ALERT_LIMIT_TEXT_WENT = 11
const int fwAlertConfig_ALERT_PARAM_TYPE = 1
const int fwAlertConfig_ALERT_PARAM_SUM_DPE_LIST = 2
const int fwAlertConfig_ALERT_PARAM_ADD_DPE_TO_SUMMARY = 3
const int fwAlertConfig_ALERT_PARAM_SUM_THRESHOLD = 4
const int fwAlertConfig_ALERT_PARAM_PANEL = 5
const int fwAlertConfig_ALERT_PARAM_PANEL_PARAMETERS = 6
const int fwAlertConfig_ALERT_PARAM_HELP = 7
const int fwAlertConfig_ALERT_PARAM_DISCRETE = 8
const int fwAlertConfig_ALERT_PARAM_IMPULSE = 9
const int fwAlertConfig_ALERT_PARAM_MODIFY_ONLY = 10
const int fwAlertConfig_ALERT_PARAM_FALLBACK_TO_SET = 11
const int fwAlertConfig_ALERT_PARAM_STORE_IN_HISTORY = 12
const int fwAlertConfig_ALERT_PARAM_RANGES = 13
const int fwAlertConfig_ALERT_PARAM_ACTIVE = 14
const int fwAlertConfig_ALERT_PARAM = 1
const int fwAlertConfig_ALERT_LIMIT = 2

Detailed Description

This library contains function associated with the alert handling config. Functions are provided for getting the current settings, deleting the config and for creating or altering the config Seperate functions for digital, analog and summary type alerts are available. Note: In order to set/get alarms, it is recommended to use the new functions fwAlertConfig_objectSet(), fwAlertConfig_objectGet(), fwAlertConfig_objectSetMany(), fwAlertConfig_objectGetMany(). See the functions for use examples.

Creation Date
14/03/2000
Modification History

14/09/2011 Marco Boccioli

  • #86729: fwAlertConfig: move deprecated functions to a separate library fwAlertConfigDeprecated.ctl
  • #86692: add func to get alert type. Added function fwAlertConfig_objectGetType()
  • #86693: improve help documentation. Improved documentation, adding markups for user's manual.

12/08/2011 Marco Boccioli

  • #85462: Functions *_setMany and *_getMany with parameters as reference.

28/07/2011 Marco Boccioli

  • #84905: Discrete alarms: alarm not working if range has more than one value. The problem was on the rfact that discrete alarms have 2 types: _SET (for values like "1,3,4") and _MATCH (for values lie "12" or "12-23"). Modified functions: fwAlertConfig_objectGetMany() now needs to make a further scan of dpGet: once to get the type of discrete alarm, once to get the value from attribute _set or _match, according to the type. _fwAlertConfig_prepareAnalogDiscrete() now sets the discrete value to _set or to _match, according to the ype of value (coma-separated or range or single).. Such feature is temporarely disabled because of bug on PVSS 3.8.2 (ETM-826).

18/07/2011 Marco Boccioli

24/03/2011 Marco Boccioli

  • fix for #79936 (modifying alert results in deactivating the alert). The object setting parameter fwAlertConfig_ALERT_PARAM_ACTIVE cannot be used any more as setting, otherwise it overwrites the active status of the alarm in case of modification of the settings. fwAlertConfig_ALERT_PARAM_ACTIVE is now available Read Only.

16/02/2011 Marco Boccioli

  • fix for #78303 (cannot add decimals to limits).

09/02/2011 Marco Boccioli

  • fix for #77977 (sum alarm threshold is not applied when using fwAlertConfig_set).

25/11/2010 Marco Boccioli

  • fix for JCOP-62 and #75697 (set an alarm with the JCOP fwConfigs function): modified function _fwAlertConfig_prepareAnalog(): It now checks if the Went text is filled. If not, it does not set at all the attribute _went_text. This avoids problems if setting alarm on a dist system running on PVSS 3.6.

11/10/2010 Marco Boccioli

  • fix for bug #73869: Error printed when setting binary alerts. The function fwAlertConfig_objectSetMany() was looking for .._num_ranges also for binary alert (that don't have it)

09/08/2010 Marco Boccioli

12/07/2010 Marco Boccioli

05/05/2010 Marco Boccioli

10/03/2010 Marco Boccioli

16/01/2004 Oliver Holme (IT-CO)

  • Added new functions for activate/deactivate/acknowledge and set/getLimits

15/01/2004 Oliver Holme (IT-CO)

  • Completed major overhaul of whole library

05/05/2000 Herve Milcent

  • problem with a summary alert with an empty list of dp, add a dummy dp to avoid it when creating the alert sum: compCreateAlertConfigSum
Constraints
WARNING: the functions use the dpGet or dpSetWait, problems may occur when using these functions in a working function called by a PVSS (dpConnect) or in a calling function
Usage
Public
PVSS managers
VISION, CTRL
Author:
Oliver Holme (IT-CO) based on original by Herve Milcent, Niko Karlsson based on libMLDBEH_ANLEGEN.ctl

Function Documentation

_fwAlertConfig_activateOrDeactivate ( dyn_string  dpes,
bool  activate,
dyn_string &  exceptionInfo,
bool  acknowledgeOnDeactivate = TRUE,
bool  checkIfExists = TRUE,
bool  storeInParamHistory = FALSE 
)

Activates or deactivates the alert handling on the given data point element.

Constraints
If a dpe does not have alert handling defined, the function returns without any exception. (The dpe has no active alert handling and is also available to have an alert handling config written to it)
Usage
Internal
PVSS managers
VISION, CTRL
Parameters:
dpesThe data point elements to act on
activateSet to TRUE to activate alert Set to FALSE to deactivate alert
exceptionInfoDetails of any exceptions are returned here
acknowledgeOnDeactivateOptional parameter (Default value - TRUE) only used when activate is FALSE TRUE for acknowledge alert when deactivating FALSE to leave alert unacknowledge when deactivated
checkIfExistsOptional parameter (Default value - TRUE) TRUE - check if alert config exists (avoids errors if it doesn't) FALSE - do not check if alert exists (may cause errors if it does not exist)
storeInParamHistoryOptional parameter (Default value - FALSE) TRUE - writing to active bit is stored in alert history FALSE - writing to active bit is not stored in alert history

References _fwConfigs_getConfigTypeAttribute().

Referenced by fwAlertConfig_activate(), fwAlertConfig_activateMultiple(), fwAlertConfig_deactivate(), and fwAlertConfig_deactivateMultiple().

_fwAlertConfig_checkClassPriorities ( dyn_string  systemsToCheck,
dyn_string &  alertClasses,
bool &  classesOk,
dyn_string &  exceptionInfo,
bool  useAlternativeClassPriorities = FALSE 
)

This function checks that the given list of alert classes is appropriate for setting to an alert config. The priority of each alert class is found and then a check is performed to check that the priorities are in a valid order. The check is performed as many times as there are systems specified, as priorities may vary on the same class in different systems. Valid orders are: 1) Priorities of alert classes in descending order down to 0 (good range) - e.g. 60, 40, 0 2) Priorities of alert classes in ascending order up from 0 (good range) - e.g. 0, 20, 40, 60 ,80 3) Priorities of alert classes first descending down to 0 (good range) then ascending after then - e.g. 60, 40, 0, 40, 80

Constraints
This function does not actually check that a good range is passed. It just checks the ordering of priorities. It is your responsibility to make sure that one alert class in the list passed to this function is empty (good range).
Usage
Internal
PVSS managers
VISION, CTRL
Parameters:
systemsToCheckThe list of systems to check the classes on. An empty list means local system only.
alertClassesThe list of alert classes in the order you wish to write them to the alert config.
classesOkReturns TRUE if classes are OK to be set. Returns FALSE if classes are bad.
exceptionInfoDetails of any exceptions are returned here
useAlternativeClassPrioritiesOPTIONAL PARAMETER - default value: FALSE If TRUE, the function will try to use similar alert classes of different priorities (fwWarningAck => fwWarningAck_41) in order to resolve problems with the same class being used twice in neighbouring alert ranges. If FALSE, no modification is made to the alertClasses as passed to the function. Only the checking of the priorities is carried out - no automatic attempt to correct.
_fwAlertConfig_checkLimits ( dyn_float  limitValues,
bool &  limitsOk,
dyn_string &  exceptionInfo 
)

This function check thats the given alert range limits are valid for setting to the alert config. This means that they should be in ascending order and no limit value should be duplicated.

Constraints
None
Usage
Internal
PVSS managers
VISION, CTRL
Parameters:
limitValuesThe list of range limit values to be checked
limitsOkReturns TRUE if limits are OK to be set. Returns FALSE if limits are bad.
exceptionInfoDetails of any exceptions are returned here

Referenced by fwAlertConfig_setLimits().

_fwAlertConfig_createDpeAlertConfigObject ( dyn_dyn_anytype &  dpeAlertConfigObject,
string  dpe,
int  type,
bool  active,
dyn_float  limits,
dyn_string  classes,
dyn_string  texts,
string  panel,
dyn_string  panelParameters,
string  help,
dyn_string &  exceptionInfo,
int  dpeType = -1 
)

Under development - DO NOT USE

References fwConfigs_createDpeConfigObject().

_fwAlertConfig_get ( string  dpe,
int &  alertType,
dyn_string &  alertTexts,
dyn_float &  alertLimits,
dyn_string &  alertClass,
dyn_string &  summaryDpeList,
string &  alertPanel,
dyn_string &  alertPanelParameters,
string &  alertHelp,
bool &  alertActive,
dyn_string &  exceptionInfo 
)

Returns the alert handling properties of a analog or digital datapoint if the number of alert texts returned is 0, then no alert configuration exists

NOTE: THIS FUNCTION SHOULD NOT BE CALLED DIRECTLY, use fwAlertConfig_get

Constraints
The length of the alertTexts and alertClasses dyn_strings must both be 2
Usage
Internal
PVSS managers
VISION, CTRL
Parameters:
dpeName of data point element to act on
alertTypeType of alert on dpe: DPCONFIG_ALERT_BINARYSIGNAL if digital alert handling DPCONFIG_ALERT_NONBINARYSIGNAL if analog alert handling DPCONFIG_SUM_ALERT if summary alert handling
alertTextsAlert texts for each range
alertLimitsThe limits of each range given here
alertClassAlert classes for each range One of the items of the dyn_string must always be empty to indicate the valid state. Don't forget to add the dot to the alert class names.
summaryDpeListIf Summary alert, the dpeList is returned here If a DP pattern was specified, then this will be returned as the first item in this list.
alertPanelPanel to call from the alert screen
alertPanelParametersParameters to pass to panel given in alertPanel
alertHelpHelp text or path to help file
alertActivewhether or not this configuration is active
exceptionInfoDetails of any exceptions are returned here

References fwAlertConfig_getLimits().

Referenced by _fwAlertConfig_getDiscrete().

_fwAlertConfig_getDiscrete ( string  dpe,
int &  alertType,
dyn_string &  alertTexts,
dyn_float &  alertLimits,
dyn_string &  alertClass,
string &  alertPanel,
dyn_string &  alertPanelParameters,
string &  alertHelp,
bool &  alertActive,
bool &  discrete,
bool &  impulse,
dyn_bool &  discreteNegation,
string &  stateBits,
dyn_string &  stateMatch,
dyn_string &  exceptionInfo 
)

Returns the discrete alert handling properties of a analog or digital datapoint if the number of alert texts returned is 0, then no alert configuration exists

NOTE: THIS FUNCTION SHOULD NOT BE CALLED DIRECTLY, use fwAlertConfig_get

Constraints
The length of the alertTexts and alertClasses dyn_strings must both be 2
Usage
Internal
PVSS managers
VISION, CTRL
Parameters:
dpeName of data point element to act on
alertTypeType of alert on dpe: DPCONFIG_ALERT_BINARYSIGNAL if digital alert handling DPCONFIG_ALERT_NONBINARYSIGNAL if analog alert handling DPCONFIG_SUM_ALERT if summary alert handling
alertTextsAlert texts for each range
alertLimitsThe limits of each range given here
alertClassAlert classes for each range One of the items of the dyn_string must always be empty to indicate the valid state. Don't forget to add the dot to the alert class names.
alertPanelPanel to call from the alert screen
alertPanelParametersParameters to pass to panel given in alertPanel
alertHelpHelp text or path to help file
alertActivewhether or not this configuration is active
discreteTRUE if discrete
impulseTRUE if impulse
discreteNegationFor each limit, if the value must match it, or must not match it (TRUE = must not match it)
stateBitsstate bits of the alarms
stateMatchfor each limit, state bits of the limit
exceptionInfoDetails of any exceptions are returned here

References _fwAlertConfig_get(), and fwAlertConfig_getLimits().

_fwAlertConfig_prepareAnalog ( string  dpe,
int  currentConfigType,
int  currentNumberOfRanges,
dyn_int  alertHandlingType,
dyn_float  limits,
dyn_string  alertTexts,
dyn_string  alertClasses,
dyn_bool  includeLimits,
int  minimumPriority,
string  alertPanel,
dyn_string  alertPanelParameters,
string  alertHelp,
dyn_int  hysteresisType,
dyn_float  hysteresisLimits,
dyn_string &  attributes,
dyn_mixed &  values,
dyn_string &  exceptionInfo,
bool  modifyOnly = FALSE,
bool  fallBackToSet = FALSE,
dyn_string  alertWentTexts = makeDynString() 
)

Prepares a list of attributes and a list of values to be used in a dpSetWait() call to set the config for the given dpe.

Constraints
The length of the alertTexts, alertHandlingType, hysteresisType and alertClasses dyn_vars must be equal The length of the limits and includeLimits dyn_vars must be one less than the length of alertTexts
Usage
Internal
PVSS managers
VISION, CTRL
Parameters:
dpeName of data point element to act on
currentConfigTypeThe type of the current alert config on the data point element (only considered in case of modifyOnly = TRUE, otherwise value is ignored)
currentNumberOfRangesThe current number of ranges in the alert config on the data point element (only considered in case of modifyOnly = TRUE, otherwise value is ignored)
alertHandlingTypeOne value in dyn_int for each range to be used. Value should be DPDETAIL_RANGETYPE_MINMAX;
limitsThe limits of each range given here eg. makeDynFloat( 20, 60 );
alertTextsAlert texts for each range eg. makeDynString( "Bad Text", "OK", "Bad Text")
alertClassesAlert classes for each range eg. makeDynString( "_fwErrorAck.", "" , "_fwErrorAck.") One of the items of the dyn_string must always be empty to indicate the valid state. The valid ranges becomes the state with no alert class given (the second in this case). Don't forget to add the dot to the alert class names.
includeLimitsTRUE to include, else FALSE
minimumPriorityMinimum priority of alert (ignore below this value)
alertPanelPanel to call from the alert screen
alertPanelParametersParameters to pass to panel given in Alert Panel
alertHelpHelp text or path to help file
hysteresisTypeOne value for each range in use: DPATTR_HYST_NONE for no hysteresis or DPATTR_HYST_VALUE for hysteresis
hysteresisLimitsValues for limits of hysteresis (length of dyn_float) should be (ranges-1)*2
attributesOutput - the list of attributes that need to be set is returned here
valuesOutput - the list of values that need to be set is returned here
exceptionInfoDetails of any exceptions are returned here
modifyOnlyOptional parameter - Default value FALSE. Set to TRUE to modify alert without setting "type" attributes. This is much quicker, but the alert config must already exist, be an analog alert and have the same number of ranges as you want.
fallBackToSetOptional parameter - Default value FALSE. Used in combination with modifyOnly. If modifyOnly = TRUE and fallBackToSet = FALSE, then if the alert config is not compatible an exception is raised. If modifyOnly = TRUE and fallBackToSet = TRUE, then if the alert config is not compatible, modifyOnly is treated as if it was FALSE.
alertWentTextsOptional parameter - the list of went texts, one per range.

Referenced by fwAlertConfig_objectSetMany().

_fwAlertConfig_prepareAnalogDiscrete ( string  dpe,
int  currentConfigType,
int  currentNumberOfRanges,
dyn_int  alertHandlingType,
dyn_string  limitsMatch,
dyn_string  alertTexts,
dyn_string  alertClasses,
int  minimumPriority,
string  alertPanel,
dyn_string  alertPanelParameters,
string  alertHelp,
bool  impulse,
dyn_bool  discreteNegation,
dyn_string  stateBits,
dyn_string  stateMatch,
dyn_string &  attributes,
dyn_mixed &  values,
dyn_string &  exceptionInfo,
bool  modifyOnly = FALSE,
bool  fallBackToSet = FALSE,
dyn_string  alertWentTexts = makeDynString() 
)

Prepares a list of attributes and a list of values to be used in a dpSetWait() call to set the discrete config for the given dpe.

Constraints
The length of the alertTexts, alertHandlingType, hysteresisType , limits and includeLimits alertClasses dyn_vars must be equal
Usage
Internal
PVSS managers
VISION, CTRL
Parameters:
dpeName of data point element to act on
currentConfigTypeThe type of the current alert config on the data point element (only considered in case of modifyOnly = TRUE, otherwise value is ignored)
currentNumberOfRangesThe current number of ranges in the alert config on the data point element (only considered in case of modifyOnly = TRUE, otherwise value is ignored)
alertHandlingTypeOne value in dyn_int for each range to be used. Value should be DPDETAIL_RANGETYPE_MINMAX;
limitsMatchThe values match of each range given here eg. makeDynString( "*", "2,4,5", "3", "6-10" ); First element must be *.
alertTextsAlert texts for each range eg. makeDynString( "Bad Text", "OK", "Bad Text")
alertClassesAlert classes for each range eg. makeDynString( "_fwErrorAck.", "" , "_fwErrorAck.") One of the items of the dyn_string must always be empty to indicate the valid state. The valid ranges becomes the state with no alert class given (the second in this case). Don't forget to add the dot to the alert class names.
minimumPriorityMinimum priority of alert (ignore below this value)
alertPanelPanel to call from the alert screen
alertPanelParametersParameters to pass to panel given in Alert Panel
alertHelpHelp text or path to help file
impulseIf TRUE, the discrete alert reacts to impulses.
discreteNegationOne per limit. If FALSE, the alarm is triggered if the value matches that limit. If TRUE, the alarm is triggered if the value does not match that limit.
stateBitsState Bits of the alarm. (i.e. 000010011000).
stateMatchState Bits of the limit. One per limit. (i.e. xxx0010x110xxx).
attributesOutput - the list of attributes that need to be set is returned here
valuesOutput - the list of values that need to be set is returned here
exceptionInfoDetails of any exceptions are returned here
modifyOnlyOptional parameter - Default value FALSE. Set to TRUE to modify alert without setting "type" attributes. This is much quicker, but the alert config must already exist, be an analog alert and have the same number of ranges as you want.
fallBackToSetOptional parameter - Default value FALSE. Used in combination with modifyOnly. If modifyOnly = TRUE and fallBackToSet = FALSE, then if the alert config is not compatible an exception is raised. If modifyOnly = TRUE and fallBackToSet = TRUE, then if the alert config is not compatible, modifyOnly is treated as if it was FALSE.
alertWentTextsOptional parameter - the list of went texts, one per range.

Referenced by fwAlertConfig_objectSetMany().

_fwAlertConfig_prepareDigital ( string  dpe,
int  currentConfigType,
dyn_string  alertTexts,
dyn_string  alertClasses,
int  minimumPriority,
string  alertPanel,
dyn_string  alertPanelParameters,
string  alertHelp,
dyn_string &  attributes,
dyn_mixed &  values,
dyn_string &  exceptionInfo,
bool  modifyOnly = FALSE,
bool  fallBackToSet = FALSE 
)

Prepares a list of attributes and a list of values to be used in a dpSetWait() call to set the config for the given dpe.

Constraints
The length of the alertTexts and alertClasses dyn_strings must both be 2
Usage
Public
PVSS managers
VISION, CTRL
Parameters:
dpeName of data point element to act on
currentConfigTypeThe type of the current alert config on the data point element (only considered in case of modifyOnly = TRUE, otherwise value is ignored)
alertTextsAlert texts eg. makeDynString( "Bad Text", "OK")
alertClassesAlert classes eg. makeDynString( "_fwErrorAck.", "" ) One of the items of the dyn_string must always be empty to indicate the valid state The valid ranges becomes the state with no alert class given (the second in this case). Don't forget to add the dot to the alert class names.
minimumPriorityMinimum priority of alert (ignore below this value)
alertPanelPanel to call from the alert screen
alertPanelParametersParameters to pass to panel given in Alert Panel
alertHelpHelp text or path to help file
attributesOutput - the list of attributes that need to be set is returned here
valuesOutput - the list of values that need to be set is returned here
exceptionInfoDetails of any exceptions are returned here
modifyOnlyOptional parameter - Default value FALSE. Set to TRUE to modify alert without setting "type" attributes. This is much quicker, but the alert config must already exist and must be of type binary alert.
fallBackToSetOptional parameter - Default value FALSE. Used in combination with modifyOnly. If modifyOnly = TRUE and fallBackToSet = FALSE, then if the alert config is not compatible an exception is raised. If modifyOnly = TRUE and fallBackToSet = TRUE, then if the alert config is not compatible, modifyOnly is treated as if it was FALSE.

Referenced by fwAlertConfig_objectSetMany().

_fwAlertConfig_prepareDigitalDiscrete ( string  dpe,
int  currentConfigType,
dyn_string  alertTexts,
dyn_string  alertClasses,
int  minimumPriority,
string  alertPanel,
dyn_string  alertPanelParameters,
string  alertHelp,
bool  impulse,
dyn_string  stateBits,
dyn_string &  attributes,
dyn_mixed &  values,
dyn_string &  exceptionInfo,
bool  modifyOnly = FALSE,
bool  fallBackToSet = FALSE 
)

Prepares a list of attributes and a list of values to be used in a dpSetWait() call to set the discrete config for the given dpe.

Constraints
The length of the alertTexts, alertHandlingType, hysteresisType , limits and includeLimits alertClasses dyn_vars must be equal
Usage
Public
PVSS managers
VISION, CTRL
Parameters:
dpeName of data point element to act on
currentConfigTypeThe type of the current alert config on the data point element (only considered in case of modifyOnly = TRUE, otherwise value is ignored)
alertTextsAlert texts eg. makeDynString( "Bad Text", "OK")
alertClassesAlert classes eg. makeDynString( "_fwErrorAck.", "" ) One of the items of the dyn_string must always be empty to indicate the valid state The valid ranges becomes the state with no alert class given (the second in this case). Don't forget to add the dot to the alert class names.
minimumPriorityMinimum priority of alert (ignore below this value)
alertPanelPanel to call from the alert screen
alertPanelParametersParameters to pass to panel given in Alert Panel
alertHelpHelp text or path to help file
impulseIf TRUE, the discrete alert reacts to impulses.
stateBitsState Bits of the alarm. (i.e. 000010011000).
attributesOutput - the list of attributes that need to be set is returned here
valuesOutput - the list of values that need to be set is returned here
exceptionInfoDetails of any exceptions are returned here
modifyOnlyOptional parameter - Default value FALSE. Set to TRUE to modify alert without setting "type" attributes. This is much quicker, but the alert config must already exist and must be of type binary alert.
fallBackToSetOptional parameter - Default value FALSE. Used in combination with modifyOnly. If modifyOnly = TRUE and fallBackToSet = FALSE, then if the alert config is not compatible an exception is raised. If modifyOnly = TRUE and fallBackToSet = TRUE, then if the alert config is not compatible, modifyOnly is treated as if it was FALSE.

Referenced by fwAlertConfig_objectSetMany().

_fwAlertConfig_prepareSummary ( string  dpe,
int  currentConfigType,
float  threshold,
dyn_string  alertTexts,
dyn_string  dpElementList,
int  minimumPriority,
string  alertPanel,
dyn_string  alertPanelParameters,
string  alertHelp,
dyn_string &  attributes,
dyn_mixed &  values,
dyn_string &  exceptionInfo,
bool  modifyOnly = FALSE,
bool  fallBackToSet = FALSE 
)

Prepares a list of attributes and a list of values to be used in a dpSetWait() call to set the config for the given dpe.

Constraints
The length of the alertTexts should be 2 Can only set summary alerts of type dp list (not dp pattern)
Usage
Public
PVSS managers
VISION, CTRL
Parameters:
dpeName of data point element to act on
currentConfigTypeThe type of the current alert config on the data point element (only considered in case of modifyOnly = TRUE, otherwise value is ignored)
thresholdlimit of single alarms to be shown before they are masked (and only the sum alarm is shown).
alertTextsAlert texts eg. makeDynString( "OK", "Bad")
dpElementListList of dpes to include in summary alert
minimumPriorityMinimum priority of alert (ignore below this value)
alertPanelPanel to call from the alert screen
alertPanelParametersParameters to pass to panel given in Alert Panel
alertHelpHelp text or path to help file
attributesOutput - the list of attributes that need to be set is returned here
valuesOutput - the list of values that need to be set is returned here
exceptionInfoDetails of any exceptions are returned here
modifyOnlyOptional parameter - Default value FALSE. Set to TRUE to modify alert without setting "type" attributes. This is much quicker, but the alert config must already exist and be of type summary alert.
fallBackToSetOptional parameter - Default value FALSE. Used in combination with modifyOnly. If modifyOnly = TRUE and fallBackToSet = FALSE, then if the alert config is not compatible an exception is raised. If modifyOnly = TRUE and fallBackToSet = TRUE, then if the alert config is not compatible, modifyOnly is treated as if it was FALSE.

Referenced by fwAlertConfig_objectSetMany().

_fwAlertConfig_readDpeAlertConfigObject ( dyn_dyn_anytype  dpeAlertConfigObject,
string &  dpe,
int &  type,
bool &  active,
dyn_float &  limits,
dyn_string &  classes,
dyn_string &  texts,
string &  panel,
dyn_string &  panelParameters,
string &  help,
dyn_string &  exceptionInfo,
int &  dpeType 
)

Under development - DO NOT USE

fwAlertConfig_addDpInAlertSummary ( string  dpe,
string  dpeToAdd,
dyn_string &  exceptionInfo,
bool  errorIfPresent = TRUE,
bool  storeInParamHistory = TRUE 
)

Adds a new data point element to the dp list of an existing summary alert handling on the given data point element.

Constraints
None
Usage
Public
PVSS managers
VISION, CTRL
Parameters:
dpeName of data point element where the summary alert config is
dpeToAddName of the data point element to be added to the summary alert
exceptionInfoDetails of any exceptions are returned here
errorIfPresentOPTIONAL PARAMETER - default value TRUE If TRUE, an exception is raised if the dpeToAdd is already configured in the summary alert. If FALSE, no exception is raised in this case.
storeInParamHistoryOPTIONAL PARAMETER - default value = TRUE You can specify if the change should be stored in the Paramterisation History of PVSS

References fwAlertConfig_get(), and fwAlertConfig_set().

Referenced by fwAlertConfig_objectSetMany().

fwAlertConfig_checkIsDpInAlertSummary ( string  dpe,
string  dpeToLookFor,
bool &  dpeFound,
dyn_string &  exceptionInfo 
)

Checks for a reference to a given data point element in the dp list of an existing summary alert handling on the given data point element.

Constraints
None
Usage
Public
PVSS managers
VISION, CTRL
Parameters:
dpeName of data point element where the summary alert config is
dpeToLookForName of the data point element to be searched for in the summary alert
dpeFoundResult is returned here. TRUE if dpe was found in summary alert, else FALSE
exceptionInfoDetails of any exceptions are returned here

References fwAlertConfig_get().

fwAlertConfig_deleteDpFromAlertSummary ( string  dpe,
string  dpeToDelete,
dyn_string &  exceptionInfo,
bool  errorIfNotPresent = TRUE,
bool  storeInParamHistory = TRUE 
)

Removes a data point element from the dp list of an existing summary alert handling on the given data point element.

Constraints
None
Usage
Public
PVSS managers
VISION, CTRL
Parameters:
dpeName of data point element where the summary alert config is
dpeToDeleteName of the data point element to be removed from the summary alert
exceptionInfoDetails of any exceptions are returned here
errorIfNotPresentOPTIONAL PARAMETER - default value TRUE If TRUE, an exception is raised if the dpeToDelete is not currently configured in the summary alert. If FALSE, no exception is raised in this case.
storeInParamHistoryOPTIONAL PARAMETER - default value = TRUE You can specify if the change should be stored in the Paramterisation History of PVSS

References fwAlertConfig_get(), and fwAlertConfig_set().

Referenced by fwAlertConfig_deleteMultiple().

fwAlertConfig_generateAbsoluteLimitsMany ( dyn_string  dpes,
int  limitsType,
dyn_dyn_mixed  relativeLimits,
dyn_dyn_mixed &  absoluteLimits,
dyn_string &  exceptionInfo 
)

This function can be used to evaluate relative limits for many dpes and get back the absolute values needed to save to the PVSS configs. You can specify a different set of limits for each dpe that you pass to the function. Types of relative limit can be "Current Value +/- the limit value" or "Current Value +/- a percentage of the current value". If you use this function with limits of the normal absolute type, the output limits will be equal to the input limits.

Constraints
None
Usage
Public
PVSS managers
VISION, CTRL
Parameters:
dpesThe list of data point elements that the limits are intended for
limitsTypeThe type of limits that you are passing to the function. Must be one of: fwConfigs_ALERT_LIMITS_ABSOLUTE fwConfigs_ALERT_LIMITS_RELATIVE fwConfigs_ALERT_LIMITS_RELATIVE_PERCENTAGE
relativeLimitsThe list of values of the limits for each dpe in the dpes list.
absoluteLimitsThe processed limits are returned here. Each limit is found in the same position in the array as the original unprocessed limit in relativeLimits.
exceptionInfoDetails of any exceptions are returned here

References _fwConfigs_getConfigTypeAttribute().

Referenced by fwAlertConfig_generateAbsoluteLimitsMultiple().

fwAlertConfig_generateAbsoluteLimitsMultiple ( dyn_string  dpes,
int  limitsType,
dyn_mixed  relativeLimits,
dyn_dyn_mixed &  absoluteLimits,
dyn_string &  exceptionInfo 
)

This function can be used to evaluate relative limits for many dpes and get back the absolute values needed to save to the PVSS configs. The same set of limits is used for every dpe that you pass to the function. Types of relative limit can be "Current Value +/- the limit value" or "Current Value +/- a percentage of the current value". If you use this function with limits of the normal absolute type, the output limits will be equal to the input limits.

Constraints
None
Usage
Public
PVSS managers
VISION, CTRL
Parameters:
dpesThe list of data point elements that the limits are intended for
limitsTypeThe type of limits that you are passing to the function. Must be one of: fwConfigs_ALERT_LIMITS_ABSOLUTE fwConfigs_ALERT_LIMITS_RELATIVE fwConfigs_ALERT_LIMITS_RELATIVE_PERCENTAGE
relativeLimitsThe limits to be evaluted for each dpe.
absoluteLimitsThe processed limits are returned here. The first dimension of the array indicates which dpe the limit value belongs to. The second dimension of the array provides all the limits for that particular dpe. e.g. absoluteLimits[1][2] returns the second limit value for the dpe in the first position of the dpes list.
exceptionInfoDetails of any exceptions are returned here

References fwAlertConfig_generateAbsoluteLimitsMany().

fwAlertConfig_getAlertClasses ( dyn_string  searchSystems,
dyn_string &  alertClassDps,
dyn_int &  acknowledgeTypes,
dyn_int &  priorities,
dyn_string &  exceptionInfo 
)

Gets a list of all the existing archive class dps of type _FwAlertClass. Lists are also returned containing the acknowledgeType of the class and the priority The search is performed in the specified systems, and only classes found in ALL of the systems will be returned

Constraints
None
Usage
Public
PVSS managers
VISION, CTRL
Parameters:
searchSystemsA list of systems to search in
alertClassDpsThe list of alert class dps found is returned here (excluding the . at the end and without system name)
acknowledgeTypesThe acknowledge type of each alert class is returned here. Possible values are: DPATTR_ACK_DELETES - acknowledgement deletes DPATTR_ACK_NONE - cannot be acknowledged (unacknowledgable) DPATTR_ACK_APP - CAME can be acknowledged DPATTR_ACK_PAIR - alert pair must be acknowledged DPATTR_ACK_APP_AND_DISAPP - CAME and WENT must be acknowledged
prioritiesThe prioritues of each alert class is returned here.
exceptionInfoDetails of any exceptions are returned here
fwAlertConfig_getLimits ( string  dpe,
dyn_int &  limitNumbers,
dyn_float &  limitValues,
dyn_string &  exceptionInfo 
)

Gets the alert limits for the currently configured alert ranges on the given data point element.

Constraints
Only works on data points that have an analog alert handling set up.
Usage
Public
PVSS managers
VISION, CTRL
Parameters:
dpeData point element to read limits from
limitNumbersThe numbers of the limits are returned here This is always a list of integers starting at 1 up to the number of (ranges - 1) e.g. For a 5 range alert the value returned will be {1,2,3,4}
limitValuesThe values of the limits are returned here The limits are always returned is ascending order
exceptionInfoDetails of any exceptions are returned here

Referenced by _fwAlertConfig_get(), _fwAlertConfig_getDiscrete(), and fwAlertConfig_setLimits().

fwAlertConfig_setLimits ( string  dpe,
dyn_int  limitNumbers,
dyn_float  limitValues,
dyn_string &  exceptionInfo,
bool  checkBeforeSetting = FALSE,
bool  storeInParamHistory = TRUE 
)

Sets the alert limits for the currently configured alert ranges on the given data point element. The values in the same position in limitNumbers and limitValues form a pair of values. The pair consists of the limit number to act on and limit value to set.

  • Example usage:

limitNumbers = {3,4,2} limitValues = {30,50,10} This will set the limit between Range 2 and 3 to 10 This will set the limit between Range 3 and 4 to 30 This will set the limit between Range 4 and 5 to 50

  • NOTE: Not all the limits need to be specified in the input parameters
  • NOTE: Values in limitNumbers must be between 1 and (number of ranges - 1)
Constraints
Only works on data points that have an analog alert handling set up. This function can not change the number of ranges defined in the alert config. If only some limits are specified, the new limits must be consistent with the old values that will not be modified
Usage
Public
PVSS managers
VISION, CTRL
Parameters:
dpeData point element to set the limits to
limitNumbersThe numbers of the limits to be modified are passed here
limitValuesThe values of the limits to be modified are passed here The values in this list correspond to the limit numbers given in limitNumbers
exceptionInfoDetails of any exceptions are returned here
checkBeforeSettingOPTIONAL PARAMETER - default value FALSE If TRUE, the new limit values are compared with the existing limits to check that the final configuration will be consistent (i.e. all the range limits are in ascending order with no duplicates). In case of inconsistencies, an exception will be raised. If FALSE, the new limits are not checked and an error will appear in the log when the dpSetWait is performed and an exception will be raised.
storeInParamHistoryOPTIONAL PARAMETER - default value = TRUE You can specify if the change should be stored in the Paramterisation History of PVSS

References _fwAlertConfig_checkLimits(), fwAlertConfig_activate(), fwAlertConfig_deactivate(), and fwAlertConfig_getLimits().