SYNOPSIS

int modbus_connect(modbus_t *ctx);

DESCRIPTION

The modbus_connect() function shall etablish a connection to a Modbus server, a network or a bus using the context information of libmodbus context given in argument.

RETURN VALUE

The modbus_connect() function shall return 0 if successful. Otherwise it shall return -1 and set errno to one of the values defined by the system calls of the underlying platform.

EXAMPLE

SEE ALSO

AUTHORS

The libmodbus documentation was written by Stéphane Raimbault <stephane.raimbault@gmail.com>