fwPvRange.ctl File Reference



const unsigned fwPvRange_MINIMUM_VALUE = 1
const unsigned fwPvRange_MAXIMUM_VALUE = 2
const unsigned fwPvRange_VALUE_SET = 3
const unsigned fwPvRange_VALUE_PATTERN = 4
const unsigned fwPvRange_NEGATE_RANGE = 5
const unsigned fwPvRange_IGNORE_OUTSIDE = 6
const unsigned fwPvRange_INCLUSIVE_MINIMUM = 7
const unsigned fwPvRange_INCLUSIVE_MAXIMUM = 8
 _fwPvRange_buildSettingsLists (string dpe, int configurationType, dyn_anytype configData, dyn_string &attributesToSet, dyn_anytype &valuesToSet, dyn_string &exceptionInfo)
 _fwPvRange_buildAttributesList (string dpe, int configurationType, dyn_string &attributes, dyn_int &attributeIndex, dyn_string &exceptionInfo)
 _fwPvRange_checkInputConfiguration (string dpe, int pvRangeType, dyn_anytype configData, dyn_string &exceptionInfo)
 fwPvRange_setObjectMany (dyn_string dpes, dyn_int pvRangeTypes, dyn_dyn_anytype configData, dyn_string &exceptionInfo)
 _fwPvRange_set (dyn_string dpes, dyn_int pvRangeTypes, dyn_dyn_anytype configData, dyn_string &exceptionInfo)
 fwPvRange_setObjectMultiple (dyn_string dpes, int pvRangeType, dyn_anytype configData, dyn_string &exceptionInfo)
 fwPvRange_setObject (string dpe, int pvRangeType, dyn_anytype configData, dyn_string &exceptionInfo)
 fwPvRange_getObject (string dpe, bool &configExists, int &pvRangeType, dyn_anytype &configData, dyn_string &exceptionInfo)
 fwPvRange_getObjectMany (dyn_string dpes, dyn_bool &configExists, dyn_int &pvRangeTypes, dyn_dyn_anytype &configData, dyn_string &exceptionInfo)
 _fwPvRange_get (dyn_string dpes, dyn_bool &configExists, dyn_int &pvRangeTypes, dyn_dyn_anytype &configData, dyn_string &exceptionInfo)
 fwPvRange_deleteMultiple (dyn_string dpes, dyn_string &exceptionInfo)
 fwPvRange_deleteMany (dyn_string dpes, dyn_string &exceptionInfo)
 fwPvRange_delete (string dpe, dyn_string &exceptionInfo)
 fwPvRange_setMany (dyn_string &dpes, dyn_float &minValue, dyn_float &maxValue, dyn_bool &negateRange, dyn_bool &ignoreOutside, dyn_bool &inclusiveMin, dyn_bool &inclusiveMax, dyn_string &exceptionInfo)
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 fwPvRange_setMultiple (dyn_string dpes, float minValue, float maxValue, bool negateRange, bool ignoreOutside, bool inclusiveMin, bool inclusiveMax, dyn_string &exceptionInfo)
 fwPvRange_set (string dpe, float minValue, float maxValue, bool negateRange, bool ignoreOutside, bool inclusiveMin, bool inclusiveMax, dyn_string &exceptionInfo)
 fwPvRange_get (string dpe, bool &configExists, float &minValue, float &maxValue, bool &negateRange, bool &ignoreOutside, bool &inclusiveMin, bool &inclusiveMax, dyn_string &exceptionInfo)
 fwPvRange_getMany (dyn_string &dpes, dyn_bool &configExists, dyn_float &minValue, dyn_float &maxValue, dyn_bool &negateRange, dyn_bool &ignoreOutside, dyn_bool &inclusiveMin, dyn_bool &inclusiveMax, dyn_string &exceptionInfo)

Detailed Description

This library contains function associated with the PV range config. Functions are provided for getting the current settings, deleting the config and setting the config

