Skip to main content

msbIsNotEqualTo

Short summary​

This assertion method checks if the most significant bit of current value is not equal to the unexpected value

Parameters​

NameTypeCommentKind
currentValueBYTEcurrent value to checkinput
unexpectedValueBOOLunexpected value of msbinput
messageAssertMessagemessage if the assertion is falseinput

Code​

Declaration​

METHOD msbIsNotEqualTo
VAR_INPUT
(* current value to check *)
currentValue :BYTE;
(* unexpected value of msb *)
unexpectedValue :BOOL;
(* message if the assertion is false *)
message :AssertMessage;
END_VAR

Implementation​

IF (TO_BOOL(currentValue AND THIS^.MSB) = unexpectedValue) THEN
THIS^.assertionWasWrong(message, THIS^.getDebugInfo('msbIsNotEqualTo'));
END_IF