Real-Time API Revision2025.1-3
Loading...
Searching...
No Matches
EUConversion Struct Reference

#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

◆ __attribute__() [1/10]

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

a,b,c coefficients.

◆ __attribute__() [2/10]

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

d,e,f coefficients.

◆ __attribute__() [3/10]

double rangesX[EU_MAXTABLEENTRIES] EUConversion::__attribute__ ( (aligned(8)) )

◆ __attribute__() [4/10]

double rangesY[EU_MAXTABLEENTRIES] EUConversion::__attribute__ ( (aligned(8)) )

◆ __attribute__() [5/10]

double rangesInvertedX[EU_MAXTABLEENTRIES] EUConversion::__attribute__ ( (aligned(8)) )

◆ __attribute__() [6/10]

double rangesInvertedY[EU_MAXTABLEENTRIES] EUConversion::__attribute__ ( (aligned(8)) )

◆ __attribute__() [7/10]

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

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

◆ __attribute__() [8/10]

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

◆ __attribute__() [9/10]

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

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

◆ __attribute__() [10/10]

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

Field Documentation

◆ hashIndex

int EUConversion::hashIndex

Index # in hash table for this item

◆ name

char EUConversion::name[MAX_EUCONVERSIONNAME]

Name of this conversion.

◆ type

int EUConversion::type

Type of conversion

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

◆ flags

int EUConversion::flags

Whether the polynomial is linear and can be inverted.

◆ nRanges

int EUConversion::nRanges

Number of entries in interpolation table.

◆ description

char EUConversion::description[MAX_DESCRIPTIONLEN]

Conversion description

◆ engUnits

char EUConversion::engUnits[MAX_EUNITSLEN]

Engineering unit descriptor for physical units.


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