Skip to main content

UintAssertions

Short summary

This class provides assert statements for unsigned integers (UINT)

AccessAbstractFinalExtendsImplements
INTERNALNoNoAbstractAssertionIUintAssertions

UML Diagram

Parameters

none

Properties

className

Type: CNM_AbstractObject.ClassName

This abstract property returns the class name of the concrete object,

Methods

valueIsEqualTo

  • Parameters:
    • currentValue (UINT): current value to check
    • expectedValue (UINT): expected value to compare
    • message (AssertMessage): message if the assertion is false
  • Return type: VOID

This assertion method checks if the current value is equal to the expected value

valueIsEven

  • Parameters:
    • currentValue (UINT): current value to check
    • message (Tc2_System.T_MaxString): message if the assertion is false
  • Return type: VOID

This assertion method checks if the current value is even

valueIsGreaterThan

  • Parameters:
    • currentValue (UINT): current value to check
    • lessValue (UINT): less than lower limit
    • message (AssertMessage): message if the assertion is false
  • Return type: VOID

This assertion method checks if the current value is greater than the less value

valueIsInRangeOf

  • Parameters:
    • lowerLimit (UINT): lower limit for the current value
    • currentValue (UINT): current value to check
    • upperLimit (UINT): upper limit for the current value
    • message (AssertMessage): message if the assertion is false
  • Return type: VOID

This assertion method checks if the current value is inside a limit

valueIsLessThan

  • Parameters:
    • currentValue (UINT): current value to check
    • greaterValue (UINT): greater than upper limit
    • message (AssertMessage): message if the assertion is false
  • Return type: VOID

This assertion method checks if the current value is less than the greater value

valueIsMax

  • Parameters:
    • currentValue (UINT): current value to check
    • maximumValue (UINT): upper limit for the current value
    • message (AssertMessage): message if the assertion is false
  • Return type: VOID

This assertion method checks if the current value is less than or equal to the maximum value

valueIsMin

  • Parameters:
    • currentValue (UINT): current value to check
    • minimumValue (UINT): lower limit for the current value
    • message (AssertMessage): message if the assertion is false
  • Return type: VOID

This assertion method checks if the current value is greater than or equal to the minimum value

valueIsNotEqualTo

  • Parameters:
    • currentValue (UINT): current value to check
    • unexpectedValue (UINT): unexpected value to compare
    • message (AssertMessage): message if the assertion is false
  • Return type: VOID

This assertion method checks if the current value is not equal to the unexpected value

valueIsOdd

  • Parameters:
    • currentValue (UINT): current value to check
    • message (AssertMessage): message if the assertion is false
  • Return type: VOID

This assertion method checks if the current value is odd

Code

Declaration

{attribute 'reflection'}
FUNCTION_BLOCK INTERNAL UintAssertions EXTENDS AbstractAssertion IMPLEMENTS IUintAssertions
VAR
END_VAR
VAR CONSTANT
LSB_MASK :UINT := 1;
END_VAR