Creation Date
21/08/2000
Modification History

05/09/2011 Marco Boccioli

12/08/2011 Marco Boccioli

10/10/2000 - modified savePvRange() function so that pv_range.._type is not set if pv_range config already exists. 01/09/2003 Sascha Schmeling: modified _set and _get to allow for floats 15/01/2004 Oliver Holme (IT-CO) Completed overhaul of whole library 19/07/2006 Oliver Holme (IT-CO) Added new object based functions to support new PV range types

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:
Herve Milcent, Juha Rossi, Oliver Holme (IT-CO)

Function Documentation

_fwPvRange_buildSettingsLists ( string  dpe,
int  configurationType,
dyn_anytype  configData,
dyn_string &  attributesToSet,
dyn_anytype &  valuesToSet,
dyn_string &  exceptionInfo 
)

This functions is used to prepare the necessary values for a dpSet on the necessary attributes of the _pv_range config. This function assumes that the _type attribute has already been set to the ncessary value

Constraints
None
Usage
Internal
PVSS managers
VISION, CTRL
Parameters:
dpe data point element to which the pv_range config should be written
configurationType value which has been written _type attribute - one of: DPCONFIG_NONE DPCONFIG_MINMAX_PVSS_RANGECHECK DPCONFIG_SET_PVSS_RANGECHECK DPCONFIG_MATCH_PVSS_RANGECHECK
configData a list of data to be set to the attributes of the pv_range config. The order or items in this list is based on the global constants which define which attribute is which
attributesToSet a list of the attributes to be written is returned here
valuesToSet a list of values to be passed to the dpSet is returned here
exceptionInfo details of any errors are returned here
_fwPvRange_buildAttributesList ( string  dpe,
int  configurationType,
dyn_string &  attributes,
dyn_int &  attributeIndex,
dyn_string &  exceptionInfo 
)

This function is used to prepare a list of attributes that need to be written to in order to set the pv_range config. An index is also returned to help identify which attribute is which.

Constraints
None
Usage
Internal
PVSS managers
VISION, CTRL
Parameters:
dpe data point element to which the pv_range config should be written
configurationType value which has been written _type attribute - one of: DPCONFIG_NONE DPCONFIG_MINMAX_PVSS_RANGECHECK DPCONFIG_SET_PVSS_RANGECHECK DPCONFIG_MATCH_PVSS_RANGECHECK
attributes a list is returned here containing all the attributes needed to set the pv_range config on the dpe
attributeIndex a list is returned here containing an index to explain which attribute is which. The list is a list of integers that can be compared to the global constants that define which attribute is which
exceptionInfo details of any errors are returned here
_fwPvRange_checkInputConfiguration ( string  dpe,
int  pvRangeType,
dyn_anytype  configData,
dyn_string &  exceptionInfo 
)

This function is checks the consistency of the PV rnage configuration objects before they are written to the dpe.

Constraints
None
Usage
Internal
PVSS managers
VISION, CTRL
Parameters:
dpe the dpe that the configuration is for
pvRangeType types of PV range to set. The value can be one of: DPCONFIG_MINMAX_PVSS_RANGECHECK DPCONFIG_SET_PVSS_RANGECHECK DPCONFIG_MATCH_PVSS_RANGECHECK
configData configuration object for the dpe is passed here Constants are used to identify the data inside the object.
exceptionInfo details of any errors are returned here
fwPvRange_setObjectMany ( dyn_string  dpes,
dyn_int  pvRangeTypes,
dyn_dyn_anytype  configData,
dyn_string &  exceptionInfo 
)

Sets different PV range configs for the given data point elements

Constraints
None
Usage
Public
PVSS managers
VISION, CTRL
Parameters:
dpes list of data point elements
pvRangeTypes list of types of PV range to set. The values can be one of: DPCONFIG_MINMAX_PVSS_RANGECHECK DPCONFIG_SET_PVSS_RANGECHECK DPCONFIG_MATCH_PVSS_RANGECHECK
configData configuration object for each dpe is passed here. The first dimension of the array defines which dpe the object relate to. e.g. configData[1] contains the configuration object for dpes[1] Constants are used to identify the data inside the object.

