Subsections of COM Automation API

Classes

Classes Documentation

The following classes are available:

Subsections of Classes

Deprecated List

Member GWv4::IGWv4PCLogging::AppendParameter ([in] BSTR name, [out, retval] BOOL *retval)use AppendChannel. Channels were called ‘parameters’ in versions prior to 4.03.20. Member GWv4::IGWv4PCLogging::ClearParameterList ()use ClearChannelList. Channels were called ‘parameters’ in versions prior to 4.03.20. Member GWv4::IGWv4PCLogging::GetParameter ([in] unsigned int index, [out, retval] BSTR *retval)use GetChannel. Channels were called ‘parameters’ in versions prior to 4.03.20. Member GWv4::IGWv4PCLogging::GetParameterUpdateRateCode ([in] unsigned int index, [out, retval] int *rate)use GetChannelUpdateRateCode. Channels were called ‘parameters’ in versions prior to 4.03.20. Member GWv4::IGWv4PCLogging::ParameterCountuse ChannelCount. Channels were called ‘parameters’ in versions prior to 4.03.20. Member GWv4::IGWv4PCLogging::RemoveParameter ([in] unsigned int index, [out, retval] BOOL *retval)use RemoveChannel. Channels were called ‘parameters’ in versions prior to 4.03.20. Member GWv4::IGWv4PCLogging::SetParameter ([in] unsigned int index, [in] BSTR name, [out, retval] BOOL *retval)use SetChannel. Channels were called ‘parameters’ in versions prior to 4.03.20. Member GWv4::IGWv4PCLogging::SetParameterUpdateRateCode ([in] unsigned int index, [in] int rate)use SetChannelUpdateRateCode. Channels were called ‘parameters’ in versions prior to 4.03.20. Member GWv4::IGWv4PCLoggingExport::ChannelCount- use ChannelCount Member GWv4::IGWv4PCLoggingExport::GetParameter ([in] unsigned int index, [out, retval] BSTR *retval)- use GetChannel. Channels were called ‘parameters’ in versions prior to 4.03.20. Member GWv4::IGWv4PCLoggingExport::GetParameterExportRate ([in] unsigned int index, [out, retval] GWv4StfChannelRate *rate)- use GetParameterExportRate. Channels were called ‘parameters’ in versions prior to 4.03.20. Member GWv4::IGWv4PCLoggingExport::ParameterCount- use ChannelCount. Channels were called ‘parameters’ in versions prior to 4.03.20. Member GWv4::IGWv4PCLoggingExport::SetParameterExportRate ([in] unsigned int index, [in] GWv4StfChannelRate rate)- use SetChannelExportRate. Channels were called ‘parameters’ in versions prior to 4.03.20.

Files

Files Documentation

The following files are available:

Subsections of Files

com_gems.idl

Subsections of Functions

Functions (Alphabetical)

Functions (Alphabetical)

Total functions: 106

