SerialTXQueue

class utils.SerialTXQueue

Bases: object

An interface between the web UI and serial interface. Messages can be added to the queue which will then be sent by the background transeiver service.

Methods Summary

pop() Return and remove the next message in the queue.
push(message) Add a messages to the send queue.
remove(message_id) Remove msg from TX queue

Methods Documentation

pop()

Return and remove the next message in the queue.

Returns:Dictionary containing the message and meta data i.e. doc_id - the unique id of the message in the queue, and the time it was created. Returns “None” if no messages in the queue.
Return type:dict
push(message: str)

Add a messages to the send queue.

Parameters:message – The message to be transmitted.
Returns:A unique reference for the newly created message in the queue.
Return type:int
remove(message_id: int)

Remove msg from TX queue

Parameters:message_id – The unique id of the message in the queue to remove.