Logo Search packages:      
Sourcecode: libgphoto2 version File versions  Download package

int gp_port_set_timeout ( GPPort port,
int  timeout 
)

Set timeout of port.

Parameters:
port a GPPort
timeout the timeout
Sets the timeout of a port. gp_port_read will wait timeout milliseconds for data. If no data will be received in that period, GP_ERROR_TIMEOUT will be returned.

Returns:
a gphoto2 error code

Definition at line 503 of file gphoto2-port.c.

References CHECK_NULL, gp_log(), GP_LOG_DEBUG, GP_OK, and _GPPort::timeout.

Referenced by camera_init(), gp_port_set_info(), and gp_port_timeout_set().

{
      gp_log (GP_LOG_DEBUG, "gphoto2-port", _("Setting timeout to %i "
            "millisecond(s)..."), timeout);

      CHECK_NULL (port);

        port->timeout = timeout;

        return GP_OK;
}


Generated by  Doxygen 1.6.0   Back to index