Function Owner Description
AddMarker() GWv4::IGWv4PCLogging Add a marker to the log at the current point in time.
AppendChannel([in] BSTR name, [out, retval] BOOL *retval) GWv4::IGWv4PCLogging Set name of the channel at the specified index in the PC logging list.
AppendEcuStatus([in] BSTR path, [in, optional] VARIANT options) GWv4::IGWv4Application Append to ECU status messages.
AppendParameter([in] BSTR name, [out, retval] BOOL *retval) GWv4::IGWv4PCLogging Set name of the channel at the specified index in the PC logging list.
Bind([out, retval] int *ok) GWv4::IGWv4ScriptFunction Bind the function to the script if it was recompiled.
Call([in] SAFEARRAY(VARIANT) args, [out, retval] VARIANT *ret) GWv4::IGWv4ScriptFunction Calls the function (will automatically attempt to bind if not already done so or if the script was recompiled). If the function cannot be bound, this will result in an error E_INVALIDARG.
Cancel(void) GWv4::IGWv4Job Cancels the Job.
CheckNotRunningFlag([out, retval] IGWv4Job **job) GWv4::IGWv4Ecu Check the ECU is not running.
ClearCalibrationToDefaults([out, retval] IGWv4Job **job) GWv4::IGWv4Ecu Erase calibration file data from ECU and set values to defaults where defined.
ClearCalibrationToZero([out, retval] IGWv4Job **job) GWv4::IGWv4Ecu Erase calibration file data from ECU and set values to zero.
ClearChannelList() GWv4::IGWv4PCLogging Remove all channels from the PC logging list.
ClearEcuStatus([in, optional] VARIANT options) GWv4::IGWv4Application Clear ECU status messages.
ClearParameterList() GWv4::IGWv4PCLogging Remove all channel from the PC logging list.
Click([in] VARIANT options) GWv4::IGWv4Application Simulate a mouse click.
CloseCalibration([in] IGWv4FileOptions *options) GWv4::IGWv4Application Closes the currently open calibration.
CloseTab([in] VARIANT tab) GWv4::IGWv4Application Close the given tab.
CloseTab() GWv4::IGWv4PCLogging Close the PC logging tab.
CloseWindow([in] VARIANT options, [out, retval] VARIANT *result) GWv4::IGWv4Application Close a window (if possible).
Compile([in] BSTR script, [out, retval] BOOL *ok) GWv4::IGWv4Script Compiles the given script.
CompileFile([in] BSTR script_file, [out, retval] BOOL *ok) GWv4::IGWv4Script Compiles the given script file.
Connect([in] IGWv4FileOptions *options) GWv4::IGWv4Ecu Connect to an ECU.
ConnectEcu() GWv4::IGWv4Application Connect to an ECU.
CreateExporter([in] BSTR filename, [out, retval] IGWv4PCLoggingExport **exporter) GWv4::IGWv4PCLogging Create a PC logging exporter.
CreateFileOptions([out, retval] IGWv4FileOptions **options) GWv4::IGWv4Application Create an instance of IGWv4FileOptions that can be used to modify the behaviour of various functions that deal with files in one way or another.
CreateOptionsMap([out, retval] IGWv4OptionsMap **options) GWv4::IGWv4Application Create an instance of IDashOptionsMap that can be used to modify the behaviour of various functions that accept options.
CreatePortList([out, retval] IGWv4Ports **retval) GWv4::IGWv4Application Creates an interface for accessing/configuring the various ECU comms ports.
CreateScript([out, retval] IGWv4Script **script) GWv4::IGWv4Application Create an instance of IGWv4Script that can be used to compile and execute scripts within GWv4.
CreateTab([in] BOOL focus_tab) GWv4::IGWv4PCLogging Adds the PC logging tab to the GWv4 UI.
Disconnect([in] IGWv4FileOptions *options) GWv4::IGWv4Ecu Disconnect from the currently connected ECU (if any).
DisconnectEcu() GWv4::IGWv4Application Disconnect from the currently connected ECU (if any).
EnumerateWindows([in, optional] VARIANT options, [out, retval] BSTR *result) GWv4::IGWv4Application Enumerate Windows in the application.
EraseEcuFile([in] int type, [out, retval] IGWv4Job **job) GWv4::IGWv4Ecu Erase file from ECU.
EraseLog([out, retval] IGWv4Job **job) GWv4::IGWv4Ecu Erase log from ECU.
Execute([out, retval] VARIANT *ret) GWv4::IGWv4Script Executes the given script.
Export([in] BSTR filename, [in] IGWv4FileOptions *options, [out, retval] IGWv4Job **job) GWv4::IGWv4PCLoggingExport Export the GLO file to STF format.
FocusWindow([in] VARIANT options) GWv4::IGWv4Application Focus & raise a window (if possible).
GenerateHelpInfo([in, optional] VARIANT options, [out, retval] BSTR *result) GWv4::IGWv4Application Generate Help Information as JSON.
GetAttribute([in] VARIANT name, [out, retval] BSTR *result) GWv4::IGWv4EcuObject Get attribute with given name.
GetAxis([in] unsigned int axis, [out, retval] IGWv4EcuObject **value) GWv4::IGWv4EcuObject Get object representing the specified axis.
GetChannel([in] unsigned int index, [out, retval] BSTR *retval) GWv4::IGWv4PCLogging Get name of the channel at the specified index in the PC logging list.
GetChannel([in] unsigned int index, [out, retval] BSTR *retval) GWv4::IGWv4PCLoggingExport Get name of the channel at the specified index in the PC logging list.
GetChannelExportRate([in] unsigned int index, [out, retval] GWv4StfChannelRate *rate) GWv4::IGWv4PCLoggingExport Get the update rate of the channel at the specified index in the PC logging list.
GetChannelUpdateRateCode([in] unsigned int index, [out, retval] int *rate) GWv4::IGWv4PCLogging Get the update rate of the channel at the specified index in the PC logging list.
GetFunction([in] BSTR name, [out, retval] IGWv4ScriptFunction **func) GWv4::IGWv4Script Gets a handle to a function in the script, which can subsequently be called multiple times.
GetObject([in] BSTR type, [in] BSTR name, [in, optional] VARIANT options, [out, retval] IGWv4EcuObject **ret) GWv4::IGWv4Application Get an object of the specified type (e.g. Channel, Option, Map, Table).
GetParameter([in] unsigned int index, [out, retval] BSTR *retval) GWv4::IGWv4PCLogging Get name of the channel at the specified index in the PC logging list.
GetParameter([in] unsigned int index, [out, retval] BSTR *retval) GWv4::IGWv4PCLoggingExport Get name of the channel at the specified index in the PC logging list.
GetParameterExportRate([in] unsigned int index, [out, retval] GWv4StfChannelRate *rate) GWv4::IGWv4PCLoggingExport Get the update rate of the channel at the specified index in the PC logging list.
GetParameterUpdateRateCode([in] unsigned int index, [out, retval] int *rate) GWv4::IGWv4PCLogging Get the update rate of the channel at the specified index in the PC logging list.
GetPortDevice([in] unsigned int index, [out, retval] BSTR *retval) GWv4::IGWv4Ports Get device ID for the port at the specified index in the port list.
GetPortMemento([in] unsigned int index, [out, retval] BSTR *retval) GWv4::IGWv4Ports Get internal ‘memento’ for the port at the specified index in the port list.
GetPortName([in] unsigned int index, [out, retval] BSTR *retval) GWv4::IGWv4Ports Get friendly name of the port at the specified index in the port list.
GetPortType([in] unsigned int index, [out, retval] int *retval) GWv4::IGWv4Ports Get friendly name of the port at the specified index in the port list.
GetProperties([in] VARIANT options, [out, retval] VARIANT *result) GWv4::IGWv4Application Get all properties from a window / view.
GetProperty([in] VARIANT options, [in] BSTR name, [out, retval] VARIANT *result) GWv4::IGWv4Application Get a single property from a window / view.
GetProperty([in] BSTR name, [out, retval] VARIANT *retval) GWv4::IGWv4OptionsMap
GetRaw([in, optional] VARIANT *axes, [out, retval] VARIANT *value) GWv4::IGWv4EcuObject Get the raw value of the object.
GetReal([in, optional] VARIANT *axes, [out, retval] VARIANT *value) GWv4::IGWv4EcuObject Get the real value of the object.
GetString([in, optional] VARIANT *axes, [out, retval] BSTR *value) GWv4::IGWv4EcuObject Get the string value of the object.
HasAttribute([in] VARIANT name, [out, retval] BOOL *result) GWv4::IGWv4EcuObject Determine if attribute exists.
InstallEcu([in] BSTR path) GWv4::IGWv4Application Installs the ECU definition file from the given path.
InvokeAction([in] BSTR action_id, [in, optional] VARIANT options) GWv4::IGWv4Application Invokes an action with the specified ID.
Keyboard([in] VARIANT options) GWv4::IGWv4Application Simulate a keyboard.
LoadLayout([in] BSTR path, [in, optional] VARIANT options) GWv4::IGWv4Application Load a layout (gxt) file.
NewCalibration([in] BSTR identity, [in, optional] VARIANT options) GWv4::IGWv4Application Create a new calibration file using the given identity json string.
OpenCalibration([in] BSTR path, [in] IGWv4FileOptions *options) GWv4::IGWv4Application Opens the calibration file specified by ‘path’.
ProgramFirmware([in] BSTR path, [out, retval] IGWv4Job **job) GWv4::IGWv4Ecu Program Firmware.
ProgramGpsBeaconStartLine([in] double start_longitude, [in] double start_latitude, [in] double end_longitude, [in] double end_latitude, [in] double heading_radians, [out, retval] IGWv4Job **job) GWv4::IGWv4Ecu Program GPS beacon start line.
RawFromReal([in] VARIANT real, [in, optional] VARIANT *axes, [out, retval] VARIANT *raw) GWv4::IGWv4EcuObject Convert real value to raw value.
ReadCalibration([in] BSTR path, [in] IGWv4FileOptions *options, [out, retval] IGWv4Job **job) GWv4::IGWv4Ecu Read the calibration file from ECU and save to file specified by ‘path’.
ReadEcuFile([in] int type, [in] BSTR path, [out, retval] IGWv4Job **job) GWv4::IGWv4Ecu Read file from ECU and write to disk.
ReadEHL([in] BSTR path, [out, retval] IGWv4Job **job) GWv4::IGWv4Ecu Read the Engine History Log and write to file.
ReadLog([in] BSTR path, [out, retval] IGWv4Job **job) GWv4::IGWv4Ecu Read log from ECU.
RealFromRaw([in] VARIANT raw, [in, optional] VARIANT *axes, [out, retval] VARIANT *real) GWv4::IGWv4EcuObject Convert raw value to real value.
Refresh([out, retval] IGWv4Job **job) GWv4::IGWv4EcuObject2 Start a one-shot read of the whole object from the ECU.
Refresh([in] BSTR typelist) GWv4::IGWv4Ports Refresh the ports list. Blocks execution until complete.
RemoveChannel([in] unsigned int index, [out, retval] BOOL *retval) GWv4::IGWv4PCLogging Set name of the channel at the specified index in the PC logging list.
RemoveParameter([in] unsigned int index, [out, retval] BOOL *retval) GWv4::IGWv4PCLogging Set name of the channel at the specified index in the PC logging list.
SaveCalibration([in] IGWv4FileOptions *options) GWv4::IGWv4Application Saves the current calibration by its current file name.
SaveCalibrationAs([in] BSTR path, [in] IGWv4FileOptions *options) GWv4::IGWv4Application Saves the current calibration with a new file name.
SaveLayout([in] BSTR path, [in, optional] VARIANT options) GWv4::IGWv4Application Save a layout (gxt) file.
SelectPort([in] int type, [in] BSTR device, [out, retval] BOOL *retval) GWv4::IGWv4Ports Set the port for connecting with. The port must exist in the list.
SetChannel([in] unsigned int index, [in] BSTR name, [out, retval] BOOL *retval) GWv4::IGWv4PCLogging Set name of the channel at the specified index in the PC logging list.
SetChannelExportRate([in] unsigned int index, [in] GWv4StfChannelRate rate) GWv4::IGWv4PCLoggingExport Set the STF export rate of the channel at the specified index in the PC logging list.
SetChannelUpdateRateCode([in] unsigned int index, [in] int rate) GWv4::IGWv4PCLogging Set the update rate of the channel at the specified index in the PC logging list.
SetParameter([in] unsigned int index, [in] BSTR name, [out, retval] BOOL *retval) GWv4::IGWv4PCLogging Set name of the channel at the specified index in the PC logging list.
SetParameterExportRate([in] unsigned int index, [in] GWv4StfChannelRate rate) GWv4::IGWv4PCLoggingExport Set the STF export rate of the parameter at the specified index in the PC logging list.
SetParameterUpdateRateCode([in] unsigned int index, [in] int rate) GWv4::IGWv4PCLogging Set the update rate of the channel at the specified index in the PC logging list.
SetProperties([in] VARIANT options, [in] VARIANT props) GWv4::IGWv4Application Set mutiple properties on a window / view.
SetProperty([in] VARIANT options, [in] BSTR name, [in] VARIANT value) GWv4::IGWv4Application Set a single property on a window / view.
SetProperty([in] BSTR name, [in] VARIANT value) GWv4::IGWv4OptionsMap properties are made available by the IDispatch interface (late-binding).
SetRaw([in] VARIANT value, [in, optional] VARIANT *axes) GWv4::IGWv4EcuObject Set the raw value of the object.
SetReal([in] VARIANT value, [in, optional] VARIANT *axes) GWv4::IGWv4EcuObject Set the real value of the object.
SetSimulationProperty([in] VARIANT options) GWv4::IGWv4Application Set a simulator property or Channel value.
SetString([in] VARIANT value, [in, optional] VARIANT *axes) GWv4::IGWv4EcuObject Set the string value of the object.
ShowTab([in] VARIANT tab) GWv4::IGWv4Application Show the given tab.
SimulateEcu([in] VARIANT options) GWv4::IGWv4Application Simulate an ECU.
Start([in] BSTR filename, [out, retval] BSTR *output_file) GWv4::IGWv4PCLogging Starts PC logging to the given output GLO file.
Stop([out, retval] BSTR *output_file) GWv4::IGWv4PCLogging Stops PC logging.
StoreChanges([out, retval] IGWv4Job **job) GWv4::IGWv4Ecu Programs the checksum in the ECU and causes calibration data to be stored in non-volatile memory (saved on ECU).
StringFromRaw([in] VARIANT raw, [in, optional] VARIANT *axes, [out, retval] BSTR *result) GWv4::IGWv4EcuObject Convert raw value to string value.
TakeScreenShot([in, optional] VARIANT options, [out, retval] VARIANT *result) GWv4::IGWv4Application Take a screenshot of a window or the whole application.
VerifyCalibration([out, retval] IGWv4Job **job) GWv4::IGWv4Ecu Read the calibration file from ECU and check it matches the currently loaded calibration file.
Wait(void) GWv4::IGWv4Job Wait for the Job to complete.
WriteCalibration([in] BSTR path, [in] IGWv4FileOptions *options, [out, retval] IGWv4Job **job) GWv4::IGWv4Ecu Write a calibration file to ECU.
WriteEcuFile([in] int type, [in] BSTR path, [out, retval] IGWv4Job **job) GWv4::IGWv4Ecu Load ECU file from disk and write to ECU.

Functions by API

Total functions: 106

IGWv4Application

