Modbus server with dynamic address mapping for controlling GPIO devices