EcuDefinition

Type: EcuDefinition

Represents the ECU Definition File and provides access to structures in the ECU such as EcuMap, EcuTable, EcuOption, EcuChannel.

Related Types

Properties

PropertyDescription
calNameSize Length of the calibration name structure.
canWriteWords Indicates if the ECU supports writes larger than single byte writes.
categories EcuItemCollection of all EcuCategory objects.
channelCount Number of EcuChannel objects.
channelTableCount Number of EcuChannelTable objects.
channels EcuItemCollection of all EcuChannel objects.
channeltables EcuItemCollection of all EcuChannel objects.
ecustrings EcuItemCollection of all EcuString objects.
enumerationCount Number of 'EcuEnumeration' objects.
fileName The path of the installed ECU Definition file on the file system.
fullName The full name of the ECU (same as def.name + def.version)
isBigEndian Indicates if the ECU uses 'big endian' values.
isSecurable Indicates if the ECU can have a password set.
logMapCount Number of EcuLogMap objects.
logbufferSize Size of the LOGTBL structure used for fast channel reads.
logmaps EcuItemCollection of all EcuLogMap objects.
logmaptargets EcuItemCollection of all EcuLogMapTarget objects.
mapCount Number of EcuMap objects.
maps EcuItemCollection of all EcuMap objects.
name The name of the ECU (e.g. 'EVO X '), for non-XCP ECUs this is always 8 characters long and padded with spaces.
optionCount Number of EcuOption objects.
optionListCount [deprecated] Alias of enumerationCount.
options EcuItemCollection of all EcuOption objects.
parameterCount [deprecated] Alias of channelCount.
parameterTableCount [deprecated] Alias of channelTableCount.
parameters [deprecated] alias of channels
regionCount Number of EcuRegion objects.
regions EcuItemCollection of all EcuRegion objects.
stringCount Number of EcuString objects.
tableCount Number of EcuTable objects.
tables EcuItemCollection of all EcuTable objects.
userScalarCount Number of EcuUserScalar objects.
userscalars EcuItemCollection of all EcuUserScalar objects.
usesNewModifiers Legacy flag relating to Modifier EcuChannels.
version The version of the ECU (e.g. '01v00')

Subsections of EcuDefinition

EcuCategory

Type: EcuCategory

Extends EcuItemIndexed

Script class for Category objects in the ECU Definition file.

Categories define logical groupings of objects that derive from EcuItemIndexed.

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.
displayName The category Display Name
parentIndex The index of the parent Category.

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.

EcuChannel

Type: EcuChannel

Extends EcuObjectScaled

Script class for Channel objects in the ECU Definition file.

Channels are single-valued (scalar) measurements.

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 Channel (ECU internal units).
real

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

tip:

Alias of the 'value' property

text Get/set the textual (string) value of the Channel.
value Get/set the real value of the Channel (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.

EcuChannelTable

Type: EcuChannelTable

Extends EcuObjectScaled

Script class for ChannelTable objects in the ECU Definition file.

EcuChannelTables are a vector of EcuChannel objects.

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.

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.

EcuItem

Type: EcuItem

Base class for all ECU Definition objects.

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.

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.

EcuItemCollection

Type: EcuItemCollection

Various items such as Table / Map / Option / Channel stored in Gin or Ecu are within EcuItemCollections.

Properties

PropertyDescription
length The number of items in the collection.

Methods

MethodDescription
at(index) Get the object at the given index. e.g. gin.maps.at(0) returns the first item in the collection.
find(name) Find the sub object with the given name. e.g. gin.maps.find('fuel'). The search is case-insensitive.
indexOf(object) Given an object that is stored in the collection, return its index.

EcuItemIndexed

Type: EcuItemIndexed

Extends EcuItem

Base class for some ECU Definition objects.

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.

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.

EcuLogMap

Type: EcuLogMap

Extends EcuItemIndexed

Script class for LogMap objects in the ECU Definition file.

LogMaps are multi-valued objects with a two axes (matrix) and store the recorded value of a channel within their sites.

The values are stored on the PC, not the ECU.

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.

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.

EcuLogMapTarget

Type: EcuLogMapTarget

Extends EcuItemIndexed

Script class for LogMapTarget objects in the ECU Definition file.

LogMapTargets are multi-valued objects with two axes (matrix) and store the calibration target value of a channel within their sites.

The values are stored on the PC, not the ECU.

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.

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.

EcuMap

Type: EcuMap

Extends EcuObjectScaled

Script class for Map objects in the ECU Definition file.

Maps are multi-valued objects with two axes (matrix).

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.

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.

EcuObject

Type: EcuObject

Extends EcuItemIndexed

Base class for some ECU Definition objects.

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.

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.

EcuObjectScaled

Type: EcuObjectScaled

Extends EcuObject

Base class for some ECU Definition objects.

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.

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.

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.

EcuRegion

Type: EcuRegion

Extends EcuItemIndexed

Script class for Region objects in the ECU Definition file.

Regions define memory regions within the ECU.

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.

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.

EcuString

Type: EcuString

Extends EcuObject

Script class for EcuString objects in the ECU Definition file.

EcuStrings are multi-valued objects with a single dimension (vector) and typically contain a short text string.

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.

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.

EcuTable

Type: EcuTable

Extends EcuObjectScaled

Script class for Table objects in the ECU Definition file.

Tables are multi-valued objects with a single axis (vector).

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.

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.

EcuUserScalar

Type: EcuUserScalar

Extends EcuItemIndexed

Script class for UserScalar ECU Definition objects.

UserScalars define alternative units and scaling for EcuObjectScaled derived objects.

Scaling can potentially be variable, via EcuOptions, depending upon the UserScalar definition

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.
c offset in object scaling y = mx + c.
isFloatingPoint 'true' if the object value is be displayed with a decimal point.
m multiplier in object scaling y = mx + c.

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.
apply(value [, axes])

Apply the user scalar's scaling function to the given value at the [optional] site position.

Some scalars are not the same for different sites (for example the duty cycle scalar on the fuel map). Such scalars are rare and in most cases the axes argument can be omitted.

applyInverse(value [, axes])

The inverse function of 'apply'.