Function Description
AppendEcuStatus([in] BSTR path, [in, optional] VARIANT options) Append to ECU status messages.
ClearEcuStatus([in, optional] VARIANT options) Clear ECU status messages.
Click([in] VARIANT options) Simulate a mouse click.
CloseCalibration([in] IGWv4FileOptions *options) Closes the currently open calibration.
CloseTab([in] VARIANT tab) Close the given tab.
CloseWindow([in] VARIANT options, [out, retval] VARIANT *result) Close a window (if possible).
ConnectEcu() Connect to an ECU.
CreateFileOptions([out, retval] IGWv4FileOptions **options) Create an instance of IGWv4FileOptions that can be used to modify the behaviour of various functions that deal with files in one way or another.
CreateOptionsMap([out, retval] IGWv4OptionsMap **options) Create an instance of IDashOptionsMap that can be used to modify the behaviour of various functions that accept options.
CreatePortList([out, retval] IGWv4Ports **retval) Creates an interface for accessing/configuring the various ECU comms ports.
CreateScript([out, retval] IGWv4Script **script) Create an instance of IGWv4Script that can be used to compile and execute scripts within GWv4.
DisconnectEcu() Disconnect from the currently connected ECU (if any).
EnumerateWindows([in, optional] VARIANT options, [out, retval] BSTR *result) Enumerate Windows in the application.
FocusWindow([in] VARIANT options) Focus & raise a window (if possible).
GenerateHelpInfo([in, optional] VARIANT options, [out, retval] BSTR *result) Generate Help Information as JSON.
GetObject([in] BSTR type, [in] BSTR name, [in, optional] VARIANT options, [out, retval] IGWv4EcuObject **ret) Get an object of the specified type (e.g. Channel, Option, Map, Table).
GetProperties([in] VARIANT options, [out, retval] VARIANT *result) Get all properties from a window / view.
GetProperty([in] VARIANT options, [in] BSTR name, [out, retval] VARIANT *result) Get a single property from a window / view.
InstallEcu([in] BSTR path) Installs the ECU definition file from the given path.
InvokeAction([in] BSTR action_id, [in, optional] VARIANT options) Invokes an action with the specified ID.
Keyboard([in] VARIANT options) Simulate a keyboard.
LoadLayout([in] BSTR path, [in, optional] VARIANT options) Load a layout (gxt) file.
NewCalibration([in] BSTR identity, [in, optional] VARIANT options) Create a new calibration file using the given identity json string.
OpenCalibration([in] BSTR path, [in] IGWv4FileOptions *options) Opens the calibration file specified by ‘path’.
SaveCalibration([in] IGWv4FileOptions *options) Saves the current calibration by its current file name.
SaveCalibrationAs([in] BSTR path, [in] IGWv4FileOptions *options) Saves the current calibration with a new file name.
SaveLayout([in] BSTR path, [in, optional] VARIANT options) Save a layout (gxt) file.
SetProperties([in] VARIANT options, [in] VARIANT props) Set mutiple properties on a window / view.
SetProperty([in] VARIANT options, [in] BSTR name, [in] VARIANT value) Set a single property on a window / view.
SetSimulationProperty([in] VARIANT options) Set a simulator property or Channel value.
ShowTab([in] VARIANT tab) Show the given tab.
SimulateEcu([in] VARIANT options) Simulate an ECU.
TakeScreenShot([in, optional] VARIANT options, [out, retval] VARIANT *result) Take a screenshot of a window or the whole application.

IGWv4Ecu

Function Description
CheckNotRunningFlag([out, retval] IGWv4Job **job) Check the ECU is not running.
ClearCalibrationToDefaults([out, retval] IGWv4Job **job) Erase calibration file data from ECU and set values to defaults where defined.
ClearCalibrationToZero([out, retval] IGWv4Job **job) Erase calibration file data from ECU and set values to zero.
Connect([in] IGWv4FileOptions *options) Connect to an ECU.
Disconnect([in] IGWv4FileOptions *options) Disconnect from the currently connected ECU (if any).
EraseEcuFile([in] int type, [out, retval] IGWv4Job **job) Erase file from ECU.
EraseLog([out, retval] IGWv4Job **job) Erase log from ECU.
ProgramFirmware([in] BSTR path, [out, retval] IGWv4Job **job) Program Firmware.
ProgramGpsBeaconStartLine([in] double start_longitude, [in] double start_latitude, [in] double end_longitude, [in] double end_latitude, [in] double heading_radians, [out, retval] IGWv4Job **job) Program GPS beacon start line.
ReadCalibration([in] BSTR path, [in] IGWv4FileOptions *options, [out, retval] IGWv4Job **job) Read the calibration file from ECU and save to file specified by ‘path’.
ReadEcuFile([in] int type, [in] BSTR path, [out, retval] IGWv4Job **job) Read file from ECU and write to disk.
ReadEHL([in] BSTR path, [out, retval] IGWv4Job **job) Read the Engine History Log and write to file.
ReadLog([in] BSTR path, [out, retval] IGWv4Job **job) Read log from ECU.
StoreChanges([out, retval] IGWv4Job **job) Programs the checksum in the ECU and causes calibration data to be stored in non-volatile memory (saved on ECU).
VerifyCalibration([out, retval] IGWv4Job **job) Read the calibration file from ECU and check it matches the currently loaded calibration file.
WriteCalibration([in] BSTR path, [in] IGWv4FileOptions *options, [out, retval] IGWv4Job **job) Write a calibration file to ECU.
WriteEcuFile([in] int type, [in] BSTR path, [out, retval] IGWv4Job **job) Load ECU file from disk and write to ECU.

IGWv4EcuObject

Function Description
GetAttribute([in] VARIANT name, [out, retval] BSTR *result) Get attribute with given name.
GetAxis([in] unsigned int axis, [out, retval] IGWv4EcuObject **value) Get object representing the specified axis.
GetRaw([in, optional] VARIANT *axes, [out, retval] VARIANT *value) Get the raw value of the object.
GetReal([in, optional] VARIANT *axes, [out, retval] VARIANT *value) Get the real value of the object.
GetString([in, optional] VARIANT *axes, [out, retval] BSTR *value) Get the string value of the object.
HasAttribute([in] VARIANT name, [out, retval] BOOL *result) Determine if attribute exists.
RawFromReal([in] VARIANT real, [in, optional] VARIANT *axes, [out, retval] VARIANT *raw) Convert real value to raw value.
RealFromRaw([in] VARIANT raw, [in, optional] VARIANT *axes, [out, retval] VARIANT *real) Convert raw value to real value.
SetRaw([in] VARIANT value, [in, optional] VARIANT *axes) Set the raw value of the object.
SetReal([in] VARIANT value, [in, optional] VARIANT *axes) Set the real value of the object.
SetString([in] VARIANT value, [in, optional] VARIANT *axes) Set the string value of the object.
StringFromRaw([in] VARIANT raw, [in, optional] VARIANT *axes, [out, retval] BSTR *result) Convert raw value to string value.

IGWv4EcuObject2

Function Description
Refresh([out, retval] IGWv4Job **job) Start a one-shot read of the whole object from the ECU.

IGWv4Job

Function Description
Cancel(void) Cancels the Job.
Wait(void) Wait for the Job to complete.

IGWv4OptionsMap

Function Description
GetProperty([in] BSTR name, [out, retval] VARIANT *retval)
SetProperty([in] BSTR name, [in] VARIANT value) properties are made available by the IDispatch interface (late-binding).

IGWv4PCLogging

Function Description
AddMarker() Add a marker to the log at the current point in time.
AppendChannel([in] BSTR name, [out, retval] BOOL *retval) Set name of the channel at the specified index in the PC logging list.
AppendParameter([in] BSTR name, [out, retval] BOOL *retval) Set name of the channel at the specified index in the PC logging list.
ClearChannelList() Remove all channels from the PC logging list.
ClearParameterList() Remove all channel from the PC logging list.
CloseTab() Close the PC logging tab.
CreateExporter([in] BSTR filename, [out, retval] IGWv4PCLoggingExport **exporter) Create a PC logging exporter.
CreateTab([in] BOOL focus_tab) Adds the PC logging tab to the GWv4 UI.
GetChannel([in] unsigned int index, [out, retval] BSTR *retval) Get name of the channel at the specified index in the PC logging list.
GetChannelUpdateRateCode([in] unsigned int index, [out, retval] int *rate) Get the update rate of the channel at the specified index in the PC logging list.
GetParameter([in] unsigned int index, [out, retval] BSTR *retval) Get name of the channel at the specified index in the PC logging list.
GetParameterUpdateRateCode([in] unsigned int index, [out, retval] int *rate) Get the update rate of the channel at the specified index in the PC logging list.
RemoveChannel([in] unsigned int index, [out, retval] BOOL *retval) Set name of the channel at the specified index in the PC logging list.
RemoveParameter([in] unsigned int index, [out, retval] BOOL *retval) Set name of the channel at the specified index in the PC logging list.
SetChannel([in] unsigned int index, [in] BSTR name, [out, retval] BOOL *retval) Set name of the channel at the specified index in the PC logging list.
SetChannelUpdateRateCode([in] unsigned int index, [in] int rate) Set the update rate of the channel at the specified index in the PC logging list.
SetParameter([in] unsigned int index, [in] BSTR name, [out, retval] BOOL *retval) Set name of the channel at the specified index in the PC logging list.
SetParameterUpdateRateCode([in] unsigned int index, [in] int rate) Set the update rate of the channel at the specified index in the PC logging list.
Start([in] BSTR filename, [out, retval] BSTR *output_file) Starts PC logging to the given output GLO file.
Stop([out, retval] BSTR *output_file) Stops PC logging.

IGWv4PCLoggingExport

Function Description
Export([in] BSTR filename, [in] IGWv4FileOptions *options, [out, retval] IGWv4Job **job) Export the GLO file to STF format.
GetChannel([in] unsigned int index, [out, retval] BSTR *retval) Get name of the channel at the specified index in the PC logging list.
GetChannelExportRate([in] unsigned int index, [out, retval] GWv4StfChannelRate *rate) Get the update rate of the channel at the specified index in the PC logging list.
GetParameter([in] unsigned int index, [out, retval] BSTR *retval) Get name of the channel at the specified index in the PC logging list.
GetParameterExportRate([in] unsigned int index, [out, retval] GWv4StfChannelRate *rate) Get the update rate of the channel at the specified index in the PC logging list.
SetChannelExportRate([in] unsigned int index, [in] GWv4StfChannelRate rate) Set the STF export rate of the channel at the specified index in the PC logging list.
SetParameterExportRate([in] unsigned int index, [in] GWv4StfChannelRate rate) Set the STF export rate of the parameter at the specified index in the PC logging list.

IGWv4Ports

Function Description
GetPortDevice([in] unsigned int index, [out, retval] BSTR *retval) Get device ID for the port at the specified index in the port list.
GetPortMemento([in] unsigned int index, [out, retval] BSTR *retval) Get internal ‘memento’ for the port at the specified index in the port list.
GetPortName([in] unsigned int index, [out, retval] BSTR *retval) Get friendly name of the port at the specified index in the port list.
GetPortType([in] unsigned int index, [out, retval] int *retval) Get friendly name of the port at the specified index in the port list.
Refresh([in] BSTR typelist) Refresh the ports list. Blocks execution until complete.
SelectPort([in] int type, [in] BSTR device, [out, retval] BOOL *retval) Set the port for connecting with. The port must exist in the list.

