I have the following code. If the return value fails, it just returns "write failed: unknown error 112345678". Can you list several return values so that I can know why the write failed?
` int ret;
ret = modbus_write_register(m_ctx, addr, value);
if (ret == -1) {
printf("write failed: %s\n", modbus_strerror(errno));
}
usleep(100);
return ret;`
I have the following code. If the return value fails, it just returns "write failed: unknown error 112345678". Can you list several return values so that I can know why the write failed?