For all PV range configurations the configData object must contain values for: fwPvRange_NEGATE_RANGE - e.g. configData[1][fwPvRange_NEGATE_RANGE] = TRUE; fwPvRange_IGNORE_OUTSIDE

For min-max PV ranges, the following object fields must also be filled: fwPvRange_INCLUSIVE_MINIMUM fwPvRange_INCLUSIVE_MAXIMUM fwPvRange_MINIMUM_VALUE fwPvRange_MAXIMUM_VALUE

For value set PV ranges, the following object fields must also be filled: fwPvRange_VALUE_SET

For min-max PV ranges, the following object fields must also be filled: fwPvRange_VALUE_PATTERN

Parameters:
exceptionInfo details of any errors are returned here
_fwPvRange_set ( dyn_string  dpes,
dyn_int  pvRangeTypes,
dyn_dyn_anytype  configData,
dyn_string &  exceptionInfo 
)

Sets different PV range configs for the given data point elements

Constraints
None
Usage
Internal
PVSS managers
VISION, CTRL
Parameters:
dpes list of data point elements
pvRangeTypes list of types of PV range to set. The value can be one of: DPCONFIG_MINMAX_PVSS_RANGECHECK DPCONFIG_SET_PVSS_RANGECHECK DPCONFIG_MATCH_PVSS_RANGECHECK
configData configuration object for each dpe is passed here. The first dimension of the array defines which dpe the object relate to. e.g. configData[1] contains the configuration object for dpes[1] Constants are used to identify the data inside the object.
exceptionInfo details of any errors are returned here
fwPvRange_setObjectMultiple ( dyn_string  dpes,
int  pvRangeType,
dyn_anytype  configData,
dyn_string &  exceptionInfo 
)

Sets the same PV range config for the given data point elements

Constraints
None
Usage
Public
PVSS managers
VISION, CTRL
Parameters:
dpes list of data point elements
pvRangeType types of PV range to set. The value can be one of: DPCONFIG_MINMAX_PVSS_RANGECHECK DPCONFIG_SET_PVSS_RANGECHECK DPCONFIG_MATCH_PVSS_RANGECHECK
configData configuration object for the dpes is passed here Constants are used to identify the data inside the object.

For all PV range configurations the configData object must contain values for: fwPvRange_NEGATE_RANGE - e.g. configData[fwPvRange_NEGATE_RANGE] = TRUE; fwPvRange_IGNORE_OUTSIDE

For min-max PV ranges, the following object fields must also be filled: fwPvRange_INCLUSIVE_MINIMUM fwPvRange_INCLUSIVE_MAXIMUM fwPvRange_MINIMUM_VALUE fwPvRange_MAXIMUM_VALUE

For value set PV ranges, the following object fields must also be filled: fwPvRange_VALUE_SET

For min-max PV ranges, the following object fields must also be filled: fwPvRange_VALUE_PATTERN

Parameters:
exceptionInfo details of any errors are returned here
fwPvRange_setObject ( string  dpe,
int  pvRangeType,
dyn_anytype  configData,
dyn_string &  exceptionInfo 
)

Sets the PV range config for the given data point element