IGWv4Script

Function Description
Compile([in] BSTR script, [out, retval] BOOL *ok) Compiles the given script.
CompileFile([in] BSTR script_file, [out, retval] BOOL *ok) Compiles the given script file.
Execute([out, retval] VARIANT *ret) Executes the given script.
GetFunction([in] BSTR name, [out, retval] IGWv4ScriptFunction **func) Gets a handle to a function in the script, which can subsequently be called multiple times.

IGWv4ScriptFunction

Function Description
Bind([out, retval] int *ok) Bind the function to the script if it was recompiled.
Call([in] SAFEARRAY(VARIANT) args, [out, retval] VARIANT *ret) Calls the function (will automatically attempt to bind if not already done so or if the script was recompiled). If the function cannot be bound, this will result in an error E_INVALIDARG.

IGWv4Application

IGWv4Application automation interface.

Instances supporting this interface may be created using the Application coclass.

e.g.
Javascript:

var obj = new ActiveXObject("GWv4.Application");

VBScript:

Dim obj As Object
Set obj = CreateObject("GWv4.Application")

C++, via C++ Interface:

::CoInitialize(NULL);
IGWv4Application* iface = 0;
HRESULT hr = ::CoCreateInstance(
    CLSID_Application, 
    NULL, 
    CLSCTX_LOCAL_SERVER,
    IID_IApplication,
    (LPVOID*)&iface);

if (iface) {
    iface->Show();
    iface->Release();
}
::CoUninitialize();

C++, via IDispatch:

::CoInitialize(NULL);
HRESULT    hr;
CLSID      clsid;        // CLSID of ActiveX object.
LPUNKNOWN  punk  = NULL; // IUnknown of ActiveX object.
LPDISPATCH pdisp = NULL; // IDispatch of ActiveX object.

// Retrieve CLSID for GWv4.Application from the registry.
// This is {33AE968A-6D0E-4344-BB40-3A137209BA75} which could be 
// used directly for better performance.
hr = CLSIDFromProgID(L"GWv4.Application", &clsid);
if (FAILED(hr)) {
    return hr;
}  
// Create an instance of the ActiveX object.
hr = CoCreateInstance(clsid, NULL, CLSCTX_SERVER, 
                      IID_IUnknown, (void **)&punk);
if (FAILED(hr)) {
    if (punk) punk->Release();
    return hr;
}    
hr = punk->QueryInterface(IID_IDispatch, (void **)&pdisp);
if (FAILED(hr)) {
    punk->Release();
    if (pdisp) pdisp->Release();
    return hr;
}
punk->Release();
// << Use the dispatch interface..
pdisp->Release();    
::CoUninitialize();

Contents

Properties

Property Description
Visible Displays/hides the Application UI.
FullScreen Makes the window fullscreen (or not).
LastErrorString Provides an error string describing the last method failure that occurred, if possible.
Session Not yet implemented.
Tabs Not yet implemented.
Ecu Not yet implemented.
PCLogging Gets an interface to PC logging features.
LogPlayback Gets an interface to Log playback features.
Telemetry Gets an interface for accessing/configuring CAN / Serial telemetry. Not implemented yet.
CalibrationNotes Gets/Sets calibration notes.
IsEcuConnected Determine if the ECU is connected (online).
TabCountTotal Gets the number of tabs in the GWv4 UI.
CurrentBaudRate Gets the number of tabs in the GWv4 UI.
HasActiveTransactions Return number of active ECU Comms transations.

Public Methods

Function Description
CreateFileOptions Create an instance of IGWv4FileOptions that can be used to modify the behaviour of various functions that deal with files in one way or another.
CreateScript Create an instance of IGWv4Script that can be used to compile and execute scripts within GWv4.
CreatePortList Creates an interface for accessing/configuring the various ECU comms ports.
OpenCalibration Opens the calibration file specified by ‘path’.
SaveCalibration Saves the current calibration by its current file name.
SaveCalibrationAs Saves the current calibration with a new file name.
CloseCalibration Closes the currently open calibration.
InstallEcu Installs the ECU definition file from the given path.
ConnectEcu Connect to an ECU.
DisconnectEcu Disconnect from the currently connected ECU (if any).
CreateOptionsMap Create an instance of IDashOptionsMap that can be used to modify the behaviour of various functions that accept options.
InvokeAction Invokes an action with the specified ID.
GenerateHelpInfo Generate Help Information as JSON.
EnumerateWindows Enumerate Windows in the application.
TakeScreenShot Take a screenshot of a window or the whole application.
CloseWindow Close a window (if possible).
FocusWindow Focus & raise a window (if possible).
SetProperties Set mutiple properties on a window / view.
GetProperties Get all properties from a window / view.
SetProperty Set a single property on a window / view.
GetProperty Get a single property from a window / view.
LoadLayout Load a layout (gxt) file.
SaveLayout Save a layout (gxt) file.
ShowTab Show the given tab.
CloseTab Close the given tab.
SimulateEcu Simulate an ECU.
SetSimulationProperty Set a simulator property or Channel value.
Click Simulate a mouse click.
Keyboard Simulate a keyboard.
ClearEcuStatus Clear ECU status messages.
AppendEcuStatus Append to ECU status messages.
NewCalibration Create a new calibration file using the given identity json string.
GetObject Get an object of the specified type (e.g. Channel, Option, Map, Table).

Properties

Visible

Displays/hides the Application UI.

BOOL Visible

The UI will be hidden initially when creating an instance of GWv4.

FullScreen

Makes the window fullscreen (or not).

BOOL FullScreen

Setting this value to TRUE causes the application window to take up the full screen without title bars etc.

When entering fullscreen mode via the COM Automation Interface, the popup ’toaster’ window giving users a way of exiting fullscreen mode is not displayed.

LastErrorString

Provides an error string describing the last method failure that occurred, if possible.

BSTR LastErrorString

Where appropriate, this string is also included in Error exception description strings as a result of IDispatch calls (e.g. when accessed via late binding as with JavaScript).

Session

Not yet implemented.

IDispatch Session

In future this will return an interface to the ‘Session’ object which will give access to data models etc.

Tabs

Not yet implemented.

IDispatch Tabs

In future this will return an interface that gives access/control of the list of tabs, tab groups, views within tabs etc.

Ecu

Not yet implemented.

IDispatch Ecu

In future this will return an interface that gives access/control of the ECU directly.

PCLogging

Gets an interface to PC logging features.

IGWv4PCLogging PCLogging

LogPlayback

Gets an interface to Log playback features.

IDispatch LogPlayback

Telemetry

Gets an interface for accessing/configuring CAN / Serial telemetry. Not implemented yet.

IDispatch Telemetry

CalibrationNotes

Gets/Sets calibration notes.

BSTR CalibrationNotes

IsEcuConnected

Determine if the ECU is connected (online).

BOOL IsEcuConnected

The GIN file should be loaded if this is ’true’. However, it is possible that the calibartion and/or tabs are not downloaded / loaded yet.

TabCountTotal

Gets the number of tabs in the GWv4 UI.

int TabCountTotal

This can be used as a basic check to see if the tabs have been loaded for the current session.

CurrentBaudRate

Gets the number of tabs in the GWv4 UI.

int CurrentBaudRate

This can be used as a basic check to see if the tabs have been loaded for the current session.

HasActiveTransactions

Return number of active ECU Comms transations.

BOOL HasActiveTransactions

When the connection is idle (but connected), this will be zero.

Public Methods

Method: CreateFileOptions

Create an instance of IGWv4FileOptions that can be used to modify the behaviour of various functions that deal with files in one way or another.

HRESULT CreateFileOptions([out, retval] IGWv4FileOptions **options)

See Also: IGWv4FileOptions

Method: CreateScript

Create an instance of IGWv4Script that can be used to compile and execute scripts within GWv4.

HRESULT CreateScript([out, retval] IGWv4Script **script)

See Also: IGWv4Script

Method: CreatePortList

Creates an interface for accessing/configuring the various ECU comms ports.

HRESULT CreatePortList([out, retval] IGWv4Ports **retval)

Method: OpenCalibration

Opens the calibration file specified by ‘path’.

HRESULT OpenCalibration([in] BSTR path, [in] IGWv4FileOptions *options)

Method: SaveCalibration

Saves the current calibration by its current file name.

HRESULT SaveCalibration([in] IGWv4FileOptions *options)

If the calibration does not have a file name then the behaviour of this function will depend upon the ‘options’ parameter and may not be saved as a result.

See IGWv4FileOptions::SaveModifiedDiscard and IGWv4FileOptions::SaveModifiedPrompt

Method: SaveCalibrationAs

Saves the current calibration with a new file name.

HRESULT SaveCalibrationAs([in] BSTR path, [in] IGWv4FileOptions *options)

See IGWv4FileOptions::OverwriteAllow and IGWv4FileOptions::OverwriteSilent

Method: CloseCalibration

Closes the currently open calibration.

HRESULT CloseCalibration([in] IGWv4FileOptions *options)

In practice, currently the ‘options’ parameter has no effect on this function but has been added to support possible future changes to the application.

Method: InstallEcu

Installs the ECU definition file from the given path.

HRESULT InstallEcu([in] BSTR path)

Method: ConnectEcu

Connect to an ECU.

HRESULT ConnectEcu()

Method: DisconnectEcu

Disconnect from the currently connected ECU (if any).

HRESULT DisconnectEcu()

Method: CreateOptionsMap

Create an instance of IDashOptionsMap that can be used to modify the behaviour of various functions that accept options.

HRESULT CreateOptionsMap([out, retval] IGWv4OptionsMap **options)

It is also possible to use JavaScript objects for options instead of an options map.

See Also: IGWv4OptionsMap

Method: InvokeAction

Invokes an action with the specified ID.

HRESULT InvokeAction([in] BSTR action_id, [in, optional] VARIANT options)

With the option “menuItem”, action_id instead chooses an item of the open popup menu: the labels of any sub menus and the item, separated by ‘|’, e.g. “Gauge Layout|Anchors/Positioning”.

