fwConfigs
 All Files Functions Variables Groups Pages
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_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

Referenced by fwConfigConversion_setMany().

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

References fwConfigConversion_deleteMany().

Referenced by fwMsgConv_delete().

+ Here is the call graph for this function:

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

References _fwConfigs_checkAreConfigsAccessible(), _fwConfigs_convertDriverNumbersToErrorMessage(), and _fwConfigs_delete().

Referenced by fwConfigConversion_delete(), and fwConfigConversion_deleteMultiple().

+ Here is the call graph for this function:

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

References fwConfigConversion_deleteMany().

+ Here is the call graph for this function:

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

References _fwConfigs_checkAreConfigsAccessible(), and _fwConfigs_convertDriverNumbersToErrorMessage().

Referenced by fwMsgConv_get().

+ Here is the call graph for this function:

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

References _fwConfigs_checkAreConfigsAccessible(), and _fwConfigs_convertDriverNumbersToErrorMessage().

+ Here is the call graph for this function:

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

References fwConfigConversion_setMany().

Referenced by fwMsgConv_set().

+ Here is the call graph for this function:

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

References _fwConfigConversion_prepareSet(), _fwConfigs_checkAreConfigsAccessible(), and _fwConfigs_convertDriverNumbersToErrorMessage().

Referenced by fwConfigConversion_set(), and fwConfigConversion_setMultiple().

+ Here is the call graph for this function:

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

References fwConfigConversion_setMany().

+ Here is the call graph for this function:

fwMsgConv_delete ( string  dpe,
dyn_string &  exceptionInfo 
)

DEPRECATED - Function to delete a message conversion config

For new function see fwConfigConversion_delete

References fwConfigConversion_delete().

+ Here is the call graph for this function:

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

References fwConfigConversion_get().

+ Here is the call graph for this function:

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

References fwConfigConversion_set().

+ Here is the call graph for this function: