fwConfigs  8.4.5
fwConfigConversion.ctl File Reference

Functions

 fwConfigConversion_setMany (dyn_string &dpes, dyn_int &configType, dyn_int &conversionType, dyn_int &order, dyn_dyn_float &arguments, dyn_string &exceptionInfo, bool runDriverCheck=FALSE)
 
 fwConfigConversion_setMultiple (dyn_string dpes, int configType, int conversionType, int order, dyn_float arguments, dyn_string &exceptionInfo, bool runDriverCheck=FALSE)
 
 fwConfigConversion_set (string dpe, int configType, int conversionType, int order, dyn_float arguments, dyn_string &exceptionInfo, bool runDriverCheck=FALSE)
 
 _fwConfigConversion_prepareSet (string dpe, int configType, int conversionType, int order, dyn_float arguments, dyn_string &attributes, dyn_anytype &values, dyn_string &exceptionInfo)
 
 fwConfigConversion_get (string dpe, bool &configExists, int configType, int &conversionType, int &order, dyn_float &arguments, dyn_string &exceptionInfo)
 
 fwConfigConversion_getMany (dyn_string &dpes, dyn_bool &configExists, int configType, dyn_int &conversionType, dyn_int &order, dyn_dyn_float &arguments, dyn_string &exceptionInfo)
 
 fwConfigConversion_deleteMultiple (dyn_string dpes, int configType, dyn_string &exceptionInfo)
 
 fwConfigConversion_deleteMany (dyn_string dpes, int configType, dyn_string &exceptionInfo)
 
 fwConfigConversion_delete (string dpe, int configType, dyn_string &exceptionInfo)
 
 fwMsgConv_set (string dpe, int conversionType, int order, dyn_float arguments, dyn_string &exceptionInfo)
 
 fwMsgConv_get (string dpe, bool &doesExist, int &conversionType, int &order, dyn_float &arguments, dyn_string &exceptionInfo)
 
 fwMsgConv_delete (string dpe, dyn_string &exceptionInfo)
 

Detailed Description

Library to manage the Message Conversion and Command Conversion configs of PVSS.

Creation Date
24/04/2002
Modification History

12/08/2011 Marco Boccioli

  • {85462}: Functions *_setMany and *_getMany with parameters as reference.
  • {85465}: Improved performance for fwConfigConversion_getMany()

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

  • Updated library to be consistent with other configs
Constraints
Currently there can only be one conversion of each type per dpe (Message/Command). Only Polynomial, Base Curve and Invert conversion types are supported.
Usage
Public
PVSS managers
VISION, CTRL
Author
Manuel Gonzalez-Berges, Oliver Holme (IT-CO) from fwMsgConv.ctl by Herve Milcent, Niko Karlsson

Function Documentation