Fails, with LastErrorString describing why, if the action is unknown.

Method: GenerateHelpInfo

Generate Help Information as JSON.

HRESULT GenerateHelpInfo([in, optional] VARIANT options, [out, retval] BSTR *result)

Returns

The information as a JSON string. If outputFile is specified in options then the returned string will be blank.

If the ‘options’ parameter has a property ‘outputFile’ then the JSON will be written to that file instead of returned as a string.

Method: EnumerateWindows

Enumerate Windows in the application.

HRESULT EnumerateWindows([in, optional] VARIANT options, [out, retval] BSTR *result)

Returns

The information as a JSON string.

The result is an object whose “windows” array lists the top level windows, or only the window chosen by the option “id”, “name”, “label” or “lastCreatedView”. Each window has “id”, “label”, “name”, “type”, “shown”, “visible” (shown along with all its parents), “helpId” and its position, with child windows in “windows”. Option “depth” limits the levels of child windows: 0 lists none, which is much faster. If the option “outputFile” is given, the JSON is written to that file instead.

Method: TakeScreenShot

Take a screenshot of a window or the whole application.

HRESULT TakeScreenShot([in, optional] VARIANT options, [out, retval] VARIANT *result)

Returns

The information as a JSON string.

If the ‘options’ parameter has a property ‘outputFile’ then the screenshot will be output to that path instead of returned.

options can identify the window through one of the following keys:

  • id
  • name
  • label
  • lastCreatedView == true
  • menu If one of these items are not specified then a screenshot of the main window will be taken.

Other options:

  • print: true/false (default false) - use WM_PRINT instead of blitting the window DC.
  • clipboard: place the screenshot on the Windows clipboard
  • focus: true/false (default true) - focus the window first.
  • cursor: true/false (default false) - draw the mouse cursor.
  • expand: pixels to include around the window.

Screenshots of top-level windows include their drop shadow, with transparency. See the “captureMethod” property of SetProperty for screenshots of hidden windows.

Method: CloseWindow

Close a window (if possible).

HRESULT CloseWindow([in] VARIANT options, [out, retval] VARIANT *result)

Returns

TRUE if OK, false otherwise. This is a variant for posssilbe future changes.

options:

  • id: Window ID for the window to close.
  • menu: set to ’true’ to close the context menu.
  • name: ’name’ of window to close.
  • label: ’label’ of window to close.
  • lastCreatedView: true -> last created view code: result code (e.g. if the window is modal - see e.g. wxID_OK).

Method: FocusWindow

Focus & raise a window (if possible).

HRESULT FocusWindow([in] VARIANT options)

Additional options: movex: move window to x coordinate movey: move window to y coordinate

Method: SetProperties

Set mutiple properties on a window / view.

HRESULT SetProperties([in] VARIANT options, [in] VARIANT props)

Fails if any property is unknown or cannot be set.

Method: GetProperties

Get all properties from a window / view.

HRESULT GetProperties([in] VARIANT options, [out, retval] VARIANT *result)
  • detailed: true/false - if true, return detailed information about the properties.

Returns

a JSON string detailing the properties.

Method: SetProperty

Set a single property on a window / view.

HRESULT SetProperty([in] VARIANT options, [in] BSTR name, [in] VARIANT value)

If a window ID/name/label is not supplied, the main frame will be selected.

Special Properties:

  • “useDefaultSettings”: Set the application settings to defaults for this run.
  • “selection”: string: json style array [[row,col],…n]. ‘col’ is optional. e.g. “[[5,2],[5,3]]” If a number is specified, the whole row is selected.
  • “expand_all”: Boolean - Expand (True)/Collapse (False) the tree grid.
  • “text”: For text editors, sets the text.
  • “maximized”: Boolean - make window maximized (or not). Only for top-level windows.
  • “width_dp”: Width of window, in ‘device’ pixels.
  • “height_dp”: Height of window, in ‘device’ pixels.
  • “pos_x_dp”: X position of window, in ‘device’ pixels.
  • “pos_y_dp”: Y position of window, in ‘device’ pixels.
  • “width_px”: Width of window, in ‘physical’ pixels.
  • “height_px”: Height of window, in ‘physical’ pixels.
  • “pos_x_px”: X position of window, in ‘physical’ pixels.
  • “pos_y_px”: Y position of window, in ‘physical’ pixels.
  • “pinned”: For docked windows, either pins the window to the docking area or puts it in the autohide strip.
  • “path”: For CalBrowser / file picker (AbstractFileBrowseEdit) windows, sets the file path.
  • “identity”: JSON string representing ECU identity for InstalledEcuPicker.
  • “ecu_reset_supress_popup”: Supress the ‘ECU Reset’ popup.
  • “current_tab_id”: For TabControl / PageContainer, the id of child window tpo select.
  • “preferences_page_id”: For application preferences dialog, ID of child page to select.
  • “name_filter”: Set ECU name filter of Calibration File Browser.
  • “version_filter”: Set ECU version filter of Calibration File Browser.
  • “suppress_status_popup”: Set user setting to suppress ECU status popup when connecting.
  • “show_status_in_default_workspace”: Set user setting to show ECU status in default workspace (see also InvokeAction(“actions/viewReset”)).
  • “scroll_x”: Set horizontal scroll position of window.
  • “scroll_y”: Set vertical scroll position of window.
  • “checked”: Boolean - for check boxes.
  • “value”: For spin boxes and the knob dialog.
  • “float”: Boolean - for docked windows, float (True) or dock (False) the window.
  • “file_name”: Set the file name of the Calibration File Browser.
  • “import_path”: For the ECU definition extensions manager, imports the extension file at this path into the calibration.
  • “make_row_visible”: For grids, scroll the given row into view.
  • “expand_levels”: For tree grids, expand the items down to the given number of levels.
  • “captureMethod”: Application property, “screen” (the default) or “printWindow”. With “printWindow”, TakeScreenShot asks Windows to render each window, and Click and Keyboard send window messages. This works on a hidden desktop or while the computer is locked, but window frames can differ and overlapping windows are not shown.

Fails, with LastErrorString describing why, if the property is unknown or does not apply to the window.

Method: GetProperty

Get a single property from a window / view.

HRESULT GetProperty([in] VARIANT options, [in] BSTR name, [out, retval] VARIANT *result)

Returns

The property value.

Special properties

  • applicationDpiPercent: Gets the display scaling value of the application window as a percentage.
  • focusedWindowID: Get the ID of the currently focused window. No window ID required as input.
  • currentWorkPageID: Get the ID of the active work page. No window ID required as input.
  • focusedViewID: Get the ID of the focused dock panel of the specified window.
  • parentViewID: Get the ID of the parent dock panel of the specified window.
  • userDocsPath: Get application folder in user documents.
  • userAppDataPath: Get application data path (e.g. APPDATA%/GEMS/GWv4)
  • commonAppDataPath: Get application common data path (e.g. PROGRAMDATA%/GEMS/GWv4)
  • identity: JSON string representing ECU identity for InstalledEcuPicker.
  • applicationTitle: The title of the main window.
  • cell_x, cell_y, cell_w, cell_h: coordinates of grid cell bounding rectangle (use row/col options), relative to the scrolled view so that the cell can be clicked.
  • cell_text: text of the grid cell at row/col.
  • row_count: number of grid rows.
  • gridFindText: Find an item in a grid, given a text (“text”) string and a column (“col”), with optional starting row (“row”). Returns a selection in JSON format, if text was not found returns empty string.
  • gridFindRow: As gridFindText, but returns the row number, or -1 if the text was not found.
  • captureMethod: “screen” or “printWindow” - see SetProperty.
  • activity: JSON describing what the application is doing, so that a client can wait until it has finished the last step instead of pausing for a fixed time: {“pending”: bool, “idle”: bool, “reason”: string, “cpuCycles”: number}. “pending” is true while work started by an automation call has not been processed, such as deferred calls, events, queued input or paint, or ECU transactions. “idle” is true when nothing at all is waiting, which is rare because periodic updates post messages. “cpuCycles” counts the CPU cycles used by the application, so that background threads can be detected by comparing two readings.

Method: LoadLayout

Load a layout (gxt) file.

HRESULT LoadLayout([in] BSTR path, [in, optional] VARIANT options)

Method: SaveLayout

Save a layout (gxt) file.

HRESULT SaveLayout([in] BSTR path, [in, optional] VARIANT options)

Method: ShowTab

Show the given tab.

HRESULT ShowTab([in] VARIANT tab)

Method: CloseTab

Close the given tab.

HRESULT CloseTab([in] VARIANT tab)

Method: SimulateEcu

Simulate an ECU.

HRESULT SimulateEcu([in] VARIANT options)

Method: SetSimulationProperty

Set a simulator property or Channel value.

HRESULT SetSimulationProperty([in] VARIANT options)

Simulator Properties:

  • BlockSizeIdx
  • EepromSize
  • RomChecksum
  • RomSec
  • BlockSizeValid
  • CRC16Enabled
  • FastCalEnabled
  • Secured
  • LogFile
  • RawSetup
  • RawLog
  • EngineHistoryLog
  • FirmwareFile
  • BootloaderFile
  • CoProFirmwareFile
  • CoProBootloaderFile

Method: Click

Simulate a mouse click.

HRESULT Click([in] VARIANT options)

Fails, without clicking, if the point is not in the visible part of the window or another window covers it. Otherwise the click could go to another application. Moves and releases are not checked, because a drag moves the mouse outside the window where it started.

Method: Keyboard

Simulate a keyboard.

HRESULT Keyboard([in] VARIANT options)

Method: ClearEcuStatus

Clear ECU status messages.

HRESULT ClearEcuStatus([in, optional] VARIANT options)

Method: AppendEcuStatus

Append to ECU status messages.

HRESULT AppendEcuStatus([in] BSTR path, [in, optional] VARIANT options)

Method: NewCalibration

Create a new calibration file using the given identity json string.

