Skip to main content

SintAssertions

Short summary

This class provides assert statements for signed short integers (SINT)

AccessAbstractFinalExtendsImplements
INTERNALNoNoAbstractAssertionISintAssertions

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 (SINT): current value to check
    • expectedValue (SINT): 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 (SINT): 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 (SINT): current value to check
    • lessValue (SINT): 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 (SINT): lower limit for the current value
    • currentValue (SINT): current value to check
    • upperLimit (SINT): 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 (SINT): current value to check
    • greaterValue (SINT): 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 (SINT): current value to check
    • maximumValue (SINT): 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 (SINT): current value to check
    • minimumValue (SINT): 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

valueIsNegative

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

This assertion method checks if the current value is negative

valueIsNotEqualTo

  • Parameters:
    • currentValue (SINT): current value to check
    • unexpectedValue (SINT): 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 (SINT): 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

valueIsPositive

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

This assertion method checks if the current value is positve

Code

Declaration

{attribute 'reflection'}
FUNCTION_BLOCK INTERNAL SintAssertions EXTENDS AbstractAssertion IMPLEMENTS ISintAssertions
VAR
END_VAR
VAR CONSTANT
LSB_MASK :SINT := 1;
END_VAR