fwConfigConversion_setMany ( dyn_string &  dpes,
dyn_int &  configType,
dyn_int &  conversionType,
dyn_int &  order,
dyn_dyn_float &  arguments,
dyn_string &  exceptionInfo,
bool  runDriverCheck = FALSE 
)
Creates a conversion config for the given data point elements.
Constraints
Currently there can only be one conversion of each type per dpe (Message/Command). Only Polynomial and Base Curve conversion types are supported.
Usage
Public
PVSS managers
VISION, CTRL
Parameters
dpeslist of data point elements. Passed as reference only for performance reasons. Not modified.
configTypeDPCONFIG_CONVERSION_RAW_TO_ENG_MAIN = message conversion (raw value => engineering value)
DPCONFIG_CONVERSION_ING_TO_RAW_MAIN = command conversion (engineering value => raw value)
Passed as reference only for performance reasons. Not modified.
conversionTypeDPDETAIL_CONV_POLY = polynomial conversion
DPDETAIL_CONV_LIN_INT = base curve conversion
DPDETAIL_CONV_INVERT = invert conversion (for boolean DPEs only)
Passed as reference only for performance reasons. Not modified.
orderorder of polynomial (polynomial conversion) or number of supporting points (base curve conversion) Passed as reference only for performance reasons. Not modified..
argumentslist of arguments
For polynomials, arguments are the coefficients (number of arguments should equal order + 1)
For base curve, the arguments give the points of the curve eg. {x1, y1, x2, y2}. (number of arguments should equal order * 2)
Passed as reference only for performance reasons. Not modified.
exceptionInforeturns details of any errors
runDriverCheckOptional parameter (default value = FALSE) - TRUE to check if driver is running before setting config, else FALSE
The necessary driver number must be running in order to successfully create config
fwConfigConversion_setMultiple ( dyn_string  dpes,
int  configType,
int  conversionType,
int  order,
dyn_float  arguments,
dyn_string &  exceptionInfo,
bool  runDriverCheck = FALSE 
)
Creates a conversion config for the given data point elements.
Constraints
Currently there can only be one conversion of each type per dpe (Message/Command). Only Polynomial and Base Curve conversion types are supported.
Usage
Public
PVSS managers
VISION, CTRL
Parameters
dpeslist of data point elements
configTypeDPCONFIG_CONVERSION_RAW_TO_ENG_MAIN = message conversion (raw value => engineering value)
DPCONFIG_CONVERSION_ING_TO_RAW_MAIN = command conversion (engineering value => raw value)
conversionTypeDPDETAIL_CONV_POLY = polynomial conversion
DPDETAIL_CONV_LIN_INT = base curve conversion
DPDETAIL_CONV_INVERT = invert conversion (for boolean DPEs only)
orderorder of polynomial (polynomial conversion) or number of supporting points (base curve conversion)
argumentslist of arguments
For polynomials, arguments are the coefficients (number of arguments should equal order + 1)
For base curve, the arguments give the points of the curve eg. {x1, y1, x2, y2}. (number of arguments should equal order * 2)
exceptionInforeturns details of any errors
runDriverCheckOptional parameter (default value = FALSE) - TRUE to check if driver is running before setting config, else FALSE
The necessary driver number must be running in order to successfully create config
fwConfigConversion_set ( string  dpe,
int  configType,
int  conversionType,
int  order,
dyn_float  arguments,
dyn_string &  exceptionInfo,
bool  runDriverCheck = FALSE 
)
Creates a conversion config for a given data point element.
Constraints
Currently there can only be one conversion of each type per dpe (Message/Command). Only Polynomial and Base Curve conversion types are supported.
Usage
Public
PVSS managers
VISION, CTRL
Parameters
dpedata point element
configTypeDPCONFIG_CONVERSION_RAW_TO_ENG_MAIN = message conversion (raw value => engineering value)
DPCONFIG_CONVERSION_ING_TO_RAW_MAIN = command conversion (engineering value => raw value)
conversionTypeDPDETAIL_CONV_POLY = polynomial conversion
DPDETAIL_CONV_LIN_INT = base curve conversion
DPDETAIL_CONV_INVERT = invert conversion (for boolean DPEs only)
orderorder of polynomial (polynomial conversion) or number of supporting points (base curve conversion)
argumentslist of arguments
For polynomials, arguments are the coefficients (number of arguments should equal order + 1)
For base curve, the arguments give the points of the curve eg. {x1, y1, x2, y2}. (number of arguments should equal order * 2)
exceptionInforeturns details of any errors
runDriverCheckOptional parameter (default value = FALSE) - TRUE to check if driver is running before setting config, else FALSE
The necessary driver number must be running in order to successfully create config
_fwConfigConversion_prepareSet ( string  dpe,
int  configType,
int  conversionType,
int  order,
dyn_float  arguments,
dyn_string &  attributes,
dyn_anytype &  values,
dyn_string &  exceptionInfo 
)
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
Currently there can only be one conversion of each type per dpe (Message/Command). Only Polynomial and Base Curve conversion types are supported.
Usage
Internal
PVSS managers
VISION, CTRL
Parameters
dpedata point element
configTypeDPCONFIG_CONVERSION_RAW_TO_ENG_MAIN = message conversion (raw value => engineering value)
DPCONFIG_CONVERSION_ING_TO_RAW_MAIN = command conversion (engineering value => raw value)
conversionTypeDPDETAIL_CONV_POLY = polynomial conversion
DPDETAIL_CONV_LIN_INT = base curve conversion
DPDETAIL_CONV_INVERT = invert conversion (for boolean DPEs only)
orderorder of polynomial (polynomial conversion) or number of supporting points (base curve conversion)
argumentslist of arguments
For polynomials, arguments are the coefficients (number of arguments should equal order + 1)
For base curve, the arguments give the points of the curve eg. {x1, y1, x2, y2}. (number of arguments should equal order * 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
exceptionInforeturns details of any errors
fwConfigConversion_get ( string  dpe,
bool &  configExists,
int  configType,
int &  conversionType,
int &  order,
dyn_float &  arguments,
dyn_string &  exceptionInfo 
)
Gets the conversion config of a given data point element.

The function checks that the relevant driver is running. If not it returns an exception saying the config could not be read.

Constraints
Currently there can only be one conversion of each type per dpe (Message/Command). Only Polynomial and Base Curve conversion types are supported.
Usage
Public
PVSS managers
VISION, CTRL
Parameters
dpedata point element
configExistsreturns TRUE if message conversion exists or FALSE if message conversion does not exist
configTypeDPCONFIG_CONVERSION_RAW_TO_ENG_MAIN = message conversion (raw value => engineering value)
DPCONFIG_CONVERSION_ING_TO_RAW_MAIN = command conversion (engineering value => raw value)
conversionTypeDPDETAIL_CONV_POLY = polynomial conversion
DPDETAIL_CONV_LIN_INT = base curve conversion
DPDETAIL_CONV_INVERT = invert conversion (for boolean DPEs only)
orderreturns degree of polynomial (polynomial conversion) or number of supporting points (base curve conversion)
argumentsreturns the list of arguments
For polynomials, arguments are the coefficients (number of arguments should equal order + 1)
For base curve, the arguments give the points of the curve eg. {x1, y1, x2, y2}. (number of arguments should equal order * 2)
exceptionInforeturns details of any errors
fwConfigConversion_getMany ( dyn_string &  dpes,
dyn_bool &  configExists,
int  configType,
dyn_int &  conversionType,
dyn_int &  order,
dyn_dyn_float &  arguments,
dyn_string &  exceptionInfo 
)
Gets the conversion config of a given list of data point elements.

The function checks that the relevant driver is running. If not it returns an exception saying the config could not be read.

Constraints
Currently there can only be one conversion of each type per dpe (Message/Command). Only Polynomial and Base Curve conversion types are supported.
Usage
Public
PVSS managers
VISION, CTRL
Parameters
dpesdata point elements. Passed as reference only for performance reasons. Not modified.
configExistsreturns TRUE if message conversion exists or FALSE if message conversion does not exist
configTypeDPCONFIG_CONVERSION_RAW_TO_ENG_MAIN = message conversion (raw value => engineering value)
DPCONFIG_CONVERSION_ING_TO_RAW_MAIN = command conversion (engineering value => raw value)
conversionTypeDPDETAIL_CONV_POLY = polynomial conversion
DPDETAIL_CONV_LIN_INT = base curve conversion
DPDETAIL_CONV_INVERT = invert conversion (for boolean DPEs only)
orderreturns degree of polynomial (polynomial conversion) or number of supporting points (base curve conversion)
argumentsreturns the list of arguments
For polynomials, arguments are the coefficients (number of arguments should equal order + 1)
For base curve, the arguments give the points of the curve eg. {x1, y1, x2, y2}. (number of arguments should equal order * 2)
exceptionInforeturns details of any errors
fwConfigConversion_deleteMultiple ( dyn_string  dpes,
int  configType,
dyn_string &  exceptionInfo 
)
Deletes the conversion config for the given data point elements
Constraints
None
Usage
Public
PVSS managers
VISION, CTRL
Parameters
dpeslist of data point elements
configTypeDPCONFIG_CONVERSION_RAW_TO_ENG_MAIN = message conversion (raw value => engineering value)
DPCONFIG_CONVERSION_ING_TO_RAW_MAIN = command conversion (engineering value => raw value)
exceptionInfodetails of any errors are returned here
fwConfigConversion_deleteMany ( dyn_string  dpes,
int  configType,
dyn_string &  exceptionInfo 
)
Deletes the conversion config for the given data point elements
Constraints
None
Usage
Public
PVSS managers
VISION, CTRL
Parameters
dpeslist of data point elements
configTypeDPCONFIG_CONVERSION_RAW_TO_ENG_MAIN = message conversion (raw value => engineering value)
DPCONFIG_CONVERSION_ING_TO_RAW_MAIN = command conversion (engineering value => raw value)
exceptionInfodetails of any errors are returned here
fwConfigConversion_delete ( string  dpe,
int  configType,
dyn_string &  exceptionInfo 
)
Deletes the conversion config for the given data point element
Constraints
None
Usage
Public
PVSS managers
VISION, CTRL
Parameters
dpedata point element
configTypeDPCONFIG_CONVERSION_RAW_TO_ENG_MAIN = message conversion (raw value => engineering value)
DPCONFIG_CONVERSION_ING_TO_RAW_MAIN = command conversion (engineering value => raw value)
exceptionInfodetails of any errors are returned here
fwMsgConv_set ( string  dpe,
int  conversionType,
int  order,
dyn_float  arguments,
dyn_string &  exceptionInfo 
)
DEPRECATED - Function to set a message conversion config

For new function see fwConfigConversion_set

fwMsgConv_get ( string  dpe,
bool &  doesExist,
int &  conversionType,
int &  order,
dyn_float &  arguments,
dyn_string &  exceptionInfo 
)
DEPRECATED - Function to get a message conversion config

For new function see fwConfigConversion_get

fwMsgConv_delete ( string  dpe,
dyn_string &  exceptionInfo 
)
DEPRECATED - Function to delete a message conversion config

For new function see fwConfigConversion_delete