HRESULT NewCalibration([in] BSTR identity, [in, optional] VARIANT options)

Method: GetObject

Get an object of the specified type (e.g. Channel, Option, Map, Table).

HRESULT GetObject([in] BSTR type, [in] BSTR name, [in, optional] VARIANT options, [out, retval] IGWv4EcuObject **ret)

IGWv4Ecu

Contents

Properties

Property Description
Definition Get interface to GIN file.
IsConnected Determine if the ECU is connected (online).

Public Methods

Function Description
Connect Connect to an ECU.
Disconnect Disconnect from the currently connected ECU (if any).
ReadCalibration Read the calibration file from ECU and save to file specified by ‘path’.
WriteCalibration Write a calibration file to ECU.
VerifyCalibration Read the calibration file from ECU and check it matches the currently loaded calibration file.
ClearCalibrationToDefaults Erase calibration file data from ECU and set values to defaults where defined.
ClearCalibrationToZero Erase calibration file data from ECU and set values to zero.
ProgramFirmware Program Firmware.
CheckNotRunningFlag Check the ECU is not running.
StoreChanges Programs the checksum in the ECU and causes calibration data to be stored in non-volatile memory (saved on ECU).
ReadEHL Read the Engine History Log and write to file.
ReadEcuFile Read file from ECU and write to disk.
WriteEcuFile Load ECU file from disk and write to ECU.
EraseEcuFile Erase file from ECU.
ReadLog Read log from ECU.
EraseLog Erase log from ECU.
ProgramGpsBeaconStartLine Program GPS beacon start line.

Properties

Definition

Get interface to GIN file.

IDispatch Definition

IsConnected

Determine if the ECU is connected (online).

BOOL IsConnected

The GIN file should be loaded if this is ’true’. However, it is possible that the calibartion and/or tabs are not downloaded / loaded yet.

Public Methods

Method: Connect

Connect to an ECU.

HRESULT Connect([in] IGWv4FileOptions *options)

Method: Disconnect

Disconnect from the currently connected ECU (if any).

HRESULT Disconnect([in] IGWv4FileOptions *options)

Method: ReadCalibration

Read the calibration file from ECU and save to file specified by ‘path’.

HRESULT ReadCalibration([in] BSTR path, [in] IGWv4FileOptions *options, [out, retval] IGWv4Job **job)

see IGWv4FileOptions::overwriteallow and IGWv4FileOptions::overwritesilent

Method: WriteCalibration

Write a calibration file to ECU.

HRESULT WriteCalibration([in] BSTR path, [in] IGWv4FileOptions *options, [out, retval] IGWv4Job **job)

Method: VerifyCalibration

Read the calibration file from ECU and check it matches the currently loaded calibration file.

HRESULT VerifyCalibration([out, retval] IGWv4Job **job)

Method: ClearCalibrationToDefaults

Erase calibration file data from ECU and set values to defaults where defined.

HRESULT ClearCalibrationToDefaults([out, retval] IGWv4Job **job)

Method: ClearCalibrationToZero

Erase calibration file data from ECU and set values to zero.

HRESULT ClearCalibrationToZero([out, retval] IGWv4Job **job)

Method: ProgramFirmware

Program Firmware.

HRESULT ProgramFirmware([in] BSTR path, [out, retval] IGWv4Job **job)

Method: CheckNotRunningFlag

Check the ECU is not running.

HRESULT CheckNotRunningFlag([out, retval] IGWv4Job **job)

Method: StoreChanges

Programs the checksum in the ECU and causes calibration data to be stored in non-volatile memory (saved on ECU).

HRESULT StoreChanges([out, retval] IGWv4Job **job)

Method: ReadEHL

Read the Engine History Log and write to file.

HRESULT ReadEHL([in] BSTR path, [out, retval] IGWv4Job **job)

Method: ReadEcuFile

Read file from ECU and write to disk.

HRESULT ReadEcuFile([in] int type, [in] BSTR path, [out, retval] IGWv4Job **job)

Method: WriteEcuFile

Load ECU file from disk and write to ECU.

HRESULT WriteEcuFile([in] int type, [in] BSTR path, [out, retval] IGWv4Job **job)

Method: EraseEcuFile

Erase file from ECU.

HRESULT EraseEcuFile([in] int type, [out, retval] IGWv4Job **job)

Method: ReadLog

Read log from ECU.

HRESULT ReadLog([in] BSTR path, [out, retval] IGWv4Job **job)

Method: EraseLog

Erase log from ECU.

HRESULT EraseLog([out, retval] IGWv4Job **job)

Method: ProgramGpsBeaconStartLine

Program GPS beacon start line.

HRESULT ProgramGpsBeaconStartLine([in] double start_longitude, [in] double start_latitude, [in] double end_longitude, [in] double end_latitude, [in] double heading_radians, [out, retval] IGWv4Job **job)

IGWv4EcuObject

Contents

Properties

Property Description
AxisCount Get number of axes.
SiteCount Get total number of sites.
Index Index, index of the object in the collection of similarly typed objects.
Name Name of the object.
Description Description, description of the object.
Units Units of the object.
ElementSize Element size, in bytes.
Address Address, address of the object.
IsBit IsBit, true if object is a single bit.
IsReadOnly IsReadOnly, true if object is read only.
IsSigned IsSigned, true if object is signed.
MaxRaw MaxRaw, maximum raw value.
MinRaw MinRaw, minimum raw value.
MaxReal MaxReal, maximum real value.
MinReal MinReal, minimum real value.

Public Methods

Function Description
GetReal Get the real value of the object.
SetReal Set the real value of the object.
GetRaw Get the raw value of the object.
SetRaw Set the raw value of the object.
GetString Get the string value of the object.
SetString Set the string value of the object.
GetAxis Get object representing the specified axis.
GetAttribute Get attribute with given name.
HasAttribute Determine if attribute exists.
RawFromReal Convert real value to raw value.
RealFromRaw Convert raw value to real value.
StringFromRaw Convert raw value to string value.

Properties

AxisCount

Get number of axes.

int AxisCount

SiteCount

Get total number of sites.

int SiteCount

Index

Index, index of the object in the collection of similarly typed objects.

int Index

Name

Name of the object.

BSTR Name

Description

Description, description of the object.

BSTR Description

Units

Units of the object.

BSTR Units

ElementSize

Element size, in bytes.

int ElementSize

Address

Address, address of the object.

long Address

For A2L files, this includes the address extension in the upper 32 bits.

IsBit

IsBit, true if object is a single bit.

VARIANT_BOOL IsBit

IsReadOnly

IsReadOnly, true if object is read only.

VARIANT_BOOL IsReadOnly

IsSigned

IsSigned, true if object is signed.

VARIANT_BOOL IsSigned

MaxRaw

MaxRaw, maximum raw value.

VARIANT MaxRaw

MinRaw

MinRaw, minimum raw value.

VARIANT MinRaw

MaxReal

MaxReal, maximum real value.

VARIANT MaxReal

MinReal

MinReal, minimum real value.

VARIANT MinReal

Public Methods

Method: GetReal

Get the real value of the object.

HRESULT GetReal([in, optional] VARIANT *axes, [out, retval] VARIANT *value)

Method: SetReal

Set the real value of the object.

HRESULT SetReal([in] VARIANT value, [in, optional] VARIANT *axes)

Method: GetRaw

Get the raw value of the object.

HRESULT GetRaw([in, optional] VARIANT *axes, [out, retval] VARIANT *value)

Method: SetRaw

Set the raw value of the object.

HRESULT SetRaw([in] VARIANT value, [in, optional] VARIANT *axes)

Method: GetString

Get the string value of the object.

HRESULT GetString([in, optional] VARIANT *axes, [out, retval] BSTR *value)

Method: SetString

Set the string value of the object.

HRESULT SetString([in] VARIANT value, [in, optional] VARIANT *axes)

Method: GetAxis

Get object representing the specified axis.

HRESULT GetAxis([in] unsigned int axis, [out, retval] IGWv4EcuObject **value)

Method: GetAttribute

Get attribute with given name.

HRESULT GetAttribute([in] VARIANT name, [out, retval] BSTR *result)

Method: HasAttribute

Determine if attribute exists.

HRESULT HasAttribute([in] VARIANT name, [out, retval] BOOL *result)

Method: RawFromReal

Convert real value to raw value.

HRESULT RawFromReal([in] VARIANT real, [in, optional] VARIANT *axes, [out, retval] VARIANT *raw)

Method: RealFromRaw

Convert raw value to real value.

HRESULT RealFromRaw([in] VARIANT raw, [in, optional] VARIANT *axes, [out, retval] VARIANT *real)

Method: StringFromRaw

Convert raw value to string value.

HRESULT StringFromRaw([in] VARIANT raw, [in, optional] VARIANT *axes, [out, retval] BSTR *result)

IGWv4EcuObject2

ECU object access with a one-shot refresh from the connected ECU.

Extends IGWv4EcuObject without changing its published interface. GetObject and GetAxis return objects supporting both interfaces. GetReal, GetRaw and GetString read cached values and do not request ECU data.

JavaScript (Windows Script Host):

// The application must already have the required setup open and ECU connected.
var object = app.GetObject("String", "Your string name");
var job = object.Refresh();
job.Wait(); // Throws if the read failed. Alternatively, poll Completed and check Failed.
WScript.Echo(object.GetString());

Contents

Public Methods

Function Description
Refresh Start a one-shot read of the whole object from the ECU.

Public Methods

Method: Refresh

Start a one-shot read of the whole object from the ECU.

HRESULT Refresh([out, retval] IGWv4Job **job)

Check the job’s completion status before reading the cached value. This does not enable continuous polling or write values to the ECU.

IGWv4FileOptions

Interface for configuring file control options for use with various file-based functions in the COM API.

Contents

Properties

Property Description
OverwriteAllow Allow file overwrites.
OverwriteSilent Silently ovewrite files.
SaveModifiedDiscard Silently discard modified files.
SaveModifiedPrompt Prompt to save modified files.
UpdateRecentFiles Control whether or not file will be added to recent file lists (displayed in application file menu).

