5.3.1.17.3.1. cli.com.file_com.File
- class cli.com.file_com.File(name: str, parameter: FileParameter)
Bases:
ComInterfaceHandles file-based communication by reading from and writing to input/output files. Depending on the provided parameters, it initializes processes for file reading and writing.
- read() str | None
Read data from the output queue if available.
- Returns:
The next line of data if available, otherwise None.
- Return type:
str | None
- Raises:
RuntimeError – If the related reading process is not running.
- write(data: str) None
Write string data to the input queue for output processing.
- Parameters:
data (str) – The data to write.
- Raises:
RuntimeError – If the related writing process is not running.
- write_can_message(msg: Message) None
Write a CAN message to the input queue for output processing.
- Parameters:
msg (Message) – The CAN message to write.
- Raises:
RuntimeError – If the related writing process is not running.