Example
Set a good range from 0 to 100 included.
dyn_string exceptionInfo;
dyn_anytype configData;
configData[fwPvRange_NEGATE_RANGE] = false; //the values inside range are good
configData[fwPvRange_IGNORE_OUTSIDE] = true;
configData[fwPvRange_INCLUSIVE_MINIMUM] = true;
configData[fwPvRange_INCLUSIVE_MAXIMUM] = true;
configData[fwPvRange_MINIMUM_VALUE] = 0;
configData[fwPvRange_MAXIMUM_VALUE] = 100;
configData[fwPvRange_VALUE_SET] = makeDynFloat();
configData[fwPvRange_VALUE_PATTERN] = "";
fwPvRange_setObject("test_alarms:testPV_01.value", DPCONFIG_MINMAX_PVSS_RANGECHECK, configData, exceptionInfo);
Constraints
None
Usage
Public
PVSS managers
VISION, CTRL
Parameters:
dpe data point element
pvRangeType types of PV range to set. The value can be one of: DPCONFIG_MINMAX_PVSS_RANGECHECK DPCONFIG_SET_PVSS_RANGECHECK DPCONFIG_MATCH_PVSS_RANGECHECK
configData configuration object for the dpe is passed here Constants are used to identify the data inside the object. For all PV range configurations the configData object must contain values for: fwPvRange_NEGATE_RANGE - e.g. configData[fwPvRange_NEGATE_RANGE] = TRUE; fwPvRange_IGNORE_OUTSIDE For min-max PV ranges, the following object fields must also be filled: fwPvRange_INCLUSIVE_MINIMUM fwPvRange_INCLUSIVE_MAXIMUM fwPvRange_MINIMUM_VALUE fwPvRange_MAXIMUM_VALUE For value set PV ranges, the following object fields must also be filled: fwPvRange_VALUE_SET For min-max PV ranges, the following object fields must also be filled: fwPvRange_VALUE_PATTERN
exceptionInfo details of any errors are returned here
fwPvRange_getObject ( string  dpe,
bool &  configExists,
int &  pvRangeType,
dyn_anytype &  configData,
dyn_string &  exceptionInfo 
)

Gets the PV range config from the given data point element

Constraints
None
Usage
Public
PVSS managers
VISION, CTRL
Parameters:
dpe data point element
configExists TRUE if PV Range config exists, else FALSE
pvRangeType types of PV range is returned here. The value can be one of: DPCONFIG_MINMAX_PVSS_RANGECHECK DPCONFIG_SET_PVSS_RANGECHECK DPCONFIG_MATCH_PVSS_RANGECHECK
configData configuration object for the dpe is returned here Constants are used to identify the data inside the object.

For all PV range configurations the configData object will contain values for: fwPvRange_NEGATE_RANGE - e.g. rangeNegated = configData[fwPvRange_NEGATE_RANGE]; fwPvRange_IGNORE_OUTSIDE

For min-max PV ranges, the following object fields will also be filled: fwPvRange_INCLUSIVE_MINIMUM fwPvRange_INCLUSIVE_MAXIMUM fwPvRange_MINIMUM_VALUE fwPvRange_MAXIMUM_VALUE

For value set PV ranges, the following object fields will also be filled: fwPvRange_VALUE_SET

For min-max PV ranges, the following object fields will also be filled: fwPvRange_VALUE_PATTERN

Parameters:
exceptionInfo details of any errors are returned here
fwPvRange_getObjectMany ( dyn_string  dpes,
dyn_bool &  configExists,
dyn_int &  pvRangeTypes,
dyn_dyn_anytype &  configData,
dyn_string &  exceptionInfo 
)

Gets the PV range configs for the given data point elements

Constraints
None
Usage
Public
PVSS managers
VISION, CTRL
Parameters:
dpes list of data point elements
configExists list of bools, TRUE if PV Range config exists, else FALSE
pvRangeTypes list of types of PV range is returned here. The values can be one of: DPCONFIG_MINMAX_PVSS_RANGECHECK DPCONFIG_SET_PVSS_RANGECHECK DPCONFIG_MATCH_PVSS_RANGECHECK
configData configuration object for each of the dpes is returned here The first dimension of the array defines which dpe the object relate to. e.g. configData[1] contains the configuration object from dpes[1] Constants are used to identify the data inside the object.

For all PV range configurations the configData object will contain values for: fwPvRange_NEGATE_RANGE - e.g. rangeNegated = configData[1][fwPvRange_NEGATE_RANGE]; fwPvRange_IGNORE_OUTSIDE

