5.3.1.6.1.2. cli.cmd_com.com_impl.modbus_main

cli.cmd_com.com_impl.modbus_main(config: Path, input_file: Path, output_file: Path) None

CLI entry point that performs Modbus transactions based on an input file.

It reads Modbus commands (as JSON lines) from input_file, sends them to a Modbus device, and writes the responses to output_file. The Modbus client and the file handler run in their own child processes. This function orchestrates those processes and the message flow via queues.

Parameters:
  • config (Path) – Path to a configuration file containing Modbus parameters.

  • input_file (Path) – Path to the input file with JSON lines of commands.

  • output_file (Path) – Path to the output file to write the results.

Exits:

The process exits with code 1 if a child process cannot be started.