GenValue: 3.2 GenValue Basics: The Minimum and Maximum

Up: GEOS SDK TechDocs | Up | Prev: 3.1 The Value | Next: 3.3 The Increment
GVLI_minimum, GVLI_maximum, MSG_GEN_VALUE_GET_MAXIMUM, MSG_GEN_VALUE_SET_MAXIMUM, MSG_GEN_VALUE_GET_MINIMUM, MSG_GEN_VALUE_SET_MINIMUM

The maximum ( GVLI_maximum ) and minimum ( GVLI_minimum ) values of a GenValue constrain the value of GVLI_ value . The maximum is the greatest value that the GenValue's GVLI_ value can have and can be any fixed point number from -32767 up to 32767. The minimum is the least value that the GenValue's GVLI_ value can have (including negative numbers) and can be any fixed point number from 32767 down to -32767. The maximum value must always be greater than or equal to the minimum value; otherwise, an error will occur.

The maximum and minimum values of the GenValue also can be examined and modified by the application. This is helpful if you need to use the same GenValue for two functions with different ranges of values. You can use the GenValue for one function, change the bounds, and use it for another function.

MSG_GEN_VALUE_GET_MINIMUM and MSG_GEN_VALUE_GET_MAXIMUM return the values of GVLI_ minimum and GVLI_ maximum respectively. This value is in fixed point format.

MSG_GEN_VALUE_SET_MINIMUM and MSG_GEN_VALUE_SET_MAXIMUM set the values of GVLI_ minimum and GVLI_ maximum respectively. If this new minimum or maximum places the current GVLI_ value outside the valid value range, the value will be adjusted to fall within the current range.

MSG_GEN_VALUE_GET_MAXIMUM

WWFixedAsDWord MSG_GEN_VALUE_GET_MAXIMUM()

This message returns the fixed point value within the GVLI_maximum instance field of the GenValue.

Source: Unrestricted.

Destination: Any GenValue object.

Parameters: None.

Return: The fixed point maximum value in GVLI_ maximum .

Interception: Generally not intercepted.

MSG_GEN_VALUE_SET_MAXIMUM

void	MSG_GEN_VALUE_SET_MAXIMUM(
        WWFixedAsDWord 		value);

This message sets the GVLI_maximum field of the GenValue to the passed fixed point value. If you set a new maximum that places the current value (in GVLI_ value ) above that maximum, GVLI_ value will be adjusted to this maximum.

Source: Unrestricted. This message is also used internally when the GenValue is being built.

Destination: Any GenValue object.

Parameters: value fixed point value to set GVLI_ maximum to.

Return: Nothing.

Interception: Generally not intercepted.

MSG_GEN_VALUE_GET_MINIMUM

WWFixedAsDWord MSG_GEN_VALUE_GET_MINIMUM()

This message returns the fixed point value within the GVLI_minimum instance field of the GenValue.

Source: Unrestricted.

Destination: Any GenValue object.

Parameters: None.

Return: The fixed point minimum value in GVLI_ minimum .

Interception: Generally not intercepted.

MSG_GEN_VALUE_SET_MINIMUM

void	MSG_GEN_VALUE_SET_MINIMUM(
        WWFixedAsDWord		value);

This message sets the GVLI_minimum instance field of the GenValue to the passed fixed point value. If you set a new minimum that places the current value (in GVLI_ value ) below that minimum, GVLI_ value will be adjusted to this minimum.

Source: Unrestricted. This message is also used internally when the GenValue is being built.

Destination: Any GenValue object.

Parameters: value fixed point value to set GVLI_ minimum to.

Return: Nothing.

Interception: Generally not intercepted.


Up: GEOS SDK TechDocs | Up | Prev: 3.1 The Value | Next: 3.3 The Increment