Sub Module workers
fgui.workers
fgui.workers.can_node_worker
Implements a process, that uses a CAN adapter to send and receive messages. Received messages are put in a queue to be consumed by e.g., a GUI. The messages to be send can be put into the queue by any other thread/process.
- class fgui.workers.can_node_worker.CanAdapterProcess(adapter: str, baud_rate: int, logging_dir: Optional[pathlib.Path] = None)
Process to interact with a CAN adapter.
- g_cancel() None
Global canceling (i.e., not just ‘pausing’) the process. All queues are cleared.
- run() None
Implements the functionality of the process, that is run, once the process has started.
fgui.workers.gui_sync_worker
Implements the thread, that has the callback that does the GUI updates.
- class fgui.workers.gui_sync_worker.SyncThread(gui_callback: Callable, receive_queue: multiprocessing.context.BaseContext.Queue)
Implements a class, that knows about the received CAN messages. These messages are then feedback to a method that knows about the GUI and then updates the respective GUI elements with the values from the received CAN message.
- cancel() None
Cancel the thread
- run() None
Thread function to be run.
fgui.workers.send_worker
Holds a thread that puts GUI control input (i.e. a CAN message that must be sent) into the CAN thread queue. Sending these CAN messages (and by that emptying that queue) is then done by another process, that consumes the queue.