Scripting

Overview

GWv4 features powerful scripting capabilities for automating calibration tasks and creating user interfaces.

This chapter provides a reference for scripting facilities.

// Inertial Measurement Unit
class ImuChannel {
    constructor(name) {
        this.channel = ecu.channel(name);
    }
    get value() { 
        return this.channel.value; 
    }
    get squared() { 
        let v = this.value;
        return v * v;
    }
}
const imu = {
    x: new ImuChannel("Acceleration x axis"),
    y: new ImuChannel("Acceleration y axis"),
    z: new ImuChannel("Acceleration z axis"),
    get squaredMagnitude(){ 
        return this.x.squared + this.y.squared + this.z.squared;
    },
    get magnitude() { 
        return Math.sqrt(this.squaredMagnitude);
    },
};
// Label onGetValue event
function onGetValue() {
    return `${imu.magnitude} [${imu.x.channel.units}]`;
}

Contents

Subsections of Scripting

Global Functions

function IncludeWizardScript(wizard_id)
Includes the script associated with the wizard ID into the current script context, this is similar to a #include directive.
function InvokeAction(action [,options])
Invoke an application action, given its action ID (see application command / menu reference). The options argument can specify ‘deferred’ / ’toggle’ boolean options.
function RunWizard(wizard_id)
Run a user-defined wizard, given its wizard ID (see application command / menu reference).
function print(message)
Prints a message to the log and pops up on screen.
function sleep(milliseconds)
Suspends execution of the script for the specified number of milliseconds. This function is only defined for scripts that execute asynchronously (Button scripts and Sequencer scripts). The actual timing resolution is fairly coarse; you can expect a sleep(1) to take significantly longer than 1 millisecond to resume due to a number of factors. One of these is Windows itself which will give a sleep granularity approaching 10ms.
function trace(message [,show_panel])
Trace the message in the status panel. If the optional argument ‘show_panel’ is provided then the auto-popup behaviour of the status panel may be suppressed.
function traceDetail(message [,show_panel])
Trace a detail message in the status panel. If the optional argument ‘show_panel’ is provided then the auto-popup behaviour of the status panel may be suppressed.
function traceError(message [,show_panel])
Trace an error message in the status panel. If the optional argument ‘show_panel’ is provided then the auto-popup behaviour of the status panel may be suppressed.

External Automation

COM Interface

GWv4 can be externally automated from a variety of programming languages such as JavaScript / VB.net / C# / C++ via its COM (ActiveX / OLE) interface.

The COM interface API documentation is currently provided as a Compressed Help (chm) file in the installation folder of GWv4 (typically /Program Files (x86)/GEMS/GWv4).

App

Type: App

Scripts have an instance of App pre-defined as a global variable called 'app'.

The App object allows a script to interact with the application, such as setting the view to full-screen mode.

Properties

PropertyDescription
isConnected Indicates if the application is currently connected to an ECU.
isDarkTheme Indicates if the application is running the dark mode UI theme.
isFreezeChannels Indicates if channel freeze is on - the UI will frreze displayed values of channels whilst in this mode.
isFreezeParameters [deprecated] alias of isFreezeChannels.
isFullScreen Indicates if the application is currently in full screen mode.

Methods

MethodDescription
beginUndoScope(name)

Undo scopes are used to group multiple changes into a single undo action.

beginUndoScope starts an undo transaction where all modifications that follow are logically grouped together.

Take care to call endUndoScope the same number of times you called beginUndoScope()

Generally it is best to use this in a try...finally statement to ensure that the undo scope is closed, even if an exception is thrown:

