A formatting variable. Instances of this class are used to format incoming values. Supports absolute, incremental, and directional variables. State is maintained to avoid output for unchanged values.
| OutputVariable | ( | Map | specifiers, |
| Format | format | ||
| ) |
Constructs an output variable.
| specifiers | The specifiers. |
| format | The desired format. |
The supported specifiers are:
control: Determines when a formatted variable will be output and can be CONTROL_CHANGED, CONTROL_FORCE, or CONTROL_NONZERO.current: Specifies that initial value to store in the output variable.cyclicLimit: Specifies the absolute range limit for the formatted value, for example 360 for a rotary axis.cyclicSign: Specifies the sign for a cyclic value and can be -1 (negative), 0 (both), or 1 (positive).onchange: Defines a function to be called when the formatted value has changed.prefix: Specifies a prefix to be prepended to the formatted value.suffix: Specifies a suffix to be appended to the formatted value.tolerance: A value must differ from the previous value by greater than tolerance to be output.type: Specifies the variable type and can be TYPE_ABSOLUTE, TYPE_INCREMENTAL, or TYPE_DIRECTIONAL.| disable | ( | ) |
Disable the variable from being output. When invoked format() always returns an empty string.
| enable | ( | ) |
Enables the variable for output.
Returns the formatted string of the specified value. An empty string can be returned based on the control setting.
| Value getBase | ( | ) |
Returns the base number of the FormatNumber associated with the OutputVariable.
| Value getControl | ( | ) |
Returns the output control.
| Value getCurrent | ( | ) |
Returns the last formatted value.
| Value getCyclicLimit | ( | ) |
Returns the cyclic limit.
| Value getCyclicSign | ( | ) |
Returns the cyclic sign.
| String getDecimalSymbol | ( | ) |
Returns the decimal separator of the FormatNumber associated with the OutputVariable.
| Boolean getForceSign | ( | ) |
Returns the force sign flag of the FormatNumber associated with the OutputVariable.
| FormatNumber getFormat | ( | ) |
Returns the format attached to the variable.
| Value getFormatType | ( | ) |
Returns the type of formatted value of the FormatNumber associated with the OutputVariable.
| Value getMaximum | ( | ) |
Returns the maximum allowed value of the FormatNumber associated with the OutputVariable.
| Value getMinDigitsLeft | ( | ) |
Returns the minimum number of digits to the left of the decimal point of the FormatNumber associated with the OutputVariable.
| Value getMinDigitsRight | ( | ) |
Returns the minimum number of digits to the right of the decimal point of the FormatNumber associated with the OutputVariable.
| Value getMinimum | ( | ) |
Returns the minimum allowed value of the FormatNumber associated with the OutputVariable.
| Value getNumberOfDecimals | ( | ) |
Returns the number of decimals of the FormatNumber associated with the OutputVariable.
| Value getOffset | ( | ) |
Returns the offset of the FormatNumber associated with the OutputVariable.
| Value getPrefix | ( | ) |
Returns the prefix.
| Value getResultingValue | ( | ) |
Returns the resulting value as if it was formatted for the variable.
| Value getScale | ( | ) |
Returns the scale of the FormatNumber associated with the OutputVariable.
| Value getSuffix | ( | ) |
Returns the suffix.
| Value getTolerance | ( | ) |
Returns the output tolerance for the variable.
| Value getType | ( | ) |
Returns the type.
| Boolean isEnabled | ( | ) |
Returns true if the variable is enabled.
| reset | ( | ) |
| setBase | ( | Value | base | ) |
Sets the base number of the FormatNumber associated with the OutputVariable.
| setControl | ( | Value | control | ) |
Sets the variable output control. Can be CONTROL_CHANGED, CONTROL_FORCE, or CONTROL_NONZERO.
| setCurrent | ( | Value | current | ) |
Sets the current value for the variable.
| setCyclicLimit | ( | Value | cyclicLimit | ) |
Sets the cyclic limit.
| setCyclicSign | ( | Value | cyclicLimit | ) |
Sets the cyclic sign. Can be -1, 0, 1.
| setDecimalSymbol | ( | String | decimalSymbol | ) |
Sets the decimal separator of the FormatNumber associated with the OutputVariable..
| setForceSign | ( | Boolean | forceSign | ) |
Sets the force sign flag of the FormatNumber associated with the OutputVariable.
| setFormat | ( | format | ) |
Assigns a format to the variable.
| setFormatType | ( | Value | type | ) |
Sets the type of formatted value of the FormatNumber associated with the OutputVariable.
| setMaximum | ( | Value | maximum | ) |
Sets the maximum allowed value of the FormatNumber associated with the OutputVariable.
| setMinDigitsLeft | ( | Value | minDigitsLeft | ) |
Sets the minimum number of digits to the left of the decimal point of the FormatNumber associated with the OutputVariable.
| setMinDigitsRight | ( | Value | minDigitsRight | ) |
Sets the minimum number of digits to the right of the decimal point of the FormatNumber associated with the OutputVariable.
| setMinimum | ( | Value | minimum | ) |
Sets the minimum allowed value of the FormatNumber associated with the OutputVariable.
| setNumberOfDecimals | ( | Value | numberOfDecimals | ) |
Sets the number of decimals of the FormatNumber associated with the OutputVariable.
| setOffset | ( | Value | offset | ) |
Sets the offset of the FormatNumber associated with the OutputVariable.
| setPrefix | ( | Value | prefix | ) |
Sets the prefix.
| setScale | ( | Value | scale | ) |
Sets the scale of the FormatNumber associated with the OutputVariable.
| setSuffix | ( | Value | suffix | ) |
Sets the suffix.
| setTolerance | ( | Value | tolerance | ) |
Sets the output tolerance for the variable.
| setType | ( | Value | type | ) |
Sets the variable type. Can be TYPE_ABSOLUTE, TYPE_INCREMENTAL, or TYPE_DIRECTIONAL.