Package com.efiAnalytics.plugin.ecu
Class ControllerParameter
java.lang.Object
com.efiAnalytics.plugin.ecu.ControllerParameter
This contains information and values for a single controller Parameter,
A Controller parameter is segment of controller memory
identified in the ecu configuration or ini file and given a name.
A controller parameter can be a set of options or bit param,
a single value or an array of values.
- Author:
- Phil Tobin
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble[][]returns the values of this Parameter.intThe number of digits to the right of the decimal point for this Parameter.doublegetMax()Maximum allowed value for this parameter to element of this Parameter.doublegetMin()minimum allowed value for this parameter to element of this Parameter.All valid String Options for a bit selection.returns the parameter class for this Parameter as defined in the ecu configuration or ini file.doublethe value for a scalar parameter.getShape()returns the shape of an array.Gets the correct bit value to this String.getUnits()Units this number is represented in.voidsetArrayValues(double[][] arrayValues) returns the values of this Parameter.voidsetDecimalPlaces(int decimalPlaces) The number of digits to the right of the decimal point for this Parameter.voidsetMax(double max) Maximum allowed value for this parameter to element of this Parameter.voidsetMin(double min) minimum allowed value for this parameter to element of this Parameter.voidsetOptionDescriptions(ArrayList optionDescriptions) Sets valid String Options for a bit selection.voidsetParamClass(String paramClass) the parameter class for this Parameter as defined in the ecu configuration or ini file.voidsetScalarValue(double scalar) the value for a scalar parameter.voidThe shape of an array.voidsetStringValue(String stringValue) Sets the correct bit value to this String.voidUnits this number is represented in.
-
Field Details
-
PARAM_CLASS_BITS
Parameter to be set from a discrete set of provided options- See Also:
-
PARAM_CLASS_SCALAR
a numeric value that can be set to anything between min and max- See Also:
-
PARAM_CLASS_ARRAY
An array of values, can be 1 dimension or 2- See Also:
-
-
Constructor Details
-
ControllerParameter
public ControllerParameter()Creates a new instance of ControllerParameter
-
-
Method Details
-
getParamClass
returns the parameter class for this Parameter as defined in the ecu configuration or ini file. Valid values will be:
PARAM_CLASS_BITS
PARAM_CLASS_SCALER
PARAM_CLASS_ARRAY- Returns:
-
setParamClass
the parameter class for this Parameter as defined in the ecu configuration or ini file.
Valid values will be:
PARAM_CLASS_BITS
PARAM_CLASS_SCALER
PARAM_CLASS_ARRAY -
getDecimalPlaces
public int getDecimalPlaces()The number of digits to the right of the decimal point for this Parameter.
Example: 2 will return 14.70, or an int will be 0
valid for Parameter Classes of:
PARAM_CLASS_SCALER
PARAM_CLASS_ARRAY- Returns:
- The number of digits to the right of the decimal point for this Parameter
-
setDecimalPlaces
public void setDecimalPlaces(int decimalPlaces) The number of digits to the right of the decimal point for this Parameter. i.e. 2 will return 14.70, or an int will be 0
valid for Parameter Classes of:
PARAM_CLASS_SCALER
PARAM_CLASS_ARRAY -
getShape
returns the shape of an array. A 12x16 will provide
getShape().w = 12
getShape().h = 16
valid for Parameter Classes of:
PARAM_CLASS_ARRAY -
setShape
The shape of an array. A 12x16 will provide
getShape().w = 12
getShape().h = 16
valid for Parameter Classes of:
PARAM_CLASS_ARRAY -
getUnits
Units this number is represented in. i.e:
ms., %, kPa ...
valid for Parameter Classes of:
PARAM_CLASS_SCALER
PARAM_CLASS_ARRAY- Returns:
-
setUnits
Units this number is represented in. i.e:
ms., %, kPa ...
valid for Parameter Classes of:
PARAM_CLASS_SCALER
PARAM_CLASS_ARRAY -
getMin
public double getMin()minimum allowed value for this parameter to element of this Parameter.
if a value above this is set, in most cases it will create an
ValueOutofBoundsException and will roll back to the previous value and
you will be notified of an update to the parameter value -
setMin
public void setMin(double min) minimum allowed value for this parameter to element of this Parameter.
if a value above this is set, in most cases it will create an
ValueOutofBoundsException and will roll back to the previous value and
you will be notified of an update to the parameter value -
getMax
public double getMax()Maximum allowed value for this parameter to element of this Parameter.
if a value above this is set, in most cases it will create an
ValueOutofBoundsException and will roll back to the previous value and
you will be notified of an update to the parameter value -
setMax
public void setMax(double max) Maximum allowed value for this parameter to element of this Parameter.
if a value above this is set, in most cases it will create an
ValueOutofBoundsException and will roll back to the previous value and
you will be notified of an update to the parameter value -
getOptionDescriptions
All valid String Options for a bit selection.
These selections are defined in the ecu configuration or ini file.
Valid for parameterClass:
PARAM_CLASS_BITS -
setOptionDescriptions
Sets valid String Options for a bit selection.
These Strings will be retrieved with
getOptionDescriptions()
This should normally only be used by an Implmentation of
ControllerParameterServerin the Application
Valid for parameterClass:
PARAM_CLASS_BITS -
getArrayValues
public double[][] getArrayValues()returns the values of this Parameter.
This is primarily used for Arrays, but can be used for scalars
as well, A scalar will have a size of 1x1 and the value will be in
getArrayValues()[0][0]
valid for Parameter Classes of:
PARAM_CLASS_SCALER
PARAM_CLASS_ARRAY -
setScalarValue
public void setScalarValue(double scalar) the value for a scalar parameter. this can be set via setArrayValue() with a value at xxx[0][0], but provides a shorthand version. Note when setting, only set ArrayValue or Scalar values. otherwise one will replace the other. -
getScalarValue
public double getScalarValue()the value for a scalar parameter. this can be accaessed via getArrayValue()[0][0] as well, but provides a shorthand version. Note when setting, only set ArrayValue or Scalar values. otherwise one will replace the other. -
setArrayValues
public void setArrayValues(double[][] arrayValues) returns the values of this Parameter.
This is primarily used for Arrays, but can be used for scalars
as well. A scalar will have a size of 1x1
The size of the Array must equal the size of
getShape()
valid for Parameter Classes of:
PARAM_CLASS_SCALER
PARAM_CLASS_ARRAY -
getStringValue
Gets the correct bit value to this String.
The String must be one of those retrieved with
getOptionDescriptions()
Valid for parameterClass:
PARAM_CLASS_BITS -
setStringValue
Sets the correct bit value to this String.
The String must be one of those retrieved with
getOptionDescriptions()
Valid for parameterClass:
PARAM_CLASS_BITS
-