ATTRIBUTES

Supported by Ginmake 1.24 and later, Gin file version 3.21

Syntax

[ATTRIBUTES,attribute1,attribute2=value2,...]

Allows the object to be tagged with various strings. These will be used to convey additional information about the object.

One such attribute is ‘fuel’. This allows maps that are not called ‘fuel’ to be interpreted as fuel maps and provide the user with additional fuel map specific options.

Example:

1// [Fuel1,VE,,,o,+,i,,,rpm Breakpoints,rpm,MAPSSTP,800,400,Load Breakpoints,(Load),MAPLSTP,0,10]
2// [ATTRIBUTES,fuel,another one,another two]

Extension in Ginmake 1.33 and later, Gin file version 3.23

Attributes can now be given values using assignment:

// [ATTRIBUTES,ChannelName = Vehicle CAN]

In-line expression evaluation is also possible by enclosing the expression in {…} symbols. This includes expansion of pre-processor symbols and function-like macros:

1#define CAN_CHANNEL(x) CAN x + 1
1// [ATTRIBUTES,ChannelName = Vehicle {CAN_CHANNEL(1)}]
2// Expands to: Vehicle CAN 2

If a ‘{’ character is required in the evaluated text, enter it twice:

1// [ATTRIBUTES,ChannelName = Vehicle {{{CAN_CHANNEL(1)}}]
2// Expands to: Vehicle {CAN 2}

Note: can channel names should be defined using the ‘META’ tag, along with ‘CAN_CHANNEL_NAME’.

Small increment and large increment

A problem when using 16bit tables, maps, options etc is that incrementing the value can have a very small effect on the object. You can specify the large/small increment used by Gwv4 by using the large_inc and small_inc attributes:

1[ATTRIBUTES,small_inc=16,large_inc=256]

The default supplied by gw is a small_inc of 1 and a large_inc of 16.

List of Defined Attributes

Attribute Meaning
_equ EQU name preceding the definition, automatically generated by ginmake from injected EQU_ANNOTATION directives.
_f Filename index and line reference, automatically generated by ginmake.
_v Variable name, automatically generated by ginmake for display in descriptions view for GEMS staff.
analog_index Indicates that an option specifies an analog input channel number.
axis_x_param_cc The value of this attribute is given the name of an option that holds a comcode for looking up the X axis parameter. Currently only for tables (note that tables can be used as map axes though).
adjust_by_percentage For log maps, this is the default value for the ‘Adjust by Percentage’ setting in the ‘Apply Corrections’ dialog.
bool Object represents a Boolean value (zero or non-zero)
can_id Indicates that this value is a CAN ID and GW should present a CAN ID editor for the field. The Extended bit is represented by 0x20000000. The ID itself is right justified. This is only available in GW version 4.03.36+ so it is recommended to set the field to display in hex for prior versions.
convert_lerp During calibration conversion, does a real->real interpolated site conversion (the default).
convert_raw During calibration conversion, does a copy of raw values as-is, with no interpolation. empty sizes will be set to zero.
convert_static During calibration conversion, does a real->real (scaled) site conversion, with no interpolation. empty sizes will be set to zero (raw).
correction_mul For log maps, this is the default value for the ‘Multiplier’ setting in the ‘Apply Corrections’ dialog.
error_as_percentage For log maps, this is the default value for the ‘Error as Percentage’ setting in the ‘Apply Corrections’ dialog.
direct_cal_disable Simulink builds: disables ‘direct calibration access’ for this object or memory segment. If set to -1 then the setting is inherited from the parent segment (allows EXTEND to effectively un-set the attribute).
enable_error_as_percentage Enables error_as_percentage property in Apply Corrections.
fuel Indicates that the associated object is a fuel map.
input_name Name of an input. E.g. for Analog 08 this may specify “Air Intake Temperature”.
inputs List of object names that are inputs to this object for the purposes of generating an audit graph
invert_lookup Inverts the parameter position lookup on table objects. The parameter position is based upon the values in the table as opposed to the values in the axis. For tables that are used as table axes, this is done automatically. This may specify a Boolean value (0, 1, true, false) to override the automatic value.
large_inc Value of this attribute defines the large raw increment in Gwv4 when the SHIFT+/- keys are used.
pullup Pullup value, in ohms. This must be an integer value – i.e. use 4700 instead of 4K7. Used for analog inputs. If specified, when using Sensor Calibration view with conversion from Ohms to table input voltage, the pullup field can be auto-populated.
outputs List of object names that are outputs of this object for the purposes of generating an audit graph
sl_prefix Equivalent to [SL_PREFIX] directive.
small_inc Value of this attribute defines the small raw increment in Gwv4 when the +/- keys are used.
stress_test_override When running a calibration stress test, this value is not randomised and is instead written with its default value (see VALUES tag). GEMSEC is automatically handled in stress tests.
target_map For log maps, specifies a physical map that should be used for the target.
swt_in Indicates that this option should present a switch selector (or not) – specify 1 or 0, with the default being 1.

Conversion directives will be applied if either source OR destination have the attribute. convert_static will take preference over convert_raw. convert_lerp will take preference over convert_static.

For some conversions, these hints will be ignored (Enumeration or ComCode targets).