try { app.beginUndoScope("My Undo Scope"); // Name appears in the undo history // Make multiple modifications here ecu.option("Option1").setReal(1); ecu.option("Option2").setReal(2); } finally { app.endUndoScope(); }

closeAllCanPorts()

Close all CAN ports opened by scripting. Avoid where possible.

closeNotification(id) Close notification with the given ID.
confirmDialog(message) Pop up a modal confirmation dialog box. Returns 'true' if the user selected 'yes'.
connectEcu() Connects to an ECU using the currently configured port settings.
convertUnits(value, from, to)

Convert the units of a value, given the unit script IDs for 'from' and 'to'.

Returns the converted value or undefined if the conversion was invalid.

disconnectEcu() Closes the connection to the ECU (if connected).
endUndoScope()

Ends an undo scope. Take care to call endUndoScope the same number of times you called beginUndoScope()

error(message) Pop up a modal error dialog box.
freezeChannels(enable) Freezes channel updates on views that allow it.
freezeParameters(enable) [deprecated] alias of freezeChannels.
fullScreen(enable) Enters/exits full screen mode.
getDisplayUnits(script_unit)

Get the display units string (for labels etc) from script units ID.

e.g. app.getDisplayUnits("angle:degrees") returns °

getUnitPreference(user_scalar_name)

Get the unit preference for the given user scalar name.

Returns the unit script ID or undefined if the user scalar name is not found.

getUserSetting(key[, default_value])

Get the value of a user setting, stored globally in the application.

Keys are separated by forward slashes, e.g. "custom/area/my_setting".

Returns 'default_value' if given, or 'undefined', if the setting does not exist.

For custom settings, to avoid conflicts with application settings, prefix the setting with a unique string.

For example, if you have a setting called "my_setting", prefix it with "my_prefix/" to give "my_prefix/my_setting".

hasNotification(id) Determine if a notification with the given ID exists.
information(message) Pop up a modal information dialog box.
informationNotification(message, [options, [actions]]) Show an information notification. HTML is supported in the message. The HTML format is a simplified form, as used by wxHtmlWindow. Returns the notification ID.

Options is a table of key/value pairs. The following options are supported:

  • id - Unique identifier to use for the notification. If not provided, the ID is autogenerated.
  • timeout - the timeout in seconds. Default is 0 (no expiry).
  • icon - the icon to display. If not provided, the default icon shall be displayed for this notification type.
  • link - Callback function for links clicked in the HTML content. 1 argument with the value of the link href attribute..
  • action - Callback function for actions that do not specify an individual callback. 1 argument with the the title of the action.

Actions is an array of items for action buttons. Each item may be be a string or an array with 2 elements. The first element is the action title and the second is a callback function. Alternatively an object may be given for each item with the following properties:

  • text - the action text.
  • callback - the callback function.
  • id - value to use in options.action callback, otherwise the action text is used.
    listCanPorts()

    List available CAN ports, returns object {text,type,id}

    openCanPort(options { id, rate, data_rate, clear_queues, read:callback(frame), error:callback(e) })

    Open CAN port with given port ID

    clear_queues defaults to true, which clears the RX and TX queues of the port immediately after opening.

    readDataLog() Receive the internal log from the ECU.
    resetChannelMinMax() Resets min/max values of channels as displayed on channel lists.
    resetParameterMinMax() [deprecated] alias of resetChannelMinMax.
    setLogPlaybackPosition(time) Moves the log playback position to the given time (specified in seconds)
    setUnitPreference(user_scalar_name, unit_script_id)

    Set the unit preference for the given user scalar name.

    Returns true if the unit preference was changed, or false if the unit preference already had the given value.

    errorNotification(message, [options, [actions]]) Show an error notification. HTML is supported in the message. The HTML format is a simplified form, as used by wxHtmlWindow. Returns the notification ID.

    Options is a table of key/value pairs. The following options are supported:

    • id - Unique identifier to use for the notification. If not provided, the ID is autogenerated.
    • timeout - the timeout in seconds. Default is 0 (no expiry).
    • icon - the icon to display. If not provided, the default icon shall be displayed for this notification type.
    • link - Callback function for links clicked in the HTML content. 1 argument with the value of the link href attribute..
    • action - Callback function for actions that do not specify an individual callback. 1 argument with the the title of the action.

    Actions is an array of items for action buttons. Each item may be be a string or an array with 2 elements. The first element is the action title and the second is a callback function. Alternatively an object may be given for each item with the following properties:

    • text - the action text.
    • callback - the callback function.
    • id - value to use in options.action callback, otherwise the action text is used.
      startLogPlayback() Starts log playback of the log file loaded into the Log Transport view.
      startPCLogging() Start logging data on the PC using the current PC Logging configuration.
      stopLogPlayback() Stops log playback, if running.
      stopPCLogging() Stops PC logging, if running.
      verifyCal() Run the Verify Calibration action to check that the contents of the ECU calibration match that on the PC.
      warning(message) Pop up a modal warning dialog box.
      warningNotification(message, [options, [actions]]) Show a warning notification. HTML is supported in the message. The HTML format is a simplified form, as used by wxHtmlWindow. Returns the notification ID.

      Options is a table of key/value pairs. The following options are supported:

      • id - Unique identifier to use for the notification. If not provided, the ID is autogenerated.
      • timeout - the timeout in seconds. Default is 0 (no expiry).
      • icon - the icon to display. If not provided, the default icon shall be displayed for this notification type.
      • link - Callback function for links clicked in the HTML content. 1 argument with the value of the link href attribute..
      • action - Callback function for actions that do not specify an individual callback. 1 argument with the the title of the action.

      Actions is an array of items for action buttons. Each item may be be a string or an array with 2 elements. The first element is the action title and the second is a callback function. Alternatively an object may be given for each item with the following properties:

      • text - the action text.
      • callback - the callback function.
      • id - value to use in options.action callback, otherwise the action text is used.

        CANFrame

        Type: CANFrame

        Script class for a Can Frame.

        Properties

        PropertyDescription
        brs Flag indicating if the frame is has BRS (Bit Rate Switch) set.
        cycleTime Cycle time for the frame (as identified by 'frame.key'), in seconds.
        dataHex Get/Set the data of the frame as a hexadecimal string, with bytes separated by spaces (e.g. "01 02 03 04 05 06 07 08"). The spaces are optional when setting the value, so "0102030405060708" is also valid.
        extended Flag indicating if the frame is extended (true) or standard (false).
        fd Flag indicating if the frame is CAN-FD (EDL)
        id Get/Set the ID of the frame.
        key Get a key value suitable for use in a map or set, based on the frame ID and flags. Actual bit layout is subject to change between application versions.
        length Length of the frame in bytes. This is the number of data bytes in the frame, not including the ID or CRC.
        rtr Flag indicating if the frame is has RTR (Remote Transmission Request) set.

        Methods

        MethodDescription
        frame[index] Get / Set the data byte at the given index in the frame.
        getSignalFloatBE(start_bit, length) Get the value of a big-endian (Motorola) signal in the frame as a float, given the start bit and length in bits.
        getSignalFloatLE(start_bit, length) Get the value of a little-endian (Intel) signal in the frame as a float, given the start bit and length in bits.
        getSignalIntBE(start_bit, length) Get the value of a big-endian (Motorola) signal in the frame as a signed integer, given the start bit and length in bits.
        getSignalIntLE(start_bit, length) Get the value of a little-endian (Intel) signal in the frame as a signed integer, given the start bit and length in bits.
        getSignalUIntBE(start_bit, length) Get the value of a big-endian (Motorola) signal in the frame as an unsigned integer, given the start bit and length in bits.
        getSignalUIntLE(start_bit, length) Get the value of a little-endian (Intel) signal in the frame as an unsigned integer, given the start bit and length in bits.
        setExtID(id) Set the ID of the frame to an extended (29-bit) ID.
        setFDExtID(id) Set the ID of the frame to a CAN-FD extended (29-bit) ID.
        setFDStdID(id) Set the ID of the frame to a CAN-FD standard (11-bit) ID.
        setSignalFloatBE(start_bit, length, value) Set the value of a big-endian (Motorola) signal in the frame as a float, given the start bit and length in bits.
        setSignalFloatLE(start_bit, length, value) Set the value of a little-endian (Intel) signal in the frame as a float, given the start bit and length in bits.
        setSignalIntBE(start_bit, length, value) Set the value of a big-endian (Motorola) signal in the frame as a signed integer, given the start bit and length in bits.
        setSignalIntLE(start_bit, length, value) Set the value of a little-endian (Intel) signal in the frame as a signed integer, given the start bit and length in bits.
        setSignalUIntBE(start_bit, length, value) Set the value of a big-endian (Motorola) signal in the frame as an unsigned integer, given the start bit and length in bits.
        setSignalUIntLE(start_bit, length, value) Set the value of a little-endian (Intel) signal in the frame as an unsigned integer, given the start bit and length in bits.
        setStdID(id) Set the ID of the frame to a standard (11-bit) ID.

        CanPort

        Type: CanPort

        Script class for Can Ports (see app.openCanPort).

        Methods

        MethodDescription
        clearQueues() Clear the read and write queues of the CAN port.
        close() Close the CAN port.
        status(callback(error))) Request status of the CAN port. The callback will be called with an Error object containing the status information.
        write(frame [,callback]) Write a CAN frame to the port. Create the frame using `new CANFrame()`. Frames are read using callback specified when opening the port.

        CANRxChannel

        Type: CANRxChannel

        Script class for CAN Rx (receive) channel (obtain via ecu.canRxSetup.getChannel(n)).

        Properties

        PropertyDescription
        messageCount Get the number of CAN channels available for this setup.

        Methods

        MethodDescription
        findMessageByID(id) Find the message slot with the given CAN ID, returns -1 if not found. For extended IDs, bitwise OR the ID with 0x80000000. Returns -1 if not found.
        findUnusedMessage([start_index]) Find the first unused message slot, starting from the given index (default 0). Returns -1 if no unused message slot is found.
        getMessage(index) Get the CAN Rx Message Slot (0-based).

        CANRxMessage

        Type: CANRxMessage

        Script class for CAN Rx (receive) message slot (obtain via ecu.canRxSetup.getChannel(n).getMessage(x)).

        Properties

        PropertyDescription
        idMaskRaw Get/Set the 'raw' CAN ID mask of the message. For extended IDs, bitwise OR the ID with 0x80000000.
        idRaw Get/Set the 'raw' CAN ID of the message. For extended IDs, bitwise OR the ID with 0x80000000.
        index Get the index of this message within the list of messages for the channel.
        isExtended Get/Set the 'extended' flag of the message. If true, the ID is an extended ID (29 bits), otherwise it is a standard ID (11 bits).
        isExtendedMask Get/Set the 'extended mask' flag of the message. If true, the ID mask is an extended mask (29 bits), otherwise it is a standard mask (11 bits).
        isUnused Returns true if the message is unused, i.e. any of the received data slot channels are not referenced by any ECU options.
        isUsed Returns true if the message is used, i.e. any of the received data slot channels are referenced by any ECU options.
        slotCount Get the number of slots in the message, typically 16-bit per channel - see slotSize.
        slotSize Get the size of each slot in the message, in bytes. Typically 2 bytes per slot (16-bits).
        usedByRevision Get the revision number of the 'used by' state, useful; for lazy evaluation where it may be expensive to traverse the 'used by' list on all unrelated calibration changes.

        Methods

        MethodDescription
        getSlotChannel(index) Get the channel (of type EcuChannel) for the given slot index (0-based). Returns null if no channel is assigned.
        getSlotUsedBy(index) Get the list of ECU options that use the given slot index (0-based) in this message. Returns an empty array if no options use the slot.
        getUsedBy() Get the list of ECU options that reference any slots within this message. Returns an empty array if no options use the message.

        CANRxSetup

        Type: CANRxSetup

        Script class for CAN Rx (receive) setup (obtain via ecu.canRxSetup).

        Properties

        PropertyDescription
        channelCount Get the number of CAN channels available for this setup.

        Methods

        MethodDescription
        getChannel(index) Get the CAN channel (0-based, i.e. 0 is CAN1), of type CANRxChannel.

        Ecu

        Type: Ecu

        Represents the ECU.

        Properties

        PropertyDescription
        canRxSetup Return CANRxSetup object
        commsOpsPerSec Performance metric: Number of comms operations performed per second. Averaged.
        currentBaudRate Get/Set the current baud-rate for the connected ECU. Only applicable if the port in use supports changing the baudrate (e.g works for serial ports but not for ethernet ECUs).
        def The EcuDefinition (ECU definition) object used by the ECU.
        gin [deprecated] Alias of def property.
        isConnected Indicates if the application is currently connected to an ECU.

        Methods

        MethodDescription
        analogChannel(channel) Get the given indexed analog input channel.
        category(name) Find a EcuCategory with the given name. Returns null if not found. The search is case insensitive and also checks 'old names'.
        channel(name) Find a EcuChannel with the given name. Returns null if not found. The search is case insensitive and also checks 'old names'.
        channelTable(name) Find a EcuChannelTable with the given name. Returns null if not found. The search is case insensitive and also checks 'old names'.
        clearFileSetting(key)

        Clears the setting for the given key, stored in the calibration file

        commitCalibration() [deprecated] Alias of storeChanges.
        connect() Connects to an ECU using the currently configured port settings.
        disconnect() Closes the connection to the ECU (if connected).
        ecuString(name) Find a EcuString with the given name. Returns null if not found. The search is case insensitive and also checks 'old names'.
        getFileSetting(key[, default_value])

        Get the value of an arbitrary setting, stored in the calibration file.

        Note that these values are only stored in calibration files and not in the ECU itself. The setting will only be rerievable if the calibration file is matchs to the ECU following connect

        Keys are separated by forward slashes, e.g. "custom/area/my_setting".

        Returns 'default_value' if given, or 'undefined', if the setting does not exist.

        For custom settings, to avoid conflicts with application settings, prefix the setting with a unique string.

        For example, if you have a setting called "my_setting", prefix it with "my_prefix/" to give "my_prefix/my_setting".

        isWritePending() Determine if any queued writes to the ECU are pending.
        isWritePending(address, size) Determine if a queued write to the given address range is pending.
        logMap(name) Find a EcuLogMap with the given name. Returns null if not found. The search is case insensitive and also checks 'old names'.
        logMapTarget(name) Find a EcuLogMapTarget with the given name. Returns null if not found. The search is case insensitive and also checks 'old names'.
        map(name) Find a EcuMap with the given name. Returns null if not found. The search is case insensitive and also checks 'old names'.
        on(eventName, callback) Adds an event listener for the given event name. e.g. view.on("click", function() { ... });
        option(name) Find a EcuOption with the given name. Returns null if not found. The search is case insensitive and also checks 'old names'.
        region(name) Find a EcuRegion with the given name. Returns null if not found. The search is case insensitive and also checks 'old names'.
        removeAllListeners([eventName]) Removes all event listeners for the given event name. If the event name is not given then all listeners for all events are removed.
        removeListener(eventName, callback) Removes an event listener for the given event name. e.g. let callback = function() { ... }; ecu.on("scalingChanged", callback); view.removeListener("scalingChanged", callback);
        setFileSetting(key, value)

        Set the value of a arbitrary setting, stored in the calibration file.

        Note that these values are only stored in calibration files and not in the ECU itself. The setting will only be rerievable if the calibration file is matchs to the ECU following connect

        Returns true if the setting was changed, or false if the setting already had the given value.

        For custom settings, to avoid conflicts with application settings, prefix the setting with a unique string.

        For example, if you have a setting called "my_setting", prefix it with "my_prefix/" to give "my_prefix/my_setting".

        storeChanges() Store changes in the ECU to non-volatile memory.
        table(name) Find a EcuTable with the given name. Returns null if not found. The search is case insensitive and also checks 'old names'.
        userScalar(name) Find a EcuUserScalar with the given name. Returns null if not found. The search is case insensitive and also checks 'old names'.
        waitForEEDone([timeout]) Wait for the 'EE' busy condition to complete following storeChanges call.
        waitForWritesDone([timeout]) Wait for any write commands issued to the ECU to complete.

        Events

        EventDescription
        calReset

        Called when calibration file was reset (e.g. following loading of a calibration file).

        External scripts can bind to the 'calReset' event to be notified when the value changes.

        ecu.on("calReset", function() { ... });

        change

        Called when any calibration / measurement (channel) value was changed.

        External scripts can bind to the 'change' event to be notified when the value changes.

        ecu.on("change", function() { ... });

        changed

        Alias of "change" event. Originally the only event was "change" but the documentation was ambiguous.

        changed_cal

        Called when a calibration (non measurement) value was changed.

        External scripts can bind to the 'changed_cal' event to be notified when the value changes.

        ecu.on("changed_cal", function() { ... });

        changed_cal_details(details)

        Called when a calibration (non measurement) value was changed.

        External scripts can bind to the 'changed_cal_details' event to be notified when the value changes.

        ecu.on("changed_cal_details", function(details) { ... });

        'details' is an array of arrays of the form:

        [ [ size, address, address_extension ], ... ]

        address_extension is used by XCP ECUs and will be omitted if 0

        changed_details(details)

        Called when any calibration / measurement (channel) value was changed.

        External scripts can bind to the 'changed_details' event to be notified when the value changes.

        ecu.on("changed_details", function(details) { ... });

        'details' is an array of arrays of the form:

        [ [ size, address, address_extension ], ... ]

        address_extension is used by XCP ECUs and will be omitted if 0

        changed_logmap

        Called when a logmap value was changed.

        External scripts can bind to the 'changed_logmap' event to be notified when the value changes.

        ecu.on("changed_logmap", function(name, x, y) { ... });

        changed_volatile

        Called when a volatile/measurement (non calibration) value was changed.

        External scripts can bind to the 'changed_volatile' event to be notified when the value changes.

        ecu.on("changed_volatile", function() { ... });

        changed_volatile_details(details)

        Called when a volatile/measurement (non calibration) value was changed.

        External scripts can bind to the 'changed_volatile_details' event to be notified when the value changes.

        ecu.on("changed_volatile_details", function(details) { ... });

        'details' is an array of arrays of the form:

        [ [ size, address, address_extension ], ... ]

        address_extension is used by XCP ECUs and will be omitted if 0

        commsStatusChanged(state)

        Called when the ECU Comms status changed (e.g. went online / offline / error state.

        External scripts can bind to the 'commsStatusChanged' event to be notified when the value changes.

        ecu.on("commsStatusChanged", function(state) { ... });

        'state' is an object with the following boolean properties:

        • active
        • connecting
        • identified
        • secured
        • errors
        • offline

        dynamicNamesChanged

        Called when any item names were changed. Some calibration items names are based upon calibration values.

        External scripts can bind to the 'dynamicNamesChanged' event to be notified when the event occurs.

        ecu.on("dynamicNamesChanged", function() { ... });

        scalingChanged

        Called when scaling factors (user scalars / display units) were changed.

        External scripts can bind to the 'scalingChanged' event to be notified when the value changes.

        ecu.on("scalingChanged", function() { ... });

        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'.

        View

        Type: View

        Script class for View types.

        Related Types

        Properties

        PropertyDescription
        Since version 4.04.23, Named properties may be accessed directly instead of requiring getViewProperty / setViewProperty. The property ID may be identified in the Properties view.
        enabled Enables/disables the view.

        Methods

        MethodDescription
        callListener(eventName, [args]) Calls all event listeners for the given event name, useful for testing.
        getViewProperties() Returns an array of objects containing the view properties. Each element has the fields 'name', 'id', 'value', 'hint'. If the property is a category then it will also have an array field 'properties'. These properties are the ones normally editable via the properties view.
        getViewProperty(id) Gets a property value from the view, given the property ID. Property IDs can be listed using getViewProperties. These properties are the ones normally editable via the properties view.
        on(eventName, callback) Adds an event listener for the given event name. e.g. view.on("click", function() { ... });
        removeAllListeners([eventName]) Removes all event listeners for the given event name. If the event name is not given then all listeners for all events are removed.
        removeListener(eventName, callback) Removes an event listener for the given event name. e.g. let callback = function() { ... }; view.on("click", callback); view.removeListener("click", callback);
        setViewProperty(id, value) Sets a property on the view, given the property ID and value. Property IDs can be listed using getViewProperties These properties are the ones normally editable via the properties view.

        Subsections of View

        AspectSelector

        Type: AspectSelector

        Extends View

        Script class of the AspectSelector view.

        Properties

        PropertyDescription
        Since version 4.04.23, Named properties may be accessed directly instead of requiring getViewProperty / setViewProperty. The property ID may be identified in the Properties view.
        enabled Enables/disables the view.
        index Change the current selection of the AspectSelector view.

        View Properties

        Properties defined by the view that are normally editable via properties editor.

        PropertyNameDescription
        title Title The title of the window.
        id Script ID The scripting ID of the window. Can be used as an alternative to the title for searching for windows from scripts.
        tooltip Tool Tip Window tool tip.
        display_units_text Display Units Show units after the number on the view.
        display_units_label Display Units (Label) Show units after the label on the view.
        prefix_text Prefix Text Text to display before the value.
        postfix_text Postfix Text Text to display after the value.
        limits Limits Set up alarm limits for this gauge.
        show_value Show Value
        show_label Show Label
        label_font Label Font
        value_font Value Font
        value_height_percent Value Height % A value of zero disables auto font size fitting if Value Height Max is set
        value_height_max_dp Value Height Max [dp] Maximum font height of the value text, in device pixels
        label_height_percent Label Height %
        label_height_max_dp Label Height Max [dp] Maximum font height of the label, in device pixels
        label_text Label Text
        label_align Label Align
        label_valign Label Vertical Align
        value_align Value Align
        value_valign Value Vertical Align
        low_limit_text Low Limit Text
        high_limit_text High Limit Text
        value_text Value Override Text
        max_length_text Max length Text Leave blank for auto
        bg_colour Background Background colour
        text_colour Text Text colour
        alarm_low_bg_colour Alarm Low Background Alarm Lower Limit Background colour
        alarm_low_text_colour Alarm Low Text Alarm Lower Limit Text colour
        alarm_high_bg_colour Alarm High Background Alarm Upper Limit Background colour
        alarm_high_text_colour Alarm High Text Alarm Upper Limit Text colour
        parameter Input Value The source of the value that will be displayed by the gauge.
        update_rate Update Rate Rate at which the input value is requested from the ECU.
        decimal_places Decimal Places Set to -1 for auto

        Methods

        MethodDescription
        callListener(eventName, [args]) Calls all event listeners for the given event name, useful for testing.
        getViewProperties() Returns an array of objects containing the view properties. Each element has the fields 'name', 'id', 'value', 'hint'. If the property is a category then it will also have an array field 'properties'. These properties are the ones normally editable via the properties view.
        getViewProperty(id) Gets a property value from the view, given the property ID. Property IDs can be listed using getViewProperties. These properties are the ones normally editable via the properties view.
        on(eventName, callback) Adds an event listener for the given event name. e.g. view.on("click", function() { ... });
        removeAllListeners([eventName]) Removes all event listeners for the given event name. If the event name is not given then all listeners for all events are removed.
        removeListener(eventName, callback) Removes an event listener for the given event name. e.g. let callback = function() { ... }; view.on("click", callback); view.removeListener("click", callback);
        setViewProperty(id, value) Sets a property on the view, given the property ID and value. Property IDs can be listed using getViewProperties These properties are the ones normally editable via the properties view.

        Events

        EventDescription
        afterApply()

        Event raised after the AspectSelector value is applied on selection change.

        Note that the callback is called within an active undo-scope + calibration update scope.

        External scripts can bind to the 'afterApply' event to be notified.

        view.on("afterApply", function() { ... });

        beforeApply()

        Event raised before the AspectSelector value is applied on selection change.

        Note that the callback is called within an active undo-scope + calibration update scope.

        External scripts can bind to the 'beforeApply' event to be notified.

        view.on("beforeApply", function() { ... });

        change(index)

        Event raised after the AspectSelector selection changed / was applied.

        External scripts can bind to the 'change' event to be notified.

        view.on("change", function(index, value) { ... });

        Button

        Type: Button

        Extends View

        Script class of the Button view.

        Properties

        PropertyDescription
        Since version 4.04.23, Named properties may be accessed directly instead of requiring getViewProperty / setViewProperty. The property ID may be identified in the Properties view.
        enabled Enables/disables the view.
        text Get/Set the text of the Button view.

        View Properties

        Properties defined by the view that are normally editable via properties editor.

        PropertyNameDescription
        title Title The title of the window.
        id Script ID The scripting ID of the window. Can be used as an alternative to the title for searching for windows from scripts.
        tooltip Tool Tip Window tool tip.
        display_units_text Display Units Show units after the number on the view.
        display_units_label Display Units (Label) Show units after the label on the view.
        prefix_text Prefix Text Text to display before the value.
        postfix_text Postfix Text Text to display after the value.
        limits Limits Set up alarm limits for this gauge.
        show_value Show Value
        show_label Show Label
        label_font Label Font
        value_font Value Font
        value_height_percent Value Height % A value of zero disables auto font size fitting if Value Height Max is set
        value_height_max_dp Value Height Max [dp] Maximum font height of the value text, in device pixels
        label_height_percent Label Height %
        label_height_max_dp Label Height Max [dp] Maximum font height of the label, in device pixels
        label_text Label Text
        label_align Label Align
        label_valign Label Vertical Align
        value_align Value Align
        value_valign Value Vertical Align
        low_limit_text Low Limit Text
        high_limit_text High Limit Text
        value_text Value Override Text
        max_length_text Max length Text Leave blank for auto
        bg_colour Background Background colour
        text_colour Text Text colour
        alarm_low_bg_colour Alarm Low Background Alarm Lower Limit Background colour
        alarm_low_text_colour Alarm Low Text Alarm Lower Limit Text colour
        alarm_high_bg_colour Alarm High Background Alarm Upper Limit Background colour
        alarm_high_text_colour Alarm High Text Alarm Upper Limit Text colour
        parameter Input Value The source of the value that will be displayed by the gauge.
        update_rate Update Rate Rate at which the input value is requested from the ECU.
        decimal_places Decimal Places Set to -1 for auto

        Methods

        MethodDescription
        callListener(eventName, [args]) Calls all event listeners for the given event name, useful for testing.
        getViewProperties() Returns an array of objects containing the view properties. Each element has the fields 'name', 'id', 'value', 'hint'. If the property is a category then it will also have an array field 'properties'. These properties are the ones normally editable via the properties view.
        getViewProperty(id) Gets a property value from the view, given the property ID. Property IDs can be listed using getViewProperties. These properties are the ones normally editable via the properties view.
        on(eventName, callback) Adds an event listener for the given event name. e.g. view.on("click", function() { ... });
        removeAllListeners([eventName]) Removes all event listeners for the given event name. If the event name is not given then all listeners for all events are removed.
        removeListener(eventName, callback) Removes an event listener for the given event name. e.g. let callback = function() { ... }; view.on("click", callback); view.removeListener("click", callback);
        setViewProperty(id, value) Sets a property on the view, given the property ID and value. Property IDs can be listed using getViewProperties These properties are the ones normally editable via the properties view.

        Events

        EventDescription
        onClick()

        Called in Button scripts when the user clicked the Button.

        External scripts can bind to the 'click' event to be notified when the user clicks the Button.

        button.on("click", function() { ... });

        CheckableView

        Type: CheckableView

        Extends View

        Script class of the CheckableView.

        Properties

        PropertyDescription
        Since version 4.04.23, Named properties may be accessed directly instead of requiring getViewProperty / setViewProperty. The property ID may be identified in the Properties view.
        enabled Enables/disables the view.
        checked Get/Set the check state of the CheckableView view.
        text Get/Set the text of the CheckableView view.
        value Get/Set the check state of the CheckableView view. Synonymous with 'checked'

        Methods

        MethodDescription
        callListener(eventName, [args]) Calls all event listeners for the given event name, useful for testing.
        getViewProperties() Returns an array of objects containing the view properties. Each element has the fields 'name', 'id', 'value', 'hint'. If the property is a category then it will also have an array field 'properties'. These properties are the ones normally editable via the properties view.
        getViewProperty(id) Gets a property value from the view, given the property ID. Property IDs can be listed using getViewProperties. These properties are the ones normally editable via the properties view.
        on(eventName, callback) Adds an event listener for the given event name. e.g. view.on("click", function() { ... });
        removeAllListeners([eventName]) Removes all event listeners for the given event name. If the event name is not given then all listeners for all events are removed.
        removeListener(eventName, callback) Removes an event listener for the given event name. e.g. let callback = function() { ... }; view.on("click", callback); view.removeListener("click", callback);
        setViewProperty(id, value) Sets a property on the view, given the property ID and value. Property IDs can be listed using getViewProperties These properties are the ones normally editable via the properties view.

        Events

        EventDescription
        checked()

        Called when the view changed to the checked state.

        External scripts can bind to the 'checked' event to be notified.

        view.on("checked", function() { ... });

        onClick(checked)

        Called in CheckableView scripts when the user clicked the CheckableView.

        External scripts can bind to the 'click' event to be notified when the user clicks the Button.

        view.on("click", function(checked) { ... });

        The checked parameter is the new state of the CheckableView.

        The 'click' event is emitted when the user clicked the control.

        onGetValue() Gets the value that should be displayed by the CheckableView. Accesses to channels and options are tracked automatically, so changes to those values will cause onGetValue to be called again.
        onSetValue(checked)

        Called whenever the CheckableView state changes either through clicking or by another script setting the checked property.

        External scripts can bind to the 'change' event to be notified when the user clicks the Button.

        view.on("change", function(checked) { ... });

        The checked parameter is the new state of the CheckableView.

        The 'change' event is emitted when the checked state changes either through clicking or by another script setting the checked property.

        unchecked()

        Called when the view changed to the unchecked state.

        External scripts can bind to the 'unchecked' event to be notified.

        view.on("unchecked", function() { ... });

        CheckBox

        Type: CheckBox

        Extends CheckableView

        Script class of the Check Box view.

        Properties

        PropertyDescription
        Since version 4.04.23, Named properties may be accessed directly instead of requiring getViewProperty / setViewProperty. The property ID may be identified in the Properties view.
        enabled Enables/disables the view.
        checked Get/Set the check state of the CheckableView view.
        text Get/Set the text of the CheckableView view.
        value Get/Set the check state of the CheckableView view. Synonymous with 'checked'

        Methods

        MethodDescription
        callListener(eventName, [args]) Calls all event listeners for the given event name, useful for testing.
        getViewProperties() Returns an array of objects containing the view properties. Each element has the fields 'name', 'id', 'value', 'hint'. If the property is a category then it will also have an array field 'properties'. These properties are the ones normally editable via the properties view.
        getViewProperty(id) Gets a property value from the view, given the property ID. Property IDs can be listed using getViewProperties. These properties are the ones normally editable via the properties view.
        on(eventName, callback) Adds an event listener for the given event name. e.g. view.on("click", function() { ... });
        removeAllListeners([eventName]) Removes all event listeners for the given event name. If the event name is not given then all listeners for all events are removed.
        removeListener(eventName, callback) Removes an event listener for the given event name. e.g. let callback = function() { ... }; view.on("click", callback); view.removeListener("click", callback);
        setViewProperty(id, value) Sets a property on the view, given the property ID and value. Property IDs can be listed using getViewProperties These properties are the ones normally editable via the properties view.

        Events

        EventDescription
        checked()

        Called when the view changed to the checked state.

        External scripts can bind to the 'checked' event to be notified.

        view.on("checked", function() { ... });

        onClick(checked)

        Called in CheckableView scripts when the user clicked the CheckableView.

        External scripts can bind to the 'click' event to be notified when the user clicks the Button.

        view.on("click", function(checked) { ... });

        The checked parameter is the new state of the CheckableView.

        The 'click' event is emitted when the user clicked the control.

        onGetValue() Gets the value that should be displayed by the CheckableView. Accesses to channels and options are tracked automatically, so changes to those values will cause onGetValue to be called again.
        onSetValue(checked)

        Called whenever the CheckableView state changes either through clicking or by another script setting the checked property.

        External scripts can bind to the 'change' event to be notified when the user clicks the Button.

        view.on("change", function(checked) { ... });

        The checked parameter is the new state of the CheckableView.

        The 'change' event is emitted when the checked state changes either through clicking or by another script setting the checked property.

        unchecked()

        Called when the view changed to the unchecked state.

        External scripts can bind to the 'unchecked' event to be notified.

        view.on("unchecked", function() { ... });

        ComboBox

        Type: ComboBox

        Extends View

        Script class of the ComboBox view.

        Properties

        PropertyDescription
        Since version 4.04.23, Named properties may be accessed directly instead of requiring getViewProperty / setViewProperty. The property ID may be identified in the Properties view.
        enabled Enables/disables the view.
        index Change the current selection of the ComboBox view.
        items Set the list of items in the ComboBox. Expects an array of objects. Objects must have the property 'text'.

        View Properties

        Properties defined by the view that are normally editable via properties editor.

        PropertyNameDescription
        title Title The title of the window.
        id Script ID The scripting ID of the window. Can be used as an alternative to the title for searching for windows from scripts.
        tooltip Tool Tip Window tool tip.
        display_units_text Display Units Show units after the number on the view.
        display_units_label Display Units (Label) Show units after the label on the view.
        prefix_text Prefix Text Text to display before the value.
        postfix_text Postfix Text Text to display after the value.
        limits Limits Set up alarm limits for this gauge.
        show_value Show Value
        show_label Show Label
        label_font Label Font
        value_font Value Font
        value_height_percent Value Height % A value of zero disables auto font size fitting if Value Height Max is set
        value_height_max_dp Value Height Max [dp] Maximum font height of the value text, in device pixels
        label_height_percent Label Height %
        label_height_max_dp Label Height Max [dp] Maximum font height of the label, in device pixels
        label_text Label Text
        label_align Label Align
        label_valign Label Vertical Align
        value_align Value Align
        value_valign Value Vertical Align
        low_limit_text Low Limit Text
        high_limit_text High Limit Text
        value_text Value Override Text
        max_length_text Max length Text Leave blank for auto
        bg_colour Background Background colour
        text_colour Text Text colour
        alarm_low_bg_colour Alarm Low Background Alarm Lower Limit Background colour
        alarm_low_text_colour Alarm Low Text Alarm Lower Limit Text colour
        alarm_high_bg_colour Alarm High Background Alarm Upper Limit Background colour
        alarm_high_text_colour Alarm High Text Alarm Upper Limit Text colour
        parameter Input Value The source of the value that will be displayed by the gauge.
        update_rate Update Rate Rate at which the input value is requested from the ECU.
        decimal_places Decimal Places Set to -1 for auto

        Methods

        MethodDescription
        callListener(eventName, [args]) Calls all event listeners for the given event name, useful for testing.
        getViewProperties() Returns an array of objects containing the view properties. Each element has the fields 'name', 'id', 'value', 'hint'. If the property is a category then it will also have an array field 'properties'. These properties are the ones normally editable via the properties view.
        getViewProperty(id) Gets a property value from the view, given the property ID. Property IDs can be listed using getViewProperties. These properties are the ones normally editable via the properties view.
        on(eventName, callback) Adds an event listener for the given event name. e.g. view.on("click", function() { ... });
        removeAllListeners([eventName]) Removes all event listeners for the given event name. If the event name is not given then all listeners for all events are removed.
        removeListener(eventName, callback) Removes an event listener for the given event name. e.g. let callback = function() { ... }; view.on("click", callback); view.removeListener("click", callback);
        setViewProperty(id, value) Sets a property on the view, given the property ID and value. Property IDs can be listed using getViewProperties These properties are the ones normally editable via the properties view.
        getItem(index) Get item at the given index

        Events

        EventDescription
        change(index, value)

        Event raised when the combobox selection changed.

        External scripts can bind to the 'change' event to be notified.

        view.on("change", function(index, value) { ... });

        Dial

        Type: Dial

        Extends View

        Script class of the Dial view.

        Properties

        PropertyDescription
        Since version 4.04.23, Named properties may be accessed directly instead of requiring getViewProperty / setViewProperty. The property ID may be identified in the Properties view.
        enabled Enables/disables the view.
        value Get/Set the value of the dial.

        View Properties

        Properties defined by the view that are normally editable via properties editor.

        PropertyNameDescription
        title Title The title of the window.
        id Script ID The scripting ID of the window. Can be used as an alternative to the title for searching for windows from scripts.
        tooltip Tool Tip Window tool tip.
        display_units_text Display Units Show units after the number on the view.
        display_units_label Display Units (Label) Show units after the label on the view.
        prefix_text Prefix Text Text to display before the value.
        postfix_text Postfix Text Text to display after the value.
        limits Limits Set up alarm limits for this gauge.
        show_value Show Value
        show_label Show Label
        label_font Label Font
        value_font Value Font
        value_height_percent Value Height % A value of zero disables auto font size fitting if Value Height Max is set
        value_height_max_dp Value Height Max [dp] Maximum font height of the value text, in device pixels
        label_height_percent Label Height %
        label_height_max_dp Label Height Max [dp] Maximum font height of the label, in device pixels
        label_text Label Text
        label_align Label Align
        label_valign Label Vertical Align
        value_align Value Align
        value_valign Value Vertical Align
        low_limit_text Low Limit Text
        high_limit_text High Limit Text
        value_text Value Override Text
        max_length_text Max length Text Leave blank for auto
        bg_colour Background Background colour
        text_colour Text Text colour
        alarm_low_bg_colour Alarm Low Background Alarm Lower Limit Background colour
        alarm_low_text_colour Alarm Low Text Alarm Lower Limit Text colour
        alarm_high_bg_colour Alarm High Background Alarm Upper Limit Background colour
        alarm_high_text_colour Alarm High Text Alarm Upper Limit Text colour
        parameter Input Value The source of the value that will be displayed by the gauge.
        update_rate Update Rate Rate at which the input value is requested from the ECU.
        decimal_places Decimal Places Set to -1 for auto

        Methods

        MethodDescription
        callListener(eventName, [args]) Calls all event listeners for the given event name, useful for testing.
        getViewProperties() Returns an array of objects containing the view properties. Each element has the fields 'name', 'id', 'value', 'hint'. If the property is a category then it will also have an array field 'properties'. These properties are the ones normally editable via the properties view.
        getViewProperty(id) Gets a property value from the view, given the property ID. Property IDs can be listed using getViewProperties. These properties are the ones normally editable via the properties view.
        on(eventName, callback) Adds an event listener for the given event name. e.g. view.on("click", function() { ... });
        removeAllListeners([eventName]) Removes all event listeners for the given event name. If the event name is not given then all listeners for all events are removed.
        removeListener(eventName, callback) Removes an event listener for the given event name. e.g. let callback = function() { ... }; view.on("click", callback); view.removeListener("click", callback);
        setViewProperty(id, value) Sets a property on the view, given the property ID and value. Property IDs can be listed using getViewProperties These properties are the ones normally editable via the properties view.
        program() For Modifier Channels, the program button will apply the modification to the related Map / Table.

        Events

        EventDescription
        onProgramButton()

        Called in when the Dial 'program' button (of available) is clicked.

        External scripts can bind to the 'program' event to be notified when this event occurs.

        view.on("program", function(value) { ... });

        onSetValue(value)

        Called in when the Dial value has changed.

        External scripts can bind to the 'change' event to be notified when the value changes.

        view.on("change", function(value) { ... });

        GridView

        Type: GridView

        Extends View

        Script class of the GridView view.

        Properties

        PropertyDescription
        Since version 4.04.23, Named properties may be accessed directly instead of requiring getViewProperty / setViewProperty. The property ID may be identified in the Properties view.
        enabled Enables/disables the view.
        columns Get/Set the columns for the view. Note that the columns may also be set via the 'data' property.
        data Get/Set the data for the view. This may be specified as an array of rows or an object, with a 'data' property for the rows (an array). Each row is an array of objects for each cell in the row. The columns may be specified via the 'columns' property, if using an object, specified like a row. Cell objects may have any of the following properties, which may be specified as functions or values.
        • checked - For cells with checkboxes, indicates if cell should be checked. Else uses 'value'.
        • value - the value of the cell.
        • setter - function to accept value from cell editor.
        • editorOptions - If specified, the cell editor will be a drop-down with the specified values. This may be an array of values or an array of objects of the form { text: "text", value: "value" }. A function may also be specified that returns such a structure.
        • text - the text to display in the cell. value will be used if text not provided.
        • option - name or instance of an ecu.option. Many fields are populated from the object, unless overidden.
        • channel - name or instance of an ecu.channel. Many fields are populated from the object, unless overidden.
        • object - instance of an ecu object (e.g. ecu.option). Many fields are populated from the object, unless overidden.
        • description - Description text.
        • toolTip - Tool tip to show when cell is hovered.
        • statusTip - Tip to show in status bar when cell is hovered.
        • userText - User text value.
        • tag - Column tag, used for persistence of column widths.
        • icon - the icon to display in the cell.
        • iconExpanded - the icon to display in the cell if it is expanded (tree views).
        • colSpan - number of columns spanned by the cell.
        • rowSpan - number of rows spanned by the cell.
        • color - the color to display in the cell.
        • backgroundColor - the background color to display in the cell.
        • userValue - User value.
        • sortKey - If sorting the column, this value is used in preference to 'text' or 'value'
        • isSelectable - Indicates if the cell may be selected
        • isEditable - Indicates if the cell may be edited
        • isEnabled - Indicates if the cell is enabled
        • isDisabled - Indicates if the cell is disabled
        • isDefault - Indicates if the cell is a default value
        • isCheckable - Indicates if the cell is checkable (should display a checkbox)
        • isUserCheckDisabled - Indicates if the isCheckable cells checkbox may be checked/unchecked by the user
        selected Get/Set the selected sites, as a JSON string, scripts can use JSON.parse.

        View Properties

        Properties defined by the view that are normally editable via properties editor.

        PropertyNameDescription
        title Title The title of the window.
        id Script ID The scripting ID of the window. Can be used as an alternative to the title for searching for windows from scripts.
        tooltip Tool Tip Window tool tip.
        display_units_text Display Units Show units after the number on the view.
        display_units_label Display Units (Label) Show units after the label on the view.
        prefix_text Prefix Text Text to display before the value.
        postfix_text Postfix Text Text to display after the value.
        limits Limits Set up alarm limits for this gauge.
        show_value Show Value
        show_label Show Label
        label_font Label Font
        value_font Value Font
        value_height_percent Value Height % A value of zero disables auto font size fitting if Value Height Max is set
        value_height_max_dp Value Height Max [dp] Maximum font height of the value text, in device pixels
        label_height_percent Label Height %
        label_height_max_dp Label Height Max [dp] Maximum font height of the label, in device pixels
        label_text Label Text
        label_align Label Align
        label_valign Label Vertical Align
        value_align Value Align
        value_valign Value Vertical Align
        low_limit_text Low Limit Text
        high_limit_text High Limit Text
        value_text Value Override Text
        max_length_text Max length Text Leave blank for auto
        bg_colour Background Background colour
        text_colour Text Text colour
        alarm_low_bg_colour Alarm Low Background Alarm Lower Limit Background colour
        alarm_low_text_colour Alarm Low Text Alarm Lower Limit Text colour
        alarm_high_bg_colour Alarm High Background Alarm Upper Limit Background colour
        alarm_high_text_colour Alarm High Text Alarm Upper Limit Text colour
        parameter Input Value The source of the value that will be displayed by the gauge.
        update_rate Update Rate Rate at which the input value is requested from the ECU.
        decimal_places Decimal Places Set to -1 for auto

        Methods

        MethodDescription
        callListener(eventName, [args]) Calls all event listeners for the given event name, useful for testing.
        getViewProperties() Returns an array of objects containing the view properties. Each element has the fields 'name', 'id', 'value', 'hint'. If the property is a category then it will also have an array field 'properties'. These properties are the ones normally editable via the properties view.
        getViewProperty(id) Gets a property value from the view, given the property ID. Property IDs can be listed using getViewProperties. These properties are the ones normally editable via the properties view.
        on(eventName, callback) Adds an event listener for the given event name. e.g. view.on("click", function() { ... });
        removeAllListeners([eventName]) Removes all event listeners for the given event name. If the event name is not given then all listeners for all events are removed.
        removeListener(eventName, callback) Removes an event listener for the given event name. e.g. let callback = function() { ... }; view.on("click", callback); view.removeListener("click", callback);
        setViewProperty(id, value) Sets a property on the view, given the property ID and value. Property IDs can be listed using getViewProperties These properties are the ones normally editable via the properties view.
        refresh() Refresh the view, invalidating any cached values.

        Label

        Type: Label

        Extends View

        Script class of the Sequencer view.

        Properties

        PropertyDescription
        Since version 4.04.23, Named properties may be accessed directly instead of requiring getViewProperty / setViewProperty. The property ID may be identified in the Properties view.
        enabled Enables/disables the view.
        text

        Get/Set the text displayed by the label.

        Label text can include macro expansion in the form $[User Scalar Name] to display units.

        View Properties

        Properties defined by the view that are normally editable via properties editor.

        PropertyNameDescription
        title Title The title of the window.
        id Script ID The scripting ID of the window. Can be used as an alternative to the title for searching for windows from scripts.
        tooltip Tool Tip Window tool tip.
        display_units_text Display Units Show units after the number on the view.
        display_units_label Display Units (Label) Show units after the label on the view.
        prefix_text Prefix Text Text to display before the value.
        postfix_text Postfix Text Text to display after the value.
        limits Limits Set up alarm limits for this gauge.
        show_value Show Value
        show_label Show Label
        label_font Label Font
        value_font Value Font
        value_height_percent Value Height % A value of zero disables auto font size fitting if Value Height Max is set
        value_height_max_dp Value Height Max [dp] Maximum font height of the value text, in device pixels
        label_height_percent Label Height %
        label_height_max_dp Label Height Max [dp] Maximum font height of the label, in device pixels
        label_text Label Text
        label_align Label Align
        label_valign Label Vertical Align
        value_align Value Align
        value_valign Value Vertical Align
        low_limit_text Low Limit Text
        high_limit_text High Limit Text
        value_text Value Override Text
        max_length_text Max length Text Leave blank for auto
        bg_colour Background Background colour
        text_colour Text Text colour
        alarm_low_bg_colour Alarm Low Background Alarm Lower Limit Background colour
        alarm_low_text_colour Alarm Low Text Alarm Lower Limit Text colour
        alarm_high_bg_colour Alarm High Background Alarm Upper Limit Background colour
        alarm_high_text_colour Alarm High Text Alarm Upper Limit Text colour
        parameter Input Value The source of the value that will be displayed by the gauge.
        update_rate Update Rate Rate at which the input value is requested from the ECU.
        decimal_places Decimal Places Set to -1 for auto

        Methods

        MethodDescription
        callListener(eventName, [args]) Calls all event listeners for the given event name, useful for testing.
        getViewProperties() Returns an array of objects containing the view properties. Each element has the fields 'name', 'id', 'value', 'hint'. If the property is a category then it will also have an array field 'properties'. These properties are the ones normally editable via the properties view.
        getViewProperty(id) Gets a property value from the view, given the property ID. Property IDs can be listed using getViewProperties. These properties are the ones normally editable via the properties view.
        on(eventName, callback) Adds an event listener for the given event name. e.g. view.on("click", function() { ... });
        removeAllListeners([eventName]) Removes all event listeners for the given event name. If the event name is not given then all listeners for all events are removed.
        removeListener(eventName, callback) Removes an event listener for the given event name. e.g. let callback = function() { ... }; view.on("click", callback); view.removeListener("click", callback);
        setViewProperty(id, value) Sets a property on the view, given the property ID and value. Property IDs can be listed using getViewProperties These properties are the ones normally editable via the properties view.

        MultiSiteView

        Type: MultiSiteView

        Extends View

        Script class of the Multi-Site views (map/table grid/graph).

        Properties

        PropertyDescription
        Since version 4.04.23, Named properties may be accessed directly instead of requiring getViewProperty / setViewProperty. The property ID may be identified in the Properties view.
        enabled Enables/disables the view.
        canShowCorrectionsDialog Determines if the view supports corrections dialog (e.g. Log Maps).

        Methods

        MethodDescription
        callListener(eventName, [args]) Calls all event listeners for the given event name, useful for testing.
        getViewProperties() Returns an array of objects containing the view properties. Each element has the fields 'name', 'id', 'value', 'hint'. If the property is a category then it will also have an array field 'properties'. These properties are the ones normally editable via the properties view.
        getViewProperty(id) Gets a property value from the view, given the property ID. Property IDs can be listed using getViewProperties. These properties are the ones normally editable via the properties view.
        on(eventName, callback) Adds an event listener for the given event name. e.g. view.on("click", function() { ... });
        removeAllListeners([eventName]) Removes all event listeners for the given event name. If the event name is not given then all listeners for all events are removed.
        removeListener(eventName, callback) Removes an event listener for the given event name. e.g. let callback = function() { ... }; view.on("click", callback); view.removeListener("click", callback);
        setViewProperty(id, value) Sets a property on the view, given the property ID and value. Property IDs can be listed using getViewProperties These properties are the ones normally editable via the properties view.
        resetLogMapCapture() Resets Log Map capturing (if supported). This sets all the site weights in the log map to zero.
        showCorrectionsDialog() Shows the corrections dialog (if supported)

        Notes

        Type: Notes

        Extends View

        Script class of the Notes view.

        Properties

        PropertyDescription
        Since version 4.04.23, Named properties may be accessed directly instead of requiring getViewProperty / setViewProperty. The property ID may be identified in the Properties view.
        enabled Enables/disables the view.
        text Get/Set the text of the Notes view.

        View Properties

        Properties defined by the view that are normally editable via properties editor.

        PropertyNameDescription
        title Title The title of the window.
        id Script ID The scripting ID of the window. Can be used as an alternative to the title for searching for windows from scripts.
        tooltip Tool Tip Window tool tip.
        display_units_text Display Units Show units after the number on the view.
        display_units_label Display Units (Label) Show units after the label on the view.
        prefix_text Prefix Text Text to display before the value.
        postfix_text Postfix Text Text to display after the value.
        limits Limits Set up alarm limits for this gauge.
        show_value Show Value
        show_label Show Label
        label_font Label Font
        value_font Value Font
        value_height_percent Value Height % A value of zero disables auto font size fitting if Value Height Max is set
        value_height_max_dp Value Height Max [dp] Maximum font height of the value text, in device pixels
        label_height_percent Label Height %
        label_height_max_dp Label Height Max [dp] Maximum font height of the label, in device pixels
        label_text Label Text
        label_align Label Align
        label_valign Label Vertical Align
        value_align Value Align
        value_valign Value Vertical Align
        low_limit_text Low Limit Text
        high_limit_text High Limit Text
        value_text Value Override Text
        max_length_text Max length Text Leave blank for auto
        bg_colour Background Background colour
        text_colour Text Text colour
        alarm_low_bg_colour Alarm Low Background Alarm Lower Limit Background colour
        alarm_low_text_colour Alarm Low Text Alarm Lower Limit Text colour
        alarm_high_bg_colour Alarm High Background Alarm Upper Limit Background colour
        alarm_high_text_colour Alarm High Text Alarm Upper Limit Text colour
        parameter Input Value The source of the value that will be displayed by the gauge.
        update_rate Update Rate Rate at which the input value is requested from the ECU.
        decimal_places Decimal Places Set to -1 for auto

        Methods

        MethodDescription
        callListener(eventName, [args]) Calls all event listeners for the given event name, useful for testing.
        getViewProperties() Returns an array of objects containing the view properties. Each element has the fields 'name', 'id', 'value', 'hint'. If the property is a category then it will also have an array field 'properties'. These properties are the ones normally editable via the properties view.
        getViewProperty(id) Gets a property value from the view, given the property ID. Property IDs can be listed using getViewProperties. These properties are the ones normally editable via the properties view.
        on(eventName, callback) Adds an event listener for the given event name. e.g. view.on("click", function() { ... });
        removeAllListeners([eventName]) Removes all event listeners for the given event name. If the event name is not given then all listeners for all events are removed.
        removeListener(eventName, callback) Removes an event listener for the given event name. e.g. let callback = function() { ... }; view.on("click", callback); view.removeListener("click", callback);
        setViewProperty(id, value) Sets a property on the view, given the property ID and value. Property IDs can be listed using getViewProperties These properties are the ones normally editable via the properties view.

        NumberEdit

        Type: NumberEdit

        Extends View

        Script class of the Number Edit view.

        Properties

        PropertyDescription
        Since version 4.04.23, Named properties may be accessed directly instead of requiring getViewProperty / setViewProperty. The property ID may be identified in the Properties view.
        enabled Enables/disables the view.
        value Get/Set the value of the NumberEdit.

        View Properties

        Properties defined by the view that are normally editable via properties editor.

        PropertyNameDescription
        title Title The title of the window.
        id Script ID The scripting ID of the window. Can be used as an alternative to the title for searching for windows from scripts.
        tooltip Tool Tip Window tool tip.
        display_units_text Display Units Show units after the number on the view.
        display_units_label Display Units (Label) Show units after the label on the view.
        prefix_text Prefix Text Text to display before the value.
        postfix_text Postfix Text Text to display after the value.
        limits Limits Set up alarm limits for this gauge.
        show_value Show Value
        show_label Show Label
        label_font Label Font
        value_font Value Font
        value_height_percent Value Height % A value of zero disables auto font size fitting if Value Height Max is set
        value_height_max_dp Value Height Max [dp] Maximum font height of the value text, in device pixels
        label_height_percent Label Height %
        label_height_max_dp Label Height Max [dp] Maximum font height of the label, in device pixels
        label_text Label Text
        label_align Label Align
        label_valign Label Vertical Align
        value_align Value Align
        value_valign Value Vertical Align
        low_limit_text Low Limit Text
        high_limit_text High Limit Text
        value_text Value Override Text
        max_length_text Max length Text Leave blank for auto
        bg_colour Background Background colour
        text_colour Text Text colour
        alarm_low_bg_colour Alarm Low Background Alarm Lower Limit Background colour
        alarm_low_text_colour Alarm Low Text Alarm Lower Limit Text colour
        alarm_high_bg_colour Alarm High Background Alarm Upper Limit Background colour
        alarm_high_text_colour Alarm High Text Alarm Upper Limit Text colour
        parameter Input Value The source of the value that will be displayed by the gauge.
        update_rate Update Rate Rate at which the input value is requested from the ECU.
        decimal_places Decimal Places Set to -1 for auto

        Methods

        MethodDescription
        callListener(eventName, [args]) Calls all event listeners for the given event name, useful for testing.
        getViewProperties() Returns an array of objects containing the view properties. Each element has the fields 'name', 'id', 'value', 'hint'. If the property is a category then it will also have an array field 'properties'. These properties are the ones normally editable via the properties view.
        getViewProperty(id) Gets a property value from the view, given the property ID. Property IDs can be listed using getViewProperties. These properties are the ones normally editable via the properties view.
        on(eventName, callback) Adds an event listener for the given event name. e.g. view.on("click", function() { ... });
        removeAllListeners([eventName]) Removes all event listeners for the given event name. If the event name is not given then all listeners for all events are removed.
        removeListener(eventName, callback) Removes an event listener for the given event name. e.g. let callback = function() { ... }; view.on("click", callback); view.removeListener("click", callback);
        setViewProperty(id, value) Sets a property on the view, given the property ID and value. Property IDs can be listed using getViewProperties These properties are the ones normally editable via the properties view.

        Events

        EventDescription
        onSetValue(value)

        Called in when the NumberEdit value has changed.

        External scripts can bind to the 'change' event to be notified when the value changes.

        view.on("change", function(value) { ... });

        OptionEditor

        Type: OptionEditor

        Extends View

        Script class of the Number Edit view.

        Properties

        PropertyDescription
        Since version 4.04.23, Named properties may be accessed directly instead of requiring getViewProperty / setViewProperty. The property ID may be identified in the Properties view.
        enabled Enables/disables the view.
        value Get/Set the (real) value of the OptionEditor.

        View Properties

        Properties defined by the view that are normally editable via properties editor.

        PropertyNameDescription
        title Title The title of the window.
        id Script ID The scripting ID of the window. Can be used as an alternative to the title for searching for windows from scripts.
        tooltip Tool Tip Window tool tip.
        display_units_text Display Units Show units after the number on the view.
        display_units_label Display Units (Label) Show units after the label on the view.
        prefix_text Prefix Text Text to display before the value.
        postfix_text Postfix Text Text to display after the value.
        limits Limits Set up alarm limits for this gauge.
        show_value Show Value
        show_label Show Label
        label_font Label Font
        value_font Value Font
        value_height_percent Value Height % A value of zero disables auto font size fitting if Value Height Max is set
        value_height_max_dp Value Height Max [dp] Maximum font height of the value text, in device pixels
        label_height_percent Label Height %
        label_height_max_dp Label Height Max [dp] Maximum font height of the label, in device pixels
        label_text Label Text
        label_align Label Align
        label_valign Label Vertical Align
        value_align Value Align
        value_valign Value Vertical Align
        low_limit_text Low Limit Text
        high_limit_text High Limit Text
        value_text Value Override Text
        max_length_text Max length Text Leave blank for auto
        bg_colour Background Background colour
        text_colour Text Text colour
        alarm_low_bg_colour Alarm Low Background Alarm Lower Limit Background colour
        alarm_low_text_colour Alarm Low Text Alarm Lower Limit Text colour
        alarm_high_bg_colour Alarm High Background Alarm Upper Limit Background colour
        alarm_high_text_colour Alarm High Text Alarm Upper Limit Text colour
        parameter Input Value The source of the value that will be displayed by the gauge.
        update_rate Update Rate Rate at which the input value is requested from the ECU.
        decimal_places Decimal Places Set to -1 for auto

        Methods

        MethodDescription
        callListener(eventName, [args]) Calls all event listeners for the given event name, useful for testing.
        getViewProperties() Returns an array of objects containing the view properties. Each element has the fields 'name', 'id', 'value', 'hint'. If the property is a category then it will also have an array field 'properties'. These properties are the ones normally editable via the properties view.
        getViewProperty(id) Gets a property value from the view, given the property ID. Property IDs can be listed using getViewProperties. These properties are the ones normally editable via the properties view.
        on(eventName, callback) Adds an event listener for the given event name. e.g. view.on("click", function() { ... });
        removeAllListeners([eventName]) Removes all event listeners for the given event name. If the event name is not given then all listeners for all events are removed.
        removeListener(eventName, callback) Removes an event listener for the given event name. e.g. let callback = function() { ... }; view.on("click", callback); view.removeListener("click", callback);
        setViewProperty(id, value) Sets a property on the view, given the property ID and value. Property IDs can be listed using getViewProperties These properties are the ones normally editable via the properties view.

        Events

        EventDescription
        change(value)

        Called in when the OptionEditor value has changed.

        External scripts can bind to the 'change' event to be notified when the value changes.

        view.on("change", function(value) { ... });

        RadioButton

        Type: RadioButton

        Extends CheckableView

        Script class of the RadioButton view.

        Properties

        PropertyDescription
        Since version 4.04.23, Named properties may be accessed directly instead of requiring getViewProperty / setViewProperty. The property ID may be identified in the Properties view.
        enabled Enables/disables the view.
        checked Get/Set the check state of the CheckableView view.
        text Get/Set the text of the CheckableView view.
        value Get/Set the check state of the CheckableView view. Synonymous with 'checked'

        Methods

        MethodDescription
        callListener(eventName, [args]) Calls all event listeners for the given event name, useful for testing.
        getViewProperties() Returns an array of objects containing the view properties. Each element has the fields 'name', 'id', 'value', 'hint'. If the property is a category then it will also have an array field 'properties'. These properties are the ones normally editable via the properties view.
        getViewProperty(id) Gets a property value from the view, given the property ID. Property IDs can be listed using getViewProperties. These properties are the ones normally editable via the properties view.
        on(eventName, callback) Adds an event listener for the given event name. e.g. view.on("click", function() { ... });
        removeAllListeners([eventName]) Removes all event listeners for the given event name. If the event name is not given then all listeners for all events are removed.
        removeListener(eventName, callback) Removes an event listener for the given event name. e.g. let callback = function() { ... }; view.on("click", callback); view.removeListener("click", callback);
        setViewProperty(id, value) Sets a property on the view, given the property ID and value. Property IDs can be listed using getViewProperties These properties are the ones normally editable via the properties view.

        Events

        EventDescription
        checked()

        Called when the view changed to the checked state.

        External scripts can bind to the 'checked' event to be notified.

        view.on("checked", function() { ... });

        onClick(checked)

        Called in CheckableView scripts when the user clicked the CheckableView.

        External scripts can bind to the 'click' event to be notified when the user clicks the Button.

        view.on("click", function(checked) { ... });

        The checked parameter is the new state of the CheckableView.

        The 'click' event is emitted when the user clicked the control.

        onGetValue() Gets the value that should be displayed by the CheckableView. Accesses to channels and options are tracked automatically, so changes to those values will cause onGetValue to be called again.
        onSetValue(checked)

        Called whenever the CheckableView state changes either through clicking or by another script setting the checked property.

        External scripts can bind to the 'change' event to be notified when the user clicks the Button.

        view.on("change", function(checked) { ... });

        The checked parameter is the new state of the CheckableView.

        The 'change' event is emitted when the checked state changes either through clicking or by another script setting the checked property.

        unchecked()

        Called when the view changed to the unchecked state.

        External scripts can bind to the 'unchecked' event to be notified.

        view.on("unchecked", function() { ... });

        Scope

        Type: Scope

        Extends View

        Script class of the Scope view.

        Properties

        PropertyDescription
        Since version 4.04.23, Named properties may be accessed directly instead of requiring getViewProperty / setViewProperty. The property ID may be identified in the Properties view.
        enabled Enables/disables the view.

        View Properties

        Properties defined by the view that are normally editable via properties editor.

        PropertyNameDescription
        title Title The title of the window.
        id Script ID The scripting ID of the window. Can be used as an alternative to the title for searching for windows from scripts.
        tooltip Tool Tip Window tool tip.
        display_units_text Display Units Show units after the number on the view.
        display_units_label Display Units (Label) Show units after the label on the view.
        prefix_text Prefix Text Text to display before the value.
        postfix_text Postfix Text Text to display after the value.
        limits Limits Set up alarm limits for this gauge.
        show_value Show Value
        show_label Show Label
        label_font Label Font
        value_font Value Font
        value_height_percent Value Height % A value of zero disables auto font size fitting if Value Height Max is set
        value_height_max_dp Value Height Max [dp] Maximum font height of the value text, in device pixels
        label_height_percent Label Height %
        label_height_max_dp Label Height Max [dp] Maximum font height of the label, in device pixels
        label_text Label Text
        label_align Label Align
        label_valign Label Vertical Align
        value_align Value Align
        value_valign Value Vertical Align
        low_limit_text Low Limit Text
        high_limit_text High Limit Text
        value_text Value Override Text
        max_length_text Max length Text Leave blank for auto
        bg_colour Background Background colour
        text_colour Text Text colour
        alarm_low_bg_colour Alarm Low Background Alarm Lower Limit Background colour
        alarm_low_text_colour Alarm Low Text Alarm Lower Limit Text colour
        alarm_high_bg_colour Alarm High Background Alarm Upper Limit Background colour
        alarm_high_text_colour Alarm High Text Alarm Upper Limit Text colour
        parameter Input Value The source of the value that will be displayed by the gauge.
        update_rate Update Rate Rate at which the input value is requested from the ECU.
        decimal_places Decimal Places Set to -1 for auto

        Methods

        MethodDescription
        callListener(eventName, [args]) Calls all event listeners for the given event name, useful for testing.
        getViewProperties() Returns an array of objects containing the view properties. Each element has the fields 'name', 'id', 'value', 'hint'. If the property is a category then it will also have an array field 'properties'. These properties are the ones normally editable via the properties view.
        getViewProperty(id) Gets a property value from the view, given the property ID. Property IDs can be listed using getViewProperties. These properties are the ones normally editable via the properties view.
        on(eventName, callback) Adds an event listener for the given event name. e.g. view.on("click", function() { ... });
        removeAllListeners([eventName]) Removes all event listeners for the given event name. If the event name is not given then all listeners for all events are removed.
        removeListener(eventName, callback) Removes an event listener for the given event name. e.g. let callback = function() { ... }; view.on("click", callback); view.removeListener("click", callback);
        setViewProperty(id, value) Sets a property on the view, given the property ID and value. Property IDs can be listed using getViewProperties These properties are the ones normally editable via the properties view.
        clear() Clear the scope data
        putData(channel, timestamp, value) Add data to the scope

        SensorCalibrationView

        Type: SensorCalibrationView

        Extends View

        Script class of the Sensor Calibration view.

        Properties

        PropertyDescription
        Since version 4.04.23, Named properties may be accessed directly instead of requiring getViewProperty / setViewProperty. The property ID may be identified in the Properties view.
        enabled Enables/disables the view.

        View Properties

        Properties defined by the view that are normally editable via properties editor.

        PropertyNameDescription
        title Title The title of the window.
        id Script ID The scripting ID of the window. Can be used as an alternative to the title for searching for windows from scripts.
        tooltip Tool Tip Window tool tip.
        display_units_text Display Units Show units after the number on the view.
        display_units_label Display Units (Label) Show units after the label on the view.
        prefix_text Prefix Text Text to display before the value.
        postfix_text Postfix Text Text to display after the value.
        limits Limits Set up alarm limits for this gauge.
        show_value Show Value
        show_label Show Label
        label_font Label Font
        value_font Value Font
        value_height_percent Value Height % A value of zero disables auto font size fitting if Value Height Max is set
        value_height_max_dp Value Height Max [dp] Maximum font height of the value text, in device pixels
        label_height_percent Label Height %
        label_height_max_dp Label Height Max [dp] Maximum font height of the label, in device pixels
        label_text Label Text
        label_align Label Align
        label_valign Label Vertical Align
        value_align Value Align
        value_valign Value Vertical Align
        low_limit_text Low Limit Text
        high_limit_text High Limit Text
        value_text Value Override Text
        max_length_text Max length Text Leave blank for auto
        bg_colour Background Background colour
        text_colour Text Text colour
        alarm_low_bg_colour Alarm Low Background Alarm Lower Limit Background colour
        alarm_low_text_colour Alarm Low Text Alarm Lower Limit Text colour
        alarm_high_bg_colour Alarm High Background Alarm Upper Limit Background colour
        alarm_high_text_colour Alarm High Text Alarm Upper Limit Text colour
        parameter Input Value The source of the value that will be displayed by the gauge.
        update_rate Update Rate Rate at which the input value is requested from the ECU.
        decimal_places Decimal Places Set to -1 for auto

        Methods

        MethodDescription
        callListener(eventName, [args]) Calls all event listeners for the given event name, useful for testing.
        getViewProperties() Returns an array of objects containing the view properties. Each element has the fields 'name', 'id', 'value', 'hint'. If the property is a category then it will also have an array field 'properties'. These properties are the ones normally editable via the properties view.
        getViewProperty(id) Gets a property value from the view, given the property ID. Property IDs can be listed using getViewProperties. These properties are the ones normally editable via the properties view.
        on(eventName, callback) Adds an event listener for the given event name. e.g. view.on("click", function() { ... });
        removeAllListeners([eventName]) Removes all event listeners for the given event name. If the event name is not given then all listeners for all events are removed.
        removeListener(eventName, callback) Removes an event listener for the given event name. e.g. let callback = function() { ... }; view.on("click", callback); view.removeListener("click", callback);
        setViewProperty(id, value) Sets a property on the view, given the property ID and value. Property IDs can be listed using getViewProperties These properties are the ones normally editable via the properties view.

        Sequencer

        Type: Sequencer

        Extends View

        Script class of the Sequencer view.

        Related Types

        Properties

        PropertyDescription
        Since version 4.04.23, Named properties may be accessed directly instead of requiring getViewProperty / setViewProperty. The property ID may be identified in the Properties view.
        enabled Enables/disables the view.

        View Properties

        Properties defined by the view that are normally editable via properties editor.

        PropertyNameDescription
        title Title The title of the window.
        id Script ID The scripting ID of the window. Can be used as an alternative to the title for searching for windows from scripts.
        tooltip Tool Tip Window tool tip.
        display_units_text Display Units Show units after the number on the view.
        display_units_label Display Units (Label) Show units after the label on the view.
        prefix_text Prefix Text Text to display before the value.
        postfix_text Postfix Text Text to display after the value.
        limits Limits Set up alarm limits for this gauge.
        show_value Show Value
        show_label Show Label
        label_font Label Font
        value_font Value Font
        value_height_percent Value Height % A value of zero disables auto font size fitting if Value Height Max is set
        value_height_max_dp Value Height Max [dp] Maximum font height of the value text, in device pixels
        label_height_percent Label Height %
        label_height_max_dp Label Height Max [dp] Maximum font height of the label, in device pixels
        label_text Label Text
        label_align Label Align
        label_valign Label Vertical Align
        value_align Value Align
        value_valign Value Vertical Align
        low_limit_text Low Limit Text
        high_limit_text High Limit Text
        value_text Value Override Text
        max_length_text Max length Text Leave blank for auto
        bg_colour Background Background colour
        text_colour Text Text colour
        alarm_low_bg_colour Alarm Low Background Alarm Lower Limit Background colour
        alarm_low_text_colour Alarm Low Text Alarm Lower Limit Text colour
        alarm_high_bg_colour Alarm High Background Alarm Upper Limit Background colour
        alarm_high_text_colour Alarm High Text Alarm Upper Limit Text colour
        parameter Input Value The source of the value that will be displayed by the gauge.
        update_rate Update Rate Rate at which the input value is requested from the ECU.
        decimal_places Decimal Places Set to -1 for auto

        Methods

        MethodDescription
        callListener(eventName, [args]) Calls all event listeners for the given event name, useful for testing.
        getViewProperties() Returns an array of objects containing the view properties. Each element has the fields 'name', 'id', 'value', 'hint'. If the property is a category then it will also have an array field 'properties'. These properties are the ones normally editable via the properties view.
        getViewProperty(id) Gets a property value from the view, given the property ID. Property IDs can be listed using getViewProperties. These properties are the ones normally editable via the properties view.
        on(eventName, callback) Adds an event listener for the given event name. e.g. view.on("click", function() { ... });
        removeAllListeners([eventName]) Removes all event listeners for the given event name. If the event name is not given then all listeners for all events are removed.
        removeListener(eventName, callback) Removes an event listener for the given event name. e.g. let callback = function() { ... }; view.on("click", callback); view.removeListener("click", callback);
        setViewProperty(id, value) Sets a property on the view, given the property ID and value. Property IDs can be listed using getViewProperties These properties are the ones normally editable via the properties view.
        clearTrace() Clears the trace view. For long running sequences the trace window can become a performance issue.
        get(name) Get the value of a sequencer variable.
        gotoItem(name) Direct the sequencer to jump to the sequence item called 'name' once the current item completes.
        has(name) Returns 'true' if the sequencer variable has been previously defined.
        set(name, value) Set the value of a sequencer variable. The variable will be created if it does not exist.
        trace(msg) Trace a message in the info area of the sequencer window.
        unset(name) Deletes the sequencer variable. Following this, has(name) will return false.

        Subsections of Sequencer

        SequencerItem

        Type: SequencerItem

        An individual Sequencer item - represents a single step in the defined sequence.

        Methods

        MethodDescription
        getProperty(name) Get the value of a property of the sequence item (normally editable via the properties pane of the sequencer view).
        setProperty(name, value) Set the value of a property of the sequence item (normally editable via the properties pane of the sequencer view).
        trace Trace a message in the info area of the sequencer window.

        SignalGenerator

        Type: SignalGenerator

        Extends View

        Script class of the Signal Generator view.

        Properties

        PropertyDescription
        Since version 4.04.23, Named properties may be accessed directly instead of requiring getViewProperty / setViewProperty. The property ID may be identified in the Properties view.
        enabled Enables/disables the view.
        frequency Get/Set the signal generator frequency, in Hz.
        isOutputEnabled Enables/disables the output of the generator.
        numCells Get/Set the number of cells in the waveform.
        pullupResistance Get/Set the pullup resistance value, in ohms.
        waveform Get the waveform object, a table of type EcuObjectScaled. This enables editing of waveform values.

        View Properties

        Properties defined by the view that are normally editable via properties editor.

        PropertyNameDescription
        title Title The title of the window.
        id Script ID The scripting ID of the window. Can be used as an alternative to the title for searching for windows from scripts.
        tooltip Tool Tip Window tool tip.
        display_units_text Display Units Show units after the number on the view.
        display_units_label Display Units (Label) Show units after the label on the view.
        prefix_text Prefix Text Text to display before the value.
        postfix_text Postfix Text Text to display after the value.
        limits Limits Set up alarm limits for this gauge.
        show_value Show Value
        show_label Show Label
        label_font Label Font
        value_font Value Font
        value_height_percent Value Height % A value of zero disables auto font size fitting if Value Height Max is set
        value_height_max_dp Value Height Max [dp] Maximum font height of the value text, in device pixels
        label_height_percent Label Height %
        label_height_max_dp Label Height Max [dp] Maximum font height of the label, in device pixels
        label_text Label Text
        label_align Label Align
        label_valign Label Vertical Align
        value_align Value Align
        value_valign Value Vertical Align
        low_limit_text Low Limit Text
        high_limit_text High Limit Text
        value_text Value Override Text
        max_length_text Max length Text Leave blank for auto
        bg_colour Background Background colour
        text_colour Text Text colour
        alarm_low_bg_colour Alarm Low Background Alarm Lower Limit Background colour
        alarm_low_text_colour Alarm Low Text Alarm Lower Limit Text colour
        alarm_high_bg_colour Alarm High Background Alarm Upper Limit Background colour
        alarm_high_text_colour Alarm High Text Alarm Upper Limit Text colour
        parameter Input Value The source of the value that will be displayed by the gauge.
        update_rate Update Rate Rate at which the input value is requested from the ECU.
        decimal_places Decimal Places Set to -1 for auto

        Methods

        MethodDescription
        callListener(eventName, [args]) Calls all event listeners for the given event name, useful for testing.
        getViewProperties() Returns an array of objects containing the view properties. Each element has the fields 'name', 'id', 'value', 'hint'. If the property is a category then it will also have an array field 'properties'. These properties are the ones normally editable via the properties view.
        getViewProperty(id) Gets a property value from the view, given the property ID. Property IDs can be listed using getViewProperties. These properties are the ones normally editable via the properties view.
        on(eventName, callback) Adds an event listener for the given event name. e.g. view.on("click", function() { ... });
        removeAllListeners([eventName]) Removes all event listeners for the given event name. If the event name is not given then all listeners for all events are removed.
        removeListener(eventName, callback) Removes an event listener for the given event name. e.g. let callback = function() { ... }; view.on("click", callback); view.removeListener("click", callback);
        setViewProperty(id, value) Sets a property on the view, given the property ID and value. Property IDs can be listed using getViewProperties These properties are the ones normally editable via the properties view.

        Events

        EventDescription
        onFrequencyChanged()

        Called when the frequency of the generator has been changed.

        External scripts can bind to the 'frequency_changed' event to be notified when the user clicks the Button.

        view.on("frequency_changed", function(frequency) { ... });

        The frequency parameter is the new frequency of the generator, in Hz.

        ToggleButton

        Type: ToggleButton

        Extends CheckableView

        Script class of the ToggleButton view.

        Properties

        PropertyDescription
        Since version 4.04.23, Named properties may be accessed directly instead of requiring getViewProperty / setViewProperty. The property ID may be identified in the Properties view.
        enabled Enables/disables the view.
        checked Get/Set the check state of the CheckableView view.
        text Get/Set the text of the CheckableView view.
        value Get/Set the check state of the CheckableView view. Synonymous with 'checked'

        Methods

        MethodDescription
        callListener(eventName, [args]) Calls all event listeners for the given event name, useful for testing.
        getViewProperties() Returns an array of objects containing the view properties. Each element has the fields 'name', 'id', 'value', 'hint'. If the property is a category then it will also have an array field 'properties'. These properties are the ones normally editable via the properties view.
        getViewProperty(id) Gets a property value from the view, given the property ID. Property IDs can be listed using getViewProperties. These properties are the ones normally editable via the properties view.
        on(eventName, callback) Adds an event listener for the given event name. e.g. view.on("click", function() { ... });
        removeAllListeners([eventName]) Removes all event listeners for the given event name. If the event name is not given then all listeners for all events are removed.
        removeListener(eventName, callback) Removes an event listener for the given event name. e.g. let callback = function() { ... }; view.on("click", callback); view.removeListener("click", callback);
        setViewProperty(id, value) Sets a property on the view, given the property ID and value. Property IDs can be listed using getViewProperties These properties are the ones normally editable via the properties view.

        Events

        EventDescription
        checked()

        Called when the view changed to the checked state.

        External scripts can bind to the 'checked' event to be notified.

        view.on("checked", function() { ... });

        onClick(checked)

        Called in CheckableView scripts when the user clicked the CheckableView.

        External scripts can bind to the 'click' event to be notified when the user clicks the Button.

        view.on("click", function(checked) { ... });

        The checked parameter is the new state of the CheckableView.

        The 'click' event is emitted when the user clicked the control.

        onGetValue() Gets the value that should be displayed by the CheckableView. Accesses to channels and options are tracked automatically, so changes to those values will cause onGetValue to be called again.
        onSetValue(checked)

        Called whenever the CheckableView state changes either through clicking or by another script setting the checked property.

        External scripts can bind to the 'change' event to be notified when the user clicks the Button.

        view.on("change", function(checked) { ... });

        The checked parameter is the new state of the CheckableView.

        The 'change' event is emitted when the checked state changes either through clicking or by another script setting the checked property.

        unchecked()

        Called when the view changed to the unchecked state.

        External scripts can bind to the 'unchecked' event to be notified.

        view.on("unchecked", function() { ... });

        UnitPreferenceView

        Type: UnitPreferenceView

        Extends View

        Script class of the UnitPreferenceView.

        Properties

        PropertyDescription
        Since version 4.04.23, Named properties may be accessed directly instead of requiring getViewProperty / setViewProperty. The property ID may be identified in the Properties view.
        enabled Enables/disables the view.
        unit Get/Set the selected unit script ID.
        unitPreference Get/Set the selected unit preference name (User Scalar)

        View Properties

        Properties defined by the view that are normally editable via properties editor.

        PropertyNameDescription
        title Title The title of the window.
        id Script ID The scripting ID of the window. Can be used as an alternative to the title for searching for windows from scripts.
        tooltip Tool Tip Window tool tip.
        display_units_text Display Units Show units after the number on the view.
        display_units_label Display Units (Label) Show units after the label on the view.
        prefix_text Prefix Text Text to display before the value.
        postfix_text Postfix Text Text to display after the value.
        limits Limits Set up alarm limits for this gauge.
        show_value Show Value
        show_label Show Label
        label_font Label Font
        value_font Value Font
        value_height_percent Value Height % A value of zero disables auto font size fitting if Value Height Max is set
        value_height_max_dp Value Height Max [dp] Maximum font height of the value text, in device pixels
        label_height_percent Label Height %
        label_height_max_dp Label Height Max [dp] Maximum font height of the label, in device pixels
        label_text Label Text
        label_align Label Align
        label_valign Label Vertical Align
        value_align Value Align
        value_valign Value Vertical Align
        low_limit_text Low Limit Text
        high_limit_text High Limit Text
        value_text Value Override Text
        max_length_text Max length Text Leave blank for auto
        bg_colour Background Background colour
        text_colour Text Text colour
        alarm_low_bg_colour Alarm Low Background Alarm Lower Limit Background colour
        alarm_low_text_colour Alarm Low Text Alarm Lower Limit Text colour
        alarm_high_bg_colour Alarm High Background Alarm Upper Limit Background colour
        alarm_high_text_colour Alarm High Text Alarm Upper Limit Text colour
        parameter Input Value The source of the value that will be displayed by the gauge.
        update_rate Update Rate Rate at which the input value is requested from the ECU.
        decimal_places Decimal Places Set to -1 for auto

        Methods

        MethodDescription
        callListener(eventName, [args]) Calls all event listeners for the given event name, useful for testing.
        getViewProperties() Returns an array of objects containing the view properties. Each element has the fields 'name', 'id', 'value', 'hint'. If the property is a category then it will also have an array field 'properties'. These properties are the ones normally editable via the properties view.
        getViewProperty(id) Gets a property value from the view, given the property ID. Property IDs can be listed using getViewProperties. These properties are the ones normally editable via the properties view.
        on(eventName, callback) Adds an event listener for the given event name. e.g. view.on("click", function() { ... });
        removeAllListeners([eventName]) Removes all event listeners for the given event name. If the event name is not given then all listeners for all events are removed.
        removeListener(eventName, callback) Removes an event listener for the given event name. e.g. let callback = function() { ... }; view.on("click", callback); view.removeListener("click", callback);
        setViewProperty(id, value) Sets a property on the view, given the property ID and value. Property IDs can be listed using getViewProperties These properties are the ones normally editable via the properties view.

        Events

        EventDescription
        change(unit)

        Called whenever the selected unit changes either through clicking or by a script setting it.

        Scripts can bind to the 'change' event to be notified when the selection changes.

        view.on("change", function(unit) { ... });

        The unit parameter is the script ID of the selected units (e.g. voltage:V)

        UnitSelector

        Type: UnitSelector

        Extends View

        Script class of the UnitSelector view.

        Properties

        PropertyDescription
        Since version 4.04.23, Named properties may be accessed directly instead of requiring getViewProperty / setViewProperty. The property ID may be identified in the Properties view.
        enabled Enables/disables the view.
        unit Get/Set the selected unit script ID.

        View Properties

        Properties defined by the view that are normally editable via properties editor.

        PropertyNameDescription
        title Title The title of the window.
        id Script ID The scripting ID of the window. Can be used as an alternative to the title for searching for windows from scripts.
        tooltip Tool Tip Window tool tip.
        display_units_text Display Units Show units after the number on the view.
        display_units_label Display Units (Label) Show units after the label on the view.
        prefix_text Prefix Text Text to display before the value.
        postfix_text Postfix Text Text to display after the value.
        limits Limits Set up alarm limits for this gauge.
        show_value Show Value
        show_label Show Label
        label_font Label Font
        value_font Value Font
        value_height_percent Value Height % A value of zero disables auto font size fitting if Value Height Max is set
        value_height_max_dp Value Height Max [dp] Maximum font height of the value text, in device pixels
        label_height_percent Label Height %
        label_height_max_dp Label Height Max [dp] Maximum font height of the label, in device pixels
        label_text Label Text
        label_align Label Align
        label_valign Label Vertical Align
        value_align Value Align
        value_valign Value Vertical Align
        low_limit_text Low Limit Text
        high_limit_text High Limit Text
        value_text Value Override Text
        max_length_text Max length Text Leave blank for auto
        bg_colour Background Background colour
        text_colour Text Text colour
        alarm_low_bg_colour Alarm Low Background Alarm Lower Limit Background colour
        alarm_low_text_colour Alarm Low Text Alarm Lower Limit Text colour
        alarm_high_bg_colour Alarm High Background Alarm Upper Limit Background colour
        alarm_high_text_colour Alarm High Text Alarm Upper Limit Text colour
        parameter Input Value The source of the value that will be displayed by the gauge.
        update_rate Update Rate Rate at which the input value is requested from the ECU.
        decimal_places Decimal Places Set to -1 for auto

        Methods

        MethodDescription
        callListener(eventName, [args]) Calls all event listeners for the given event name, useful for testing.
        getViewProperties() Returns an array of objects containing the view properties. Each element has the fields 'name', 'id', 'value', 'hint'. If the property is a category then it will also have an array field 'properties'. These properties are the ones normally editable via the properties view.
        getViewProperty(id) Gets a property value from the view, given the property ID. Property IDs can be listed using getViewProperties. These properties are the ones normally editable via the properties view.
        on(eventName, callback) Adds an event listener for the given event name. e.g. view.on("click", function() { ... });
        removeAllListeners([eventName]) Removes all event listeners for the given event name. If the event name is not given then all listeners for all events are removed.
        removeListener(eventName, callback) Removes an event listener for the given event name. e.g. let callback = function() { ... }; view.on("click", callback); view.removeListener("click", callback);
        setViewProperty(id, value) Sets a property on the view, given the property ID and value. Property IDs can be listed using getViewProperties These properties are the ones normally editable via the properties view.

        Events

        EventDescription
        change(unit)

        Called whenever the selected unit changes either through clicking or by a script setting it.

        Scripts can bind to the 'change' event to be notified when the selection changes.

        view.on("change", function(unit) { ... });

        The unit parameter is the script ID of the selected units (e.g. voltage:V)

        selection(selected)

        Called whenever the 'base' (unsorted) selection changes.

        WizardListView

        Type: WizardListView

        Extends View

        Script class of the WizardListView.

        Properties

        PropertyDescription
        Since version 4.04.23, Named properties may be accessed directly instead of requiring getViewProperty / setViewProperty. The property ID may be identified in the Properties view.
        enabled Enables/disables the view.
        index Change the current selection of the WizardListView view.
        items Change the current selection of the WizardListView view.

        View Properties

        Properties defined by the view that are normally editable via properties editor.

        PropertyNameDescription
        title Title The title of the window.
        id Script ID The scripting ID of the window. Can be used as an alternative to the title for searching for windows from scripts.
        tooltip Tool Tip Window tool tip.
        display_units_text Display Units Show units after the number on the view.
        display_units_label Display Units (Label) Show units after the label on the view.
        prefix_text Prefix Text Text to display before the value.
        postfix_text Postfix Text Text to display after the value.
        limits Limits Set up alarm limits for this gauge.
        show_value Show Value
        show_label Show Label
        label_font Label Font
        value_font Value Font
        value_height_percent Value Height % A value of zero disables auto font size fitting if Value Height Max is set
        value_height_max_dp Value Height Max [dp] Maximum font height of the value text, in device pixels
        label_height_percent Label Height %
        label_height_max_dp Label Height Max [dp] Maximum font height of the label, in device pixels
        label_text Label Text
        label_align Label Align
        label_valign Label Vertical Align
        value_align Value Align
        value_valign Value Vertical Align
        low_limit_text Low Limit Text
        high_limit_text High Limit Text
        value_text Value Override Text
        max_length_text Max length Text Leave blank for auto
        bg_colour Background Background colour
        text_colour Text Text colour
        alarm_low_bg_colour Alarm Low Background Alarm Lower Limit Background colour
        alarm_low_text_colour Alarm Low Text Alarm Lower Limit Text colour
        alarm_high_bg_colour Alarm High Background Alarm Upper Limit Background colour
        alarm_high_text_colour Alarm High Text Alarm Upper Limit Text colour
        parameter Input Value The source of the value that will be displayed by the gauge.
        update_rate Update Rate Rate at which the input value is requested from the ECU.
        decimal_places Decimal Places Set to -1 for auto

        Methods

        MethodDescription
        callListener(eventName, [args]) Calls all event listeners for the given event name, useful for testing.
        getViewProperties() Returns an array of objects containing the view properties. Each element has the fields 'name', 'id', 'value', 'hint'. If the property is a category then it will also have an array field 'properties'. These properties are the ones normally editable via the properties view.
        getViewProperty(id) Gets a property value from the view, given the property ID. Property IDs can be listed using getViewProperties. These properties are the ones normally editable via the properties view.
        on(eventName, callback) Adds an event listener for the given event name. e.g. view.on("click", function() { ... });
        removeAllListeners([eventName]) Removes all event listeners for the given event name. If the event name is not given then all listeners for all events are removed.
        removeListener(eventName, callback) Removes an event listener for the given event name. e.g. let callback = function() { ... }; view.on("click", callback); view.removeListener("click", callback);
        setViewProperty(id, value) Sets a property on the view, given the property ID and value. Property IDs can be listed using getViewProperties These properties are the ones normally editable via the properties view.

        Window

        Type: Window

        Script class for Window utilities.

        A global 'window' object is provided to access these functions and the 'workpage'.

        var button = window.findViewByID("do_not_press"); var button2 = window.do_not_press; // shorthand 

        var button = window.do_not_press; // shorthand

        Properties

        PropertyDescription
        Since version 4.04.23, view IDs may be accessed directly instead of through findViewByID. Assignment to an unspecified ID shall set the script id of the view being assigned.

        Methods

        MethodDescription
        findViewByID(id) Searches child views for the first one with a script ID that matches 'id' (set via view properties). Returns a reference to the view, or 'null' if nothing found.
        findViewByTitle(title) Searches child views for the first one with a title that matches 'title'. Returns a reference to the view, or 'null' if nothing found.
        setRefreshTimer(callback) Sets a callback function to be called periodically, dependent upon the user interface update rate setting in general preferences.

        Typically around 25Hz.

        To cancel the timer, call this function with a 'null' argument.

        Wizard

        Type: Wizard

        Extends Window

        Script class for Wizard scripts.

        A global 'wizard' object is provided to access these functions.

        wizard.on("next", function() { print("Next Clicked"); });

        Properties

        PropertyDescription
        Since version 4.04.23, view IDs may be accessed directly instead of through findViewByID. Assignment to an unspecified ID shall set the script id of the view being assigned.
        isEditMode Determine if the wizard is running in edit mode.
        isRunMode Determine if the wizard is running in run mode.

        Methods

        MethodDescription
        findViewByID(id) Searches child views for the first one with a script ID that matches 'id' (set via view properties). Returns a reference to the view, or 'null' if nothing found.
        findViewByTitle(title) Searches child views for the first one with a title that matches 'title'. Returns a reference to the view, or 'null' if nothing found.
        setRefreshTimer(callback) Sets a callback function to be called periodically, dependent upon the user interface update rate setting in general preferences.

        Typically around 25Hz.

        To cancel the timer, call this function with a 'null' argument.

        back()

        Go to the previous step.

        Returns true if the previous step was found.

        The wizard will emit the "step" event after the step is changed. The event is deferred via the application event loop.

        This function will only work if the previous step is defined in the predefined step list

        Scripts may implement the on("back", ()=>{...}) event handler for dynamic control over step ordering.

        See gotoStep and vetoEventfor more information.

        cancel()

        Cancel the wizard.

        close([exit_code])

        Close the wizard dialog.

        If exit_code is provided, the wizard shall be closed with the given exit code. Otherwise the wizard shall be closed with the default exit code (OK, 5100).

        codes include:

        • OK - 5100
        • CANCEL - 5101
        • APPLY - 5102
        • YES - 5103
        • NO - 5104
        • HELP - 5009

        The exit code may be specified as an integer or string.

        wizard.close("cancel");

        finish()

        Finish the wizard.

        getStep() Get the current step. Returns the script ID of the current step.
        gotoStep(id) Go to the step given by the script ID passed in.

        Returns true if the step was found.

        The wizard will emit the "step" event after the step is changed. The event is deferred via the application event loop.

        next()

        Go to the next step.

        Returns true if the next step was found.

        The wizard will emit the "step" event after the step is changed. The event is deferred via the application event loop.

        This function will only work if the next step is defined in the predefined step list

        Scripts may implement the on("next", ()=>{...}) event handler for dynamic control over step ordering.

        See gotoStep and vetoEventfor more information.

        on(eventName, callback) Adds an event listener for the given event name. e.g. wizard.on("next", function() { ... });
        removeAllListeners([eventName]) Removes all event listeners for the given event name. If the event name is not given then all listeners for all events are removed.
        removeListener(eventName, callback) Removes an event listener for the given event name. e.g. let callback = function() { ... }; wizard.on("next", callback); view.removeListener("next", callback);
        setEnableBack([enable])

        Enable or disable the back button.

        When called with no arguments, the back button shall be enabled if the current step has a 'back' item in the predefined step list.

        setEnableCancel([enable])

        Enable or disable the cancel button.

        When called with no arguments, the cancel button shall be enabled by default.

        setEnableCustomButton([enable])

        Enable or disable the custom button.

        When called with no arguments, the custom button shall be enabled by default.

        setEnableFinish([enable])

        Enable or disable the finish button.

        When called with no arguments, the finish button shall be enabled if the current step does not have a 'next' item in the predefined step list.

        setEnableHelp([enable])

        Enable or disable the help button.

        When called with no arguments, the help button shall be enabled if the current step (or the wizard) has help HTML or URL defined.

        setEnableNext([enable])

        Enable or disable the next button.

        When called with no arguments, the next button shall be enabled if the current step has a 'next' item in the predefined step list.

        showHelpHtml(html)

        Show the given HTML in the help panel.

        showHelpURL(url)

        Close the help panel (if open) and launch the URL in the system default web browser.

        vetoEvent([veto])

        Prevent the current event from being processed.

        When called with no arguments, the current event shall be prevented from being processed.

        When called with a boolean argument, the current event shall be prevented from being processed if the argument is true.

        Events

        EventDescription
        back

        Event raised when back button was clicked.

        wizard.on("back", function() { ... });

        Calling vetoEvent() during this event will prevent the wizard from taking the default 'back' action.

        See also setEnableBack.

        See also gotoStep for dyamic control of step ordering.

        cancel

        Event raised when cancel button was clicked.

        wizard.on("cancel", function() { ... });

        Calling vetoEvent() during this event will prevent the wizard from taking the default 'cancel' action.

        See also setEnableCancel.

        close(code)

        Event raised when the wizard is closing.

        code is a wxWidgets ID (e.g. wxID_CANCEL).

        wizard.on("close", function(code) { ... });

        Calling vetoEvent() during this event will prevent the wizard from closing the wizard.

        custom

        Event raised when custom button was clicked.

        wizard.on("custom", function() { ... });

        Calling vetoEvent() during this event will prevent the wizard from taking the default 'custom' action.

        See also setEnableCustom.

        finish

        Event raised when finish button was clicked.

        wizard.on("finish", function() { ... });

        Calling vetoEvent() during this event will prevent the wizard from taking the default 'finish' action.

        See also setEnableFinish.

        help

        Event raised when help button was clicked.

        wizard.on("help", function() { ... });

        Calling vetoEvent() during this event will prevent the wizard from taking the default 'help' action.

        See also setEnableHelp.

        next

        Event raised when next button was clicked.

        wizard.on("next", function() { ... });

        Calling vetoEvent() during this event will prevent the wizard from taking the default 'next' action.

        See also setEnableNext.

        See also gotoStep for dyamic control of step ordering.

        step

        Event raised when the current step has changed.

        wizard.on("step", function() { ... });

        The step event shall be emitted shortly after the wizard starts if any steps were defined.

        Array

        Overview

        Arrays are integral to the JavaScript language.

        Arrays are used to store multiple values in a single variable.

        Elements within an array can be accessed using the subscript operator:

        var x = [1, 2, 3, 4];
        var index = 2;
        var y = x[index]; // y == 3
        

        Properties

        Property Description
        constructor Returns the function that created the Array object’s prototype.
        length Sets or returns the number of elements in an array.
        prototype Allows you to add properties and methods to an object.

        Methods

        Method Description
        concat(array1, array2, ...) Joins two or more arrays, and returns a copy of the joined arrays
        join(separator = ',') Joins all elements of an array into a string
        pop() Removes the last element of an array, and returns that element
        push(item1, ...) Adds new elements to the end of an array, and returns the new length
        reverse() Reverses the order of the elements in an array
        shift() Removes the first element of an array, and returns that element
        slice(start, end) Selects a part of an array, and returns the new array. ’end’ may be omitted to select all items up to the end of the array. ‘start’ may be negative to select elements from the end of the array.
        sort() Sorts the elements of an array.
        splice(index,count,[item1], ...) Adds/Removes elements from an array. ‘index’ is the index from which to add/remove, ‘count’ is the number of items to remove, and optionally elements to add at ‘index’ may be supplied.
        toString() Converts an array to a string, and returns the result. Same as array.join(’,’).
        unshift(item1, ...) Adds new elements to the beginning of an array, and returns the new length
        valueOf() Returns the primitive value of an array

        Function Objects

        Function objects allow you to create scripted views of values in the ECU. Function Objects cane be created using the Create Function Object... command.

        At present, this only applies to tables and maps. In the future Options or Channels may also be created.

        For example, it is possible to create an editable map that displays the end injection angle by running scripts against the Injection Advance/Angle map and the Fuel Map. See the example script at the end of this topic. This script (or similar) is used as an initial starting point for new Function Objects.

        The script for a function object is executed once when compiled to set up the context for the object. This is a good opportunity to find the objects (maps, tables etc) that your script is based upon.

        Subsequently the object is accessed via a number of functions that you can define in the script:

        • getAxes()
        • getRaw(axes) [required]
        • setRaw(raw, axes)
        • getMinRaw(axes)
        • getMaxRaw(axes)
        • realFromRaw(raw, axes)
        • rawFromReal(real, axes)

        getAxes

        function getAxes()

        This must return the axes of the object. This is an array that specifies the dimensions your object.

        In general it is easiest to use the axes of another object (e.g. the Fuel Map):

        var fuel = ecu.map("fuel");
        function getAxes() {
            if (fuel) return fuel.axes;
            return {};
        }

        If this function is not defined then the object is one dimensional (like an option/channel).

        getRaw

        function getRaw(axes) [required]

        This should return the value of your object at the site specified by ‘axes’. The ‘axes’ parameter is an array that specifies the x and, optionally, the y coordinate of the object.

        Note

        The value returned will be interpreted as an integer.

        function getRaw(axes) 
        {
            if (fuel && injadv) {
                // fuelAngle is a user defined function that gets the angle range 
                // over which fuel is injected at a given site.
                return raw_per_real * (fuelAngle(axes) + injadv.getReal(axes));
            }
            return 0;
        }

        setRaw

        function setRaw(raw, axes)

        If specified, then the function object will be editable. This function should set the integer value ‘raw’ at the site specified by ‘axes’ in an appropriate manner.

        function setRaw(raw, axes) 
        {
            if (fuel && injadv) {
                var real = raw;
                real /= raw_per_real;
                real -= fuelAngle(axes);
                injadv.setReal(real, axes);
            }
        }

        getMinRaw

        function getMinRaw(axes)

        Get the minimum raw value for the function object. If defined, this will affect how the limits are calculated for views of the function object.

        getMaxRaw

        function getMaxRaw(axes)

        Get the maximum raw value for the function object. If defined, this will affect how the limits are calculated for views of the function object.

        realFromRaw

        function realFromRaw(axes)

        Define how raw integer values are represented as real (floating point) numbers.

        Raw numbers are always integers and a single +/- increment on a map/table/option etc generally corresponds to a single raw unit unless any overrides have been specified.

        If you specify this function then you should also define its inverse, ‘rawFromReal’.

        rawFromReal

        function rawFromReal(axes)

        Define how real (floating point) values are represented as raw (integer) numbers. The inverse of ‘realFromRaw’.

        Example: End of Injection Angle Script

        // ---------------------------------------------------------
        // This script generates a map for the end injection angle.
        // This will not take into account fuel modifiers / 
        // compensations that occur after the Fuel map has been 
        // processed by the ECU.
        // ---------------------------------------------------------
        //
        // ---------------------------------------------------------
        // Initialization.
        // ---------------------------------------------------------
        // First off, get hold of the base maps and options that are
        // needed in our calculations.
        // This code is run once after the script is compiled.
        let fuel   = ecu.map("fuel");
        let injadv = ecu.map("inj advance");
        if (injadv == null) {
            injadv = ecu.map("inj angle");
        }
        if (injadv == null) {
            injadv = ecu.map("injection angle");
        }
        
        // Some (but not all) ECUs have some additional scaling across the map
        // This enables higher map resolution on 8-bit fuel maps by offsetting
        // values against a general trend plane defined by ld0mpc and mspb.
        let opt_ld0mpc = ecu.option("ld0mpc");
        let opt_mspb = ecu.option("mspb");
        if (opt_mspb == null) {
            opt_mspb = ecu.option("microsec/bit");
        }
        if (opt_mspb == null) {
            opt_mspb = ecu.option("inj microsec/bit");
        }
        
        // Raw numbers are always integers.
        // To increase the resolution of our map, we can supply a
        // real/raw scaling so that a single raw unit is a fraction
        // of a single real number (floating point).
        //
        // see realFromRaw and rawFromReal below.
        //
        // Since edits to this map adjusts the injection angle map,
        // we'll use the same precision as that map.
        //
        let raw_per_real = 1.0; // number of raw units per real.
        if (injadv) {
            raw_per_real = injadv.realFromRaw(1) - 
                               injadv.realFromRaw(0);
            raw_per_real = Math.abs(raw_per_real);
            if (raw_per_real > 0) {
                raw_per_real = 1 / raw_per_real;
            }
            else {
                raw_per_real = 1;
            }
        }
        
        // ---------------------------------------------------------
        // Helper functions.
        // ---------------------------------------------------------
        
        // ---------------------------------------------------------
        // Apply load scaling.
        function ld0mpcFromRaw(d, site) {
            let ld0 = opt_ld0mpc.raw;
            if ((ld0 == 255) || (ld0 == 0)) {
                return d;
            }
            // Maximum load site index:
            let maxld = fuel.axes[1].siteCount - 1;
            // Calculate the compressed value:
            return d * (
                (site / maxld) +
                ((maxld - site) / maxld) * 
                (ld0 / 256.0));
        }
        // ---------------------------------------------------------
        function fuelUnitsAreMillisec()
        {
            let units = fuel.units;
            switch (units) {
            case "ms":
            case "mS":
            case "MS":
            case "Ms":
                // Fuel is already displayed in milliseconds,
                // so no calculations are required.
                return true;
            default:
                return false;
            }
        }
        // ---------------------------------------------------------
        // Get the fuel injector pulsewidth, in milliseconds.
        function fuelMillisec(axes) {
            if (fuelUnitsAreMillisec()) {
                // Fuel is already displayed in milliseconds,
                // so no calculations are required.
                return fuel.getReal(axes);
            }
            // Calculate pulsewidth in milliseconds.
            // On many ECU's this is scaled via mspb and ld0mpc from
            // the raw fuel value.
            let raw = fuel.getRaw(axes);
            // For ECU's that do not use MSPB or Microsec/bit,
            // the default mspb value may require tweaking so that 
            // the view is correct when the Fuel Map is viewed in
            // pulsewidth mode.
            let mspb = 1;
            if (opt_mspb) {
                mspb = opt_mspb.real;
            }
            if (opt_ld0mpc) {
                let load_site = axes[1];
                raw = ld0mpcFromRaw(raw, load_site);
            }
            return raw * mspb / 1000.0;
        }
        // ---------------------------------------------------------
        // Calculate the angle range that fuel is injected over
        // from a given fuel pulsewidth and engine RPM.
        function fuelAngleFromMS(ms, rpm) {
            // Seconds that the injector is open for.
            let s = ms / 1000.0;
            // degrees per second
            let dps = 360.0 * rpm / 60.0;
            return dps * s;
        }
        // ---------------------------------------------------------
        // Calculate the angle range that fuel is injected over
        // at a given Fuel Map site.
        function fuelAngle(axes) {
            // Get the RPM from the Fuel Map axis table
            let ms = fuelMillisec(axes);
            let rpm = fuel.axes[0].getReal([axes[0]]);
            return fuelAngleFromMS(ms, rpm);
        }
        
        // ---------------------------------------------------------
        // Map data access functions.
        // This code is called as needed by the application.
        // ---------------------------------------------------------
        
        // ---------------------------------------------------------
        // Get the axes of our calculated map.
        // In this case we use the same axes as the Fuel Map.
        function getAxes() {
            if (fuel) return fuel.axes;
            return [];
        }
        // ---------------------------------------------------------
        // Get the raw integer calculated value at the given site.
        function getRaw(axes) {
            if (fuel && injadv) {
                return raw_per_real * 
                      (fuelAngle(axes) + injadv.getReal(axes));
            }
            return 0;
        }
        // ---------------------------------------------------------
        // Set the raw integer calculated value at the given site.
        // This adjusts the injection start angle such that the end
        // injection angle is set to the provided value.
        function setRaw(raw, axes) {
            if (fuel && injadv) {
                let real = raw;
                real /= raw_per_real;
                real -= fuelAngle(axes);
                injadv.setReal(real, axes);
            }
        }
        // ---------------------------------------------------------
        // Get minimum raw integer value for this calculated map.
        function getMinRaw(axes) {
            return raw_per_real * injadv.minReal;
        }
        // ---------------------------------------------------------
        // Get maximum raw integer value for this calculated map.
        function getMaxRaw(axes) {
            return raw_per_real * 
                  (injadv.maxReal + fuelAngleFromMS(60, 10000));
        }
        // ---------------------------------------------------------
        // Get the scaled floating point value from a raw value.
        function realFromRaw(raw, axes) {
            return raw / raw_per_real;
        }
        // ---------------------------------------------------------
        // Get the raw value from a scaled floating point value.
        function rawFromReal(real, axes) {
            return real * raw_per_real;
        }