EcuOption

Type: EcuOption

Extends EcuObjectScaled

Script class for Option objects in the ECU Definition file.

Options are single-valued (scalar) calibration values.

Properties

PropertyDescription
axes Array of the object's axes, elements are of type EcuItem.
axisCount The number of axes this object has (0 for options/channels, 1 for tables, 2 for maps).
description Description text for the object, normally displayed in the Descriptions view.
isConvertibleToReal 'true' if the value of this object has a conversion from raw (internal) to real (physical).
name The name of the object - e.g. 'Fuel' for the Fuel Map.
outputValue Interpolated output value. For tables / maps this is the linearly interpolated value at the current axes position. For options / channels this is the current value.
siteCount The total number of sites in the object.
typeName The internal type name of the object - e.g. 'Table' or 'Map'.
units The physical units of 'real' values in the object.
dependencyCount Number of sub-object dependencies.
displayIdentifier Display Identifier of this item.
ginIndex Index of this item within the EcuItemCollection for the object type in ECU Definition.
identifier Identifier of this item.
isIgnoredInCompareAndConvert 'true' if this object is not used in Compare / Convert Calibration operations, typically because it is aliased with another value at the same address.
longIdentifier Long Identifier of this item.
address Address of the object within the calibration data.
elementSizeBytes Number of bytes occupied by each individual site in the object.
hasEnumeration 'true' if the object has an Enumeration list (named discrete values).
isBit 'true' if the object corresponds to a single bit (e.g. an on/off Option).
isReadOnly 'true' if the value of the object may only be read and not written.
isSigned 'true' if the raw value is signed (2's complement).
maxRaw Maximum raw (ECU internal) value.
maxReal Maximum real (scaled in physical units) value
minRaw Minimum raw (ECU internal) value.
minReal Minimum real (scaled in physical units) value
profileCount Number of 'profiles' defined for this object.
c offset in object scaling y = mx + c.
hasFunctionTable 'true' if the object is scaled via a static function table (lookup table).
hasUserScalar 'true' if the object is scaled by a UserScalar.
isCommCode 'true' if the object can hold the address of a channel.
isFloatingPoint 'true' if the object value can be displayed with a decimal point.
isFloatingPointRaw 'true' if the object value can be displayed with a decimal point (does not take into account user scalars).
isMasked 'true' if the object has a bit mask.
isReciprocal 'true' if the scaling function is a reciprocal rather than y= mx + c.
m multiplier in object scaling y = mx + c.
mask Bitmask value. Due to limitations of JavaScript, this may be ill-defined for 64bit values.
maximum maximum value of the object.
minimum minimum value of the object.
raw Get/set the raw value of the Option (ECU internal units).
real

Get/set the real value of the Option (scaled in physical units).

tip:

Alias of the 'value' property

text Get/set the textual (string) value of the Option.
value Get/set the real value of the Option (scaled in physical units). tip:

Alias of the 'real' property

Methods

MethodDescription
getAttribute(name) Get value of attribute with the given name
getAxisChannel(index) Get the channel (if any) for the given axis of the object.
getAxisPosition(index) Get the floating point position for the current input channel value for the given axis of the object.
getRaw(axes) Get the raw (internal) value at the specified site. 'axes' is an array of the [x,y] site in the object. Can be omitted for objects without axes (e.g. Options). The array can be passed inline - e.g. getRaw({2, 4}).
getReal(axes) Get the real (scaled to physical units) value at the specified site.
getString(axes) Get a textual representation of the value at the specified site.
getText(axes) Get a textual representation of the value at the specified site. Alias of getString.
hasAttribute(name) Determine of object has an attribute with the given name
rawFromReal(value, axes) Convert a real value to a raw value, given the scaling function for the site specified by 'axes'.
realFromRaw(value, axes) Convert a raw value to a real value, given the scaling function for the site specified by 'axes'.
rescale(multiplier, offset) Rescale the real value of all sites in the object by the given multiplier and offset.
setRaw(value, axes) Set the raw (internal) value at the specified site.
setReal(value, axes) Set the real (scaled to physical units) value at the specified site.
setString(value, axes) Set the textual value at the specified site.
setText(value, axes) Set the textual value at the specified site. Alias of setString.
getComcodeChannel()

For options that select a channel, dereference to find the pointed-to channel.