Skip to main content

msbIsUnset

Short summary​

This assertion method checks if the most significant bit of current value is unset

Parameters​

NameTypeCommentKind
currentValueBYTEcurrent value to checkinput
messageAssertMessagemessage if the assertion is falseinput

Code​

Declaration​

METHOD msbIsUnset
VAR_INPUT
(* current value to check *)
currentValue :BYTE;
(* message if the assertion is false *)
message :AssertMessage;
END_VAR

Implementation​

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