Properties

OverwriteAllow

Allow file overwrites.

BOOL OverwriteAllow

If FALSE, the attempting to overwrite existing files will silently fail.

The operation in question should return a failure code.

Default: FALSE.

OverwriteSilent

Silently ovewrite files.

BOOL OverwriteSilent

If TRUE, files will be silently overwritten.

Otherwise a dialog box will be displayed.

Has no effect if (OverwriteAllow == FALSE).

Default: TRUE.

SaveModifiedDiscard

Silently discard modified files.

BOOL SaveModifiedDiscard

If TRUE, closing of modified files/projects will be sliently discared.

Default: TRUE.

SaveModifiedPrompt

Prompt to save modified files.

BOOL SaveModifiedPrompt

If TRUE, closing of modified files/projects will be prompted for saving with a dialog box.

Has no effect if (SaveModifiedDiscard == TRUE).

Default: FALSE.

UpdateRecentFiles

Control whether or not file will be added to recent file lists (displayed in application file menu).

BOOL UpdateRecentFiles

If TRUE, places opened/saved files on recent file lists.

Default: FALSE.

IGWv4Job

Interface for controlling and monitoring the progress of asynchronous Jobs/Tasks.

e.g. Javascript:

var gda = new ActiveXObject("GWv4.Application");
if (gda) {
    var fileopt = gda.CreateFileOptions();
    var job = gda.ImportLog(
        "C:\\Folder\\text_data.csv",
        "C:\\Folder\\text_data_import.stf",
        "C:\\Folder\\import_template.gdasvtemp",
        fileopt
    );
    while (!job.Completed) {
        var prog = (job.Progress * 100) + "%";
        WScript.StdOut.WriteLine(prog);
        WScript.Sleep(500);
    }
    WScript.StdOut.WriteLine("Completed.");
    if (job.Error && job.Error.length) {
        WScript.StdOut.WriteLine("Error: " + job.Error);
    }
}

Contents

Properties

Property Description
Progress Gets the progress of the Job as a value between 0.0 and 1.0 inclusive.
Completed Indicates if the Job has completed.
Failed Indicates if the Job failed.
Error Gets the error status of the Job.
AllMessages Gets a newline-separated string containing all messages generated by the Job.

Public Methods

Function Description
Cancel Cancels the Job.
Wait Wait for the Job to complete.

Properties

Progress

Gets the progress of the Job as a value between 0.0 and 1.0 inclusive.

double Progress

Completed

Indicates if the Job has completed.

BOOL Completed

Check the Error property to determine if there was a failure.

Failed

Indicates if the Job failed.

BOOL Failed

See Also: Error

Error

Gets the error status of the Job.

BSTR Error

This string will be empty of the Job completed without errors.

See Also: Failed

AllMessages

Gets a newline-separated string containing all messages generated by the Job.

BSTR AllMessages

Public Methods

Method: Cancel

Cancels the Job.

HRESULT Cancel(void)

Method: Wait

Wait for the Job to complete.

HRESULT Wait(void)

This will block until the job is completed. Note that this will run the main application event loop from within the wait subroutine - so if the user interface is displayed then the user may still be able to interact with the application.

IGWv4OptionsMap

Interface for configuring file control options for use with various file-based functions in the COM API.

  • allowFileOverwrite
  • silentFileOverwrite : default true.
  • discardModifiedFiles
  • promptSaveModified : If false then the function will fail unless discardModifiedFiles is true.
  • updateRecentFiles

Contents

Public Methods

Function Description
GetProperty
SetProperty properties are made available by the IDispatch interface (late-binding).

Public Methods

Method: GetProperty

HRESULT GetProperty([in] BSTR name, [out, retval] VARIANT *retval)

Method: SetProperty

properties are made available by the IDispatch interface (late-binding).

HRESULT SetProperty([in] BSTR name, [in] VARIANT value)

IGWv4PCLogging

Interface for access to PC logging features.

Contents

Properties

Property Description
Running Get/Set running state.
LogFolder Get/Set log folder.
FileNameFormat Get/Set filename format.
ParameterCount Get number of channels in the PC logging list.
ChannelCount Get the number of items/channels in the logging list.

Public Methods

Function Description
CreateTab Adds the PC logging tab to the GWv4 UI.
CloseTab Close the PC logging tab.
Start Starts PC logging to the given output GLO file.
Stop Stops PC logging.
AddMarker Add a marker to the log at the current point in time.
GetParameter Get name of the channel at the specified index in the PC logging list.
SetParameter Set name of the channel at the specified index in the PC logging list.
AppendParameter Set name of the channel at the specified index in the PC logging list.
RemoveParameter Set name of the channel at the specified index in the PC logging list.
GetParameterUpdateRateCode Get the update rate of the channel at the specified index in the PC logging list.
SetParameterUpdateRateCode Set the update rate of the channel at the specified index in the PC logging list.
ClearParameterList Remove all channel from the PC logging list.
CreateExporter Create a PC logging exporter.
GetChannel Get name of the channel at the specified index in the PC logging list.
SetChannel Set name of the channel at the specified index in the PC logging list.
AppendChannel Set name of the channel at the specified index in the PC logging list.
RemoveChannel Set name of the channel at the specified index in the PC logging list.
GetChannelUpdateRateCode Get the update rate of the channel at the specified index in the PC logging list.
SetChannelUpdateRateCode Set the update rate of the channel at the specified index in the PC logging list.
ClearChannelList Remove all channels from the PC logging list.

Properties

Running

Get/Set running state.

BOOL Running

LogFolder

Get/Set log folder.

BSTR LogFolder

FileNameFormat

Get/Set filename format.

BSTR FileNameFormat

ParameterCount

Get number of channels in the PC logging list.

int ParameterCount

Deprecateduse ChannelCount. Channels were called ‘parameters’ in versions prior to 4.03.20.

ChannelCount

Get the number of items/channels in the logging list.

int ChannelCount

Public Methods

Method: CreateTab

Adds the PC logging tab to the GWv4 UI.

HRESULT CreateTab([in] BOOL focus_tab)

Method: CloseTab

Close the PC logging tab.

HRESULT CloseTab()

Method: Start

Starts PC logging to the given output GLO file.

HRESULT Start([in] BSTR filename, [out, retval] BSTR *output_file)

Method: Stop

Stops PC logging.

HRESULT Stop([out, retval] BSTR *output_file)

Method: AddMarker

Add a marker to the log at the current point in time.

HRESULT AddMarker()

Method: GetParameter

Get name of the channel at the specified index in the PC logging list.

HRESULT GetParameter([in] unsigned int index, [out, retval] BSTR *retval)

Deprecateduse GetChannel. Channels were called ‘parameters’ in versions prior to 4.03.20.

Method: SetParameter

Set name of the channel at the specified index in the PC logging list.

HRESULT SetParameter([in] unsigned int index, [in] BSTR name, [out, retval] BOOL *retval)

Deprecateduse SetChannel. Channels were called ‘parameters’ in versions prior to 4.03.20.

List is automatically extended and setting an empty name removes the item.

Method: AppendParameter

Set name of the channel at the specified index in the PC logging list.

HRESULT AppendParameter([in] BSTR name, [out, retval] BOOL *retval)

Deprecateduse AppendChannel. Channels were called ‘parameters’ in versions prior to 4.03.20.

List is automatically extended and setting an empty name removes the item.

Method: RemoveParameter

Set name of the channel at the specified index in the PC logging list.

HRESULT RemoveParameter([in] unsigned int index, [out, retval] BOOL *retval)

Deprecateduse RemoveChannel. Channels were called ‘parameters’ in versions prior to 4.03.20.

List is automatically extended and setting an empty name removes the item.

Method: GetParameterUpdateRateCode

Get the update rate of the channel at the specified index in the PC logging list.

HRESULT GetParameterUpdateRateCode([in] unsigned int index, [out, retval] int *rate)

Deprecateduse GetChannelUpdateRateCode. Channels were called ‘parameters’ in versions prior to 4.03.20.

Method: SetParameterUpdateRateCode

Set the update rate of the channel at the specified index in the PC logging list.

HRESULT SetParameterUpdateRateCode([in] unsigned int index, [in] int rate)

Deprecateduse SetChannelUpdateRateCode. Channels were called ‘parameters’ in versions prior to 4.03.20.

Note that the update rate is dependent upon the overall channel update rate and is relative to the fastest channel being updated.

Method: ClearParameterList

Remove all channel from the PC logging list.

HRESULT ClearParameterList()

Deprecateduse ClearChannelList. Channels were called ‘parameters’ in versions prior to 4.03.20.

Method: CreateExporter

Create a PC logging exporter.

HRESULT CreateExporter([in] BSTR filename, [out, retval] IGWv4PCLoggingExport **exporter)

Method: GetChannel

Get name of the channel at the specified index in the PC logging list.

HRESULT GetChannel([in] unsigned int index, [out, retval] BSTR *retval)

Method: SetChannel

Set name of the channel at the specified index in the PC logging list.

HRESULT SetChannel([in] unsigned int index, [in] BSTR name, [out, retval] BOOL *retval)

List is automatically extended and setting an empty name removes the item.

Method: AppendChannel

Set name of the channel at the specified index in the PC logging list.

HRESULT AppendChannel([in] BSTR name, [out, retval] BOOL *retval)

List is automatically extended and setting an empty name removes the item.

Method: RemoveChannel

Set name of the channel at the specified index in the PC logging list.

HRESULT RemoveChannel([in] unsigned int index, [out, retval] BOOL *retval)

List is automatically extended and setting an empty name removes the item.

Method: GetChannelUpdateRateCode

Get the update rate of the channel at the specified index in the PC logging list.

HRESULT GetChannelUpdateRateCode([in] unsigned int index, [out, retval] int *rate)

Method: SetChannelUpdateRateCode

Set the update rate of the channel at the specified index in the PC logging list.

