Check Signal

Compares one or all received signal values since the start of the observer, with an

expected value, following a comparison operation and applying the mask.

Arguments Description

signal_path (str): The signal path should be in the format: BusName::MsgId::SignalName.

signal_value (int): The signal value to be compared to.

comparison (CompareOperation, optional): Each comparison sign is associated with a number value.

Defaults to CompareOperation.EQ.

CompareOperation | value | Sign |
EQ | 0 | == |
GE | 1 | >= |
GT | 2 | > |
LE | 3 | <= |
LT | 4 | < |
NE | 5 | != |
logical_operation (LogicalOperation, optional): if LogicalOperation.ALL(0), then the condition needs to be satisfied by all the received values

of the signal since the start of the signal observer.

If LogicalOperation.ONLY_ONE(1), then the condition needs to be satisfied by at least one received value since the start of the signal observer. Defaults to LogicalOperation.ALL.

mask (uint64): The mask applied to the received values during comparison. Defaults to 0xFFFFFFFFFFFFFFFF.

Returns

bool: True if one or all received values of a signal, depending on the logical_operation argument value,

verify the specified comparison operation against an expected value; otherwise, False.

Examples

# In example 1, the keyword will check that all the received values in the buffer satisfy the conditions.
# In this case, all received values should be < 5.
${res}= Check Signal ${BusName}::${MsgId}::${SignalName} ${5} ${4} ${0} ${0xFFFFFFFFFFFFFFFF}
# In example 2, the keyword will check that all the received values in the buffer satisfy the conditions.
# In this case, the values need to satisfy the condition : (recievedValue & 0x00000000000000FF) == 5
${res}= Check Signal ${BusName}::${MsgId}::${SignalName} ${5} ${0} ${0} ${0x00000000000000FF}
# In example 3, the keyword will check that only one received value in the buffer satisfies the conditions.
# In this case, the value need to satisfy the condition : (recievedValue & 0xFFFFFFFFFFFFFFFF) < 5
${res}= Check Signal ${BusName}::${MsgId}::${SignalName} ${5} ${4} ${1} ${0xFFFFFFFFFFFFFFFF}

Note

An observer should be started on the target signal beforehand.