Skip to main content

lsbIsUnset

Short summary​

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

Parameters​

NameTypeCommentKind
currentValueBYTEcurrent value to checkinput
messageAssertMessagemessage if the assertion is falseinput

Code​

Declaration​

METHOD lsbIsUnset
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^.LSB)) THEN
THIS^.assertionWasWrong(message, THIS^.getDebugInfo('lsbIsUnset'));
END_IF