HRESULT SetChannelUpdateRateCode([in] unsigned int index, [in] int rate)

Note that the update rate is dependent upon the overall channel update rate and is relative to the fastest channel being updated.

Method: ClearChannelList

Remove all channels from the PC logging list.

HRESULT ClearChannelList()

IGWv4PCLoggingExport

Interface for access to PC logging features.

Contents

Properties

Property Description
FileName Get/Set log folder.
ParameterCount Get the number of channels in the logging list.
ChannelCount Get the number of channels in the logging list.

Public Methods

Function Description
GetParameter Get name of the channel at the specified index in the PC logging list.
GetParameterExportRate Get the update rate of the channel at the specified index in the PC logging list.
SetParameterExportRate Set the STF export rate of the parameter at the specified index in the PC logging list.
Export Export the GLO file to STF format.
GetChannel Get name of the channel at the specified index in the PC logging list.
GetChannelExportRate Get the update rate of the channel at the specified index in the PC logging list.
SetChannelExportRate Set the STF export rate of the channel at the specified index in the PC logging list.

Properties

FileName

Get/Set log folder.

BSTR FileName

ParameterCount

Get the number of channels in the logging list.

int ParameterCount

Deprecated

  • use ChannelCount. Channels were called ‘parameters’ in versions prior to 4.03.20.

ChannelCount

Get the number of channels in the logging list.

int ChannelCount

Deprecated

  • use ChannelCount

Public Methods

Method: GetParameter

Get name of the channel at the specified index in the PC logging list.

HRESULT GetParameter([in] unsigned int index, [out, retval] BSTR *retval)

Deprecated

  • use GetChannel. Channels were called ‘parameters’ in versions prior to 4.03.20.

Method: GetParameterExportRate

Get the update rate of the channel at the specified index in the PC logging list.

HRESULT GetParameterExportRate([in] unsigned int index, [out, retval] GWv4StfChannelRate *rate)

Deprecated

  • use GetParameterExportRate. Channels were called ‘parameters’ in versions prior to 4.03.20.

Method: SetParameterExportRate

Set the STF export rate of the parameter at the specified index in the PC logging list.

HRESULT SetParameterExportRate([in] unsigned int index, [in] GWv4StfChannelRate rate)

Deprecated

  • use SetChannelExportRate. Channels were called ‘parameters’ in versions prior to 4.03.20.

Method: Export

Export the GLO file to STF format.

HRESULT Export([in] BSTR filename, [in] IGWv4FileOptions *options, [out, retval] IGWv4Job **job)

Method: GetChannel

Get name of the channel at the specified index in the PC logging list.

HRESULT GetChannel([in] unsigned int index, [out, retval] BSTR *retval)

Method: GetChannelExportRate

Get the update rate of the channel at the specified index in the PC logging list.

HRESULT GetChannelExportRate([in] unsigned int index, [out, retval] GWv4StfChannelRate *rate)

Method: SetChannelExportRate

Set the STF export rate of the channel at the specified index in the PC logging list.

HRESULT SetChannelExportRate([in] unsigned int index, [in] GWv4StfChannelRate rate)

IGWv4Ports

Interface for access to PC logging features.

{75585FDE-457A-41C7-A96F-C4A94F86381B}

Contents

Properties

Property Description
Length Get/Set filename format.
SelectedPortMemento Get/Set the selected port memento to select a port for connecting with.
Baudrate Get/Set the baudrate for the selected port.
CanRXID Get/Set the CAN RX ID for the selected port.
CanTXID Get/Set the CAN TX ID for the selected port.
CanExtendedIDs Get/Set the CAN Extended IDs option for the selected port.
EthernetTimeoutAdjust Get/Set the Ethernet timeout ajustment.

Public Methods

Function Description
Refresh Refresh the ports list. Blocks execution until complete.
GetPortName Get friendly name of the port at the specified index in the port list.
GetPortType Get friendly name of the port at the specified index in the port list.
GetPortMemento Get internal ‘memento’ for the port at the specified index in the port list.
GetPortDevice Get device ID for the port at the specified index in the port list.
SelectPort Set the port for connecting with. The port must exist in the list.

Properties

Length

Get/Set filename format.

int Length

SelectedPortMemento

Get/Set the selected port memento to select a port for connecting with.

BSTR SelectedPortMemento

Baudrate

Get/Set the baudrate for the selected port.

int Baudrate

CanRXID

Get/Set the CAN RX ID for the selected port.

int CanRXID

CanTXID

Get/Set the CAN TX ID for the selected port.

int CanTXID

CanExtendedIDs

Get/Set the CAN Extended IDs option for the selected port.

BOOL CanExtendedIDs

EthernetTimeoutAdjust

Get/Set the Ethernet timeout ajustment.

int EthernetTimeoutAdjust

Public Methods

Method: Refresh

Refresh the ports list. Blocks execution until complete.

HRESULT Refresh([in] BSTR typelist)

COM GSB USB Simulator FTDI HID PCAN Ethernet ShiftecCAN

Method: GetPortName

Get friendly name of the port at the specified index in the port list.

HRESULT GetPortName([in] unsigned int index, [out, retval] BSTR *retval)

Method: GetPortType

Get friendly name of the port at the specified index in the port list.

HRESULT GetPortType([in] unsigned int index, [out, retval] int *retval)

Method: GetPortMemento

Get internal ‘memento’ for the port at the specified index in the port list.

HRESULT GetPortMemento([in] unsigned int index, [out, retval] BSTR *retval)

Method: GetPortDevice

Get device ID for the port at the specified index in the port list.

HRESULT GetPortDevice([in] unsigned int index, [out, retval] BSTR *retval)

Method: SelectPort

Set the port for connecting with. The port must exist in the list.

HRESULT SelectPort([in] int type, [in] BSTR device, [out, retval] BOOL *retval)

Returns

false if port was not found in the list.

port types: COM = 0, GSB = 1 USB = 2 SIM = 3 FTDI = 4 HID = 5 PCAN = 6 Ethernet = 7

Note that COM port device strings should be in the format:

\\.\COM1

IGWv4Script

Interface for compiling and executing scripts within GWv4.

Contents

Properties

Property Description
LastError Gets the last error that occurred as a string.
LastErrorCode Gets the last error that occurred as a numerical code.

Public Methods

Function Description
Compile Compiles the given script.
Execute Executes the given script.
GetFunction Gets a handle to a function in the script, which can subsequently be called multiple times.
CompileFile Compiles the given script file.

Properties

LastError

Gets the last error that occurred as a string.

BSTR LastError

LastErrorCode

Gets the last error that occurred as a numerical code.

int LastErrorCode

Public Methods

Method: Compile

Compiles the given script.

HRESULT Compile([in] BSTR script, [out, retval] BOOL *ok)

Method: Execute

Executes the given script.

HRESULT Execute([out, retval] VARIANT *ret)

The script must be compiled first.

Method: GetFunction

Gets a handle to a function in the script, which can subsequently be called multiple times.

HRESULT GetFunction([in] BSTR name, [out, retval] IGWv4ScriptFunction **func)

The script must be compiled + executed first.

If the script is recompiled / executed then any exsiting function

Method: CompileFile

Compiles the given script file.

HRESULT CompileFile([in] BSTR script_file, [out, retval] BOOL *ok)

IGWv4ScriptFunction

Interface for calling functions within scripts.

Contents

Public Methods

Function Description
Bind Bind the function to the script if it was recompiled.
Call Calls the function (will automatically attempt to bind if not already done so or if the script was recompiled). If the function cannot be bound, this will result in an error E_INVALIDARG.

Public Methods

Method: Bind

Bind the function to the script if it was recompiled.

HRESULT Bind([out, retval] int *ok)

Returns

0 if the function name does not exist or the script is invalid.

Method: Call

Calls the function (will automatically attempt to bind if not already done so or if the script was recompiled). If the function cannot be bound, this will result in an error E_INVALIDARG.

HRESULT Call([in] SAFEARRAY(VARIANT) args, [out, retval] VARIANT *ret)

Namespaces

Namespaces Documentation

The following namespaces are available:

Subsections of Namespaces

GWv4

brief GWv4 COM automation library.

Contents

Enumerations

Enumeration Description
GWv4StfChannelRate Enumeration of plot modes (distance/time relative plotting).

Typedefs

Typedef Description
IComApplication
IComFileOptions
IComJob
IComPCLogging
IComPCLoggingExport
IComPorts
IComScript
IComScriptFunction
IComOptionsMap
IComEcu
IComEcuObject
IComEcuObject2
GWv4StfChannelRate Enumeration of plot modes (distance/time relative plotting).
ComStfChannelRate

Enumerations

GWv4StfChannelRate

Enumeration of plot modes (distance/time relative plotting).

Values:

Typedefs

IComApplication

typedef IGWv4Application GWv4::IComApplication

IComFileOptions

typedef IGWv4FileOptions GWv4::IComFileOptions

IComJob

typedef IGWv4Job GWv4::IComJob

IComPCLogging

typedef IGWv4PCLogging GWv4::IComPCLogging

IComPCLoggingExport

typedef IGWv4PCLoggingExport GWv4::IComPCLoggingExport

IComPorts

typedef IGWv4Ports GWv4::IComPorts

IComScript

typedef IGWv4Script GWv4::IComScript

IComScriptFunction

typedef IGWv4ScriptFunction GWv4::IComScriptFunction

IComOptionsMap

typedef IGWv4OptionsMap GWv4::IComOptionsMap

IComEcu

typedef IGWv4Ecu GWv4::IComEcu

IComEcuObject

typedef IGWv4EcuObject GWv4::IComEcuObject

IComEcuObject2

typedef IGWv4EcuObject2 GWv4::IComEcuObject2

GWv4StfChannelRate

Enumeration of plot modes (distance/time relative plotting).

typedef enum GWv4::GWv4StfChannelRate GWv4::GWv4StfChannelRate

ComStfChannelRate

typedef GWv4StfChannelRate GWv4::ComStfChannelRate

Types

Types

No documented data types were found.