Check Cyclic Message With A Timeout

Checks 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 in milliseconds during a timeout.

Arguments Description

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

cycle (int): The expected cycle of the message in milliseconds.

cycle_deviation (int): The tolerance in milliseconds.

timeout (int): The delay to check the cyclicity in milliseconds.

operation (LogicalOperation, optional): # Not needed and should be removed.

Returns

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

Examples

# In this example, the keyword will start monitoring for the next 1200 milliseconds and check if the interval
# between the timestamps of received messages is within the range of 200?20 ms.
# If all occurrences satisfy the condition, the keyword passes.
# However, if at least one occurrence doesn’t meet the period, the keyword should fail.
Check Cyclic Message With A Timeout ${BusName}::${MsgId} ${200} ${20} ${1200}

Note

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

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