(can_driver: AbstractCanDriver)
UI task to create and send messages.

    Args:
        can_driver: Can driver.

    Returns: None.
UI task to create and send messages.
UI task to create and send messages .
async def ui_task(can_driver: AbstractCanDriver) -> None:
    """UI task to create and send messages.

    Args:
        can_driver: Can driver.

    Returns: None.
    """
    while True:
        try:
            # Run sync prompt message in threadpool executor.
            can_message = await asyncio.get_event_loop().run_in_executor(
                None, prompt_message, input, print
            )
            await can_driver.send(can_message)
        except InvalidInput as e:
            print(str(e))
async def ui_task ( can_driver : AbstractCanDriver ) -> None : while True : try : # Run sync prompt message in threadpool executor. can_message = await asyncio . get_event_loop ( ) . run_in_executor ( None , prompt_message , input , print ) await can_driver . send ( can_message ) except InvalidInput as e : print ( str ( e ) )