Is Serial Message Received

Checks if a serial message matching a specific pattern is received in a queue.

Arguments Description

queue (Queue[SerialEvent]): A queue of serial events.

pattern (str): The regular expression pattern to match against the received messages.

Returns

bool: True if a matching message is received in the queue, False otherwise.

Example

Start Serial Listener ChannelName
Sleep ${timeout}
Stop Serial Listener ChannelName
${queue} = Get Serial Listener Queue ChannelName
${received} = Is Serial Message Received ${queue} messagePattern
Reset Serial Listener Queue ChannelName