SIMulation Workbench Documentation SIMulation Workbench Documentation

EUConversion Struct Reference
[RTDB Access API]

#include <simrtdb.h>

Public Member Functions

double numerators[EU_MAXPOLYNOMIAL] __attribute__ ((aligned(8)))
double denominators[EU_MAXPOLYNOMIAL] __attribute__ ((aligned(8)))
double rangesX[EU_MAXTABLEENTRIES] __attribute__ ((aligned(8)))
double rangesY[EU_MAXTABLEENTRIES] __attribute__ ((aligned(8)))
double rangesInvertedX[EU_MAXTABLEENTRIES] __attribute__ ((aligned(8)))
double rangesInvertedY[EU_MAXTABLEENTRIES] __attribute__ ((aligned(8)))
double directA __attribute__ ((aligned(8)))
double directB __attribute__ ((aligned(8)))
double inverseA __attribute__ ((aligned(8)))
double inverseB __attribute__ ((aligned(8)))

Data Fields

int hashIndex
char name [MAX_EUCONVERSIONNAME]
int type
int flags
int nRanges
char description [MAX_DESCRIPTIONLEN]
char engUnits [MAX_EUNITSLEN]

Detailed Description

Engineering conversion record held in shared memory. This is indexed via a separate hash table pointed to in the EUFactors meta data. This defines a conversion from physical (Engineering units) to raw via either a rational polynomial function as raw = (a*X^2 + b*X + c)/(d*X^2 + e*X + F) or
an interpolation table defined in rangesX and rangesY.
When the polynomial is different from strictly linear , i.e. A*X + B, this function cannot be inverted and therefore cannot be used to convert from physical to raw units.


Member Function Documentation

double numerators [EU_MAXPOLYNOMIAL] EUConversion::__attribute__ ( (aligned(8))   ) 

a,b,c coefficients.

double denominators [EU_MAXPOLYNOMIAL] EUConversion::__attribute__ ( (aligned(8))   ) 

d,e,f coefficients.

double rangesX [EU_MAXTABLEENTRIES] EUConversion::__attribute__ ( (aligned(8))   ) 
double rangesY [EU_MAXTABLEENTRIES] EUConversion::__attribute__ ( (aligned(8))   ) 
double rangesInvertedX [EU_MAXTABLEENTRIES] EUConversion::__attribute__ ( (aligned(8))   ) 
double rangesInvertedY [EU_MAXTABLEENTRIES] EUConversion::__attribute__ ( (aligned(8))   ) 
double directA EUConversion::__attribute__ ( (aligned(8))   ) 

For linear conversion only. Those are calculated a load time. Raw = directA * Physical_value + directB .

double directB EUConversion::__attribute__ ( (aligned(8))   ) 
double inverseA EUConversion::__attribute__ ( (aligned(8))   ) 

For linear conversion only. Pysical_value = inverseA * Raw + inverseB .

double inverseB EUConversion::__attribute__ ( (aligned(8))   ) 

Field Documentation

Index # in hash table for this item

char EUConversion::name[MAX_EUCONVERSIONNAME]

Name of this conversion.

Type of conversion

See also:
EUConversionType. By default, conversion is physical to raw. raw to physical to raw defined by oring with EU_RAWTOPHYSICAL

Whether the polynomial is linear and can be inverted.

Number of entries in interpolation table.

char EUConversion::description[MAX_DESCRIPTIONLEN]

Conversion description

char EUConversion::engUnits[MAX_EUNITSLEN]

Engineering unit descriptor for physical units.


The documentation for this struct was generated from the following file: