Monitor Happened Signal

Checks if at least one of the received signal values verifies a comparison operation against a specifc value at least once during a timeout.

The call to this function will block the execution until the signal that satisfies the conditions is found or the timeout is expired.

Arguments Description

signal_path (str): The path that specifies the signal to be checked.

It should be in the format: BusName::MsgId::SignalName.

signal_value (int): The reference signal value.

timeout (int): A period of time defined in milliseconds, untill the check stops.

mask (unsigned integer of 64 bit)The mask applied on the recieved values during comparison.

Defaults to 0xFFFFFFFFFFFFFFFF.

comparison (CompareOperation, optional): Defaults to CompareOperation.EQ.
CompareOperation | value | Sign |
EQ | 0 | == |
GE | 1 | >= |
GT | 2 | > |
LE | 3 | <= |
LT | 4 | < |
NE | 5 | != |

Returns

bool: True if at least one value of received signal values verifies the comparison operation against

the reference value; otherwise, False.

Examples

# Check if one of the received signal values is equal to 5.
${path} Set Variable ${BusName}::${MsgId}::${SignalName}
${ref_value} Set Variable ${5}
${timeout} Set Variable ${500}
${res} = Monitor Happened Signal ${path} ${ref_value} ${timeout}
Expect True ${res}
# Check if one of the received signal values has the less significant byte not equal to 5.
${mask} Set Variable ${0x00000000000000FF}
${comparaison} Set Variable ${5}
${res} = Monitor Happened Signal ${path} ${ref_value} ${timeout} ${mask} ${comparaison}
Expect True ${res}

Note

  • No signal observer needs to be started to monitor the signal.

  • If a signal observer on that signal is already started, all the received values of that observer will be cleared. Nevertheless, the observer will not be stopped after the timeout and will continue monitoring the signal.