Check Cyclic Message With A Repetition

Checks, for a specified repetition number, whether a message within a message path is cyclic,

with a period equal to a specific cycle and with a tolerance equal to a cycle deviation value.

Arguments Description

message_path (str): The message path should be in the format: BusName::MsgId::SignalName.

cycle (int): The cycle of the message from NK.

cycle_deviation (int): The tolerance in milliseconds.

repetition_number (int): The number of message occurrences to check.

check_latest_values (bool, optional): True: Check the last specified number of message occurrences in the buffer.

False: Check the entire buffer until finding the specified number of consecutive message occurrences that satisfy the condition.

Returns

bool: True if the cycle was respected; otherwise, False.

Examples

In this example, the keyword will verify the cyclic message repetition of the last 3 received messages based on the following criteria:
* The time interval between the 1st and 2nd message occurrence is 200+-20 milliseconds.
* The time interval between the 2nd and 3rd message occurrence is also 200+-20 milliseconds.
N.B. : If check_latest_values argument is set to False, the check will proceed on all occurences of the message in the buffer
until it finds 3 consecutive points that satisfy the condition.
N.B : Please note that the time interval it took for the first message to arrive is not considered in this keyword’s evaluation.
Only the time intervals between subsequent messages are taken into account.
Check Cyclic Message With A Repetition ${BusName}::${MsgId}::${SignalName} ${200} ${20} ${3} ${True}

Note

  • A listener should be started for the target message beforehand.

  • The behavior of this keyword is influenced by the presence of any buffer clearing between message receptions. If the buffer is cleared during the reception process, it may impact the expected cyclic repetition behavior, potentially leading to error messages or unexpected results. Therefore, it’s crucial to consider the effect of buffer clearing while interpreting the keyword’s output.