valueIsInRangeOf
Short summary
This assertion method checks if the current value is inside a limit
Attention:
limits are included: valueIsInRangeOf(t#3ms,t#3ms ,t#3ms) is a true assertion
Parameters
| Name | Type | Comment | Kind |
|---|---|---|---|
| lowerLimit | LTIME | lower limit for the current value | input |
| currentValue | LTIME | current value to check | input |
| upperLimit | LTIME | upper limit for the current value | input |
| message | AssertMessage | message if the assertion is false | input |
Code
Declaration
METHOD valueIsInRangeOf
VAR_INPUT
(* lower limit for the current value *)
lowerLimit :LTIME;
(* current value to check *)
currentValue :LTIME;
(* upper limit for the current value *)
upperLimit :LTIME;
(* message if the assertion is false *)
message :AssertMessage;
END_VAR
VAR
(* additional information for the callback function *)
additionalText :Tc2_System.T_MaxString;
END_VAR
Implementation
IF ((currentValue < lowerLimit) OR (currentValue > upperLimit)) THEN
THIS^.assertionWasWrong(
message := message,
additionalText := THIS^.getDebugInfo('valueIsInRangeOf')
);
END_IF