Skip to main content

lsbIsSet

Short summary

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

Parameters

NameTypeCommentKind
currentValueBYTEcurrent value to checkinput
messageAssertMessagemessage if the assertion is falseinput

Code

Declaration

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

Implementation

IF (NOT TO_BOOL(currentValue AND THIS^.LSB)) THEN
THIS^.assertionWasWrong(message, THIS^.getDebugInfo('lsbIsSet'));
END_IF