I am using the libmodbus libraries to communicate with a solar inverter with a Modbus interface (SMA). The Modbus specification document specifies that a certain Unit ID should be used to read registers on the device. The device offers a TCP interface for modbus.
I can't find the code to change the Unit ID for the libmodbus libraries. Is it the modbus_set_slave() function? Or is there another functions that I am missing here?