For min-max PV ranges, the following object fields will also be filled: fwPvRange_INCLUSIVE_MINIMUM fwPvRange_INCLUSIVE_MAXIMUM fwPvRange_MINIMUM_VALUE fwPvRange_MAXIMUM_VALUE

For value set PV ranges, the following object fields will also be filled: fwPvRange_VALUE_SET

For min-max PV ranges, the following object fields will also be filled: fwPvRange_VALUE_PATTERN

Parameters:
exceptionInfo details of any errors are returned here
_fwPvRange_get ( dyn_string  dpes,
dyn_bool &  configExists,
dyn_int &  pvRangeTypes,
dyn_dyn_anytype &  configData,
dyn_string &  exceptionInfo 
)

Gets the PV range configs for the given data point elements

Constraints
None
Usage
Internal
PVSS managers
VISION, CTRL
Parameters:
dpes list of data point elements
configExists list of bools, TRUE if PV Range config exists, else FALSE
pvRangeTypes list of types of PV range is returned here. The values can be one of: DPCONFIG_MINMAX_PVSS_RANGECHECK DPCONFIG_SET_PVSS_RANGECHECK DPCONFIG_MATCH_PVSS_RANGECHECK
configData configuration object for each dpe is returned here. The first dimension of the array defines which dpe the object relate to. e.g. configData[1] contains the configuration object for dpes[1] Constants are used to identify the data inside the object.
exceptionInfo details of any errors are returned here
fwPvRange_deleteMultiple ( dyn_string  dpes,
dyn_string &  exceptionInfo 
)

Deletes the PV range config for the given data point elements

Constraints
None
Usage
Public
PVSS managers
VISION, CTRL
Parameters:
dpes list of data point elements
exceptionInfo details of any errors are returned here
fwPvRange_deleteMany ( dyn_string  dpes,
dyn_string &  exceptionInfo 
)

Deletes the PV range config for the given data point elements

Constraints
None
Usage
Public
PVSS managers
VISION, CTRL
Parameters:
dpes list of data point elements
exceptionInfo details of any errors are returned here
fwPvRange_delete ( string  dpe,
dyn_string &  exceptionInfo 
)

Deletes the PV range config for the given data point element

Constraints
None
Usage
Public
PVSS managers
VISION, CTRL
Parameters:
dpe data point element
exceptionInfo details of any errors are returned here
fwPvRange_setMany ( dyn_string &  dpes,
dyn_float &  minValue,
dyn_float &  maxValue,
dyn_bool &  negateRange,
dyn_bool &  ignoreOutside,
dyn_bool &  inclusiveMin,
dyn_bool &  inclusiveMax,
dyn_string &  exceptionInfo 
)

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! DEPRECATED function - use fwPvRange_setObjectMany instead

Constraints
None
Usage
DEPRECATED
PVSS managers
VISION, CTRL
Parameters:
dpes list of data point elements. Passed as reference only for performance reasons. Not modified.
minValue list of lower limit for the range. Passed as reference only for performance reasons. Not modified.
maxValue list of upper limit for the range. Passed as reference only for performance reasons. Not modified.
negateRange list of bools, TRUE for "reverse (negate) value-range handling" . Passed as reference only for performance reasons. Not modified.
ignoreOutside list of bools, TRUE when "invalid values should be ignored". Passed as reference only for performance reasons. Not modified.
inclusiveMin list of bools, TRUE when "minimum value included in the value range". Passed as reference only for performance reasons. Not modified.
inclusiveMax list of bools, TRUE when "maximum value included in the value range". Passed as reference only for performance reasons. Not modified.
exceptionInfo details of any errors are returned here
fwPvRange_setMultiple ( dyn_string  dpes,
float  minValue,
float  maxValue,
bool  negateRange,
bool  ignoreOutside,
bool  inclusiveMin,
bool  inclusiveMax,
dyn_string &  exceptionInfo 
)

DEPRECATED function - use fwPvRange_setObjectMultiple instead

Constraints
None
Usage
DEPRECATED
PVSS managers
VISION, CTRL
Parameters:
dpes list of data point elements
minValue lower limit for the range
maxValue upper limit for the range
negateRange TRUE for "reverse (negate) value-range handling"
ignoreOutside TRUE when "invalid values should be ignored"
inclusiveMin TRUE when "minimum value included in the value range"
inclusiveMax TRUE when "maximum value included in the value range"
exceptionInfo details of any errors are returned here
fwPvRange_set ( string  dpe,
float  minValue,
float  maxValue,
bool  negateRange,
bool  ignoreOutside,
bool  inclusiveMin,
bool  inclusiveMax,
dyn_string &  exceptionInfo 
)

DEPRECATED function - use fwPvRange_setObject instead

Constraints
None
Usage
DEPRECATED
PVSS managers
VISION, CTRL
Parameters:
dpe data point element
minValue lower limit for the range
maxValue upper limit for the range
negateRange TRUE for "reverse (negate) value-range handling"
ignoreOutside TRUE when "invalid values should be ignored"
inclusiveMin TRUE when "minimum value included in the value range"
inclusiveMax TRUE when "maximum value included in the value range"
exceptionInfo details of any errors are returned here
fwPvRange_get ( string  dpe,
bool &  configExists,
float &  minValue,
float &  maxValue,
bool &  negateRange,
bool &  ignoreOutside,
bool &  inclusiveMin,
bool &  inclusiveMax,
dyn_string &  exceptionInfo 
)

DEPRECATED function - use fwPvRange_getObject instead

Constraints
None
Usage
DEPRECATED
PVSS managers
VISION, CTRL
Parameters:
dpe data point element
configExists TRUE if PV Range config exists, else FALSE
minValue lower limit for the range
maxValue upper limit for the range
negateRange TRUE for "reverse (negate) value-range handling"
ignoreOutside TRUE when "invalid values should be ignored"
inclusiveMin TRUE when "minimum value included in the value range"
inclusiveMax TRUE when "maximum value included in the value range"
exceptionInfo details of any errors are returned here
fwPvRange_getMany ( dyn_string &  dpes,
dyn_bool &  configExists,
dyn_float &  minValue,
dyn_float &  maxValue,
dyn_bool &  negateRange,
dyn_bool &  ignoreOutside,
dyn_bool &  inclusiveMin,
dyn_bool &  inclusiveMax,
dyn_string &  exceptionInfo 
)

DEPRECATED function - use fwPvRange_getObjectMany instead

Constraints
None
Usage
DEPRECATED
PVSS managers
VISION, CTRL
Parameters:
dpes list of data point elements. Passed as reference only for performance reasons. Not modified.
configExists list of bools, TRUE if PV Range config exists, else FALSE
minValue list of lower limit for the range
maxValue list of upper limit for the range
negateRange list of bools, TRUE for "reverse (negate) value-range handling"
ignoreOutside list of bools, TRUE when "invalid values should be ignored"
inclusiveMin list of bools, TRUE when "minimum value included in the value range"
inclusiveMax list of bools, TRUE when "maximum value included in the value range"
exceptionInfo details of any errors are returned here

Variable Documentation

const unsigned fwPvRange_MINIMUM_VALUE = 1
const unsigned fwPvRange_MAXIMUM_VALUE = 2
const unsigned fwPvRange_VALUE_SET = 3
const unsigned fwPvRange_VALUE_PATTERN = 4
const unsigned fwPvRange_NEGATE_RANGE = 5
const unsigned fwPvRange_IGNORE_OUTSIDE = 6
const unsigned fwPvRange_INCLUSIVE_MINIMUM = 7
const unsigned fwPvRange_INCLUSIVE_MAXIMUM = 8

Generated on 10 Dec 2015 for fwConfigs by  doxygen 1.6.1