Skip to main content

msbIsSet

Short summary

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

Parameters

NameTypeCommentKind
currentValueBYTEcurrent value to checkinput
messageAssertMessagemessage if the assertion is falseinput

Code

Declaration

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