Port Access, Device Initialization

This module contains the initialization routines for the device ports.

Functions

int APIDECL dcDeviceOpen (const char *port, DEVICE *deviceP)
 Open Device on port by name.
int APIDECL dcDeviceClose (DEVICE c)
 Close device communication port and free Device.

Function Documentation

int APIDECL dcDeviceClose ( DEVICE  c  ) 

This should be called at the end of an application, when the device is no longer accessed.

Examples:
master.c.

Referenced by Device::close().

int APIDECL dcDeviceOpen ( const char *  port,
DEVICE *  deviceP 
)
Parameters:
port The port name identifier in format "HUB:PORT" where HUB is one of 'TCP', 'USB' or other interface types listed in dcProperty_Select(). For example, to open a TCP connection to port 2006: "TCP:192.168.1.2:2006"
deviceP Pointer to the DEVICE object to be initialized.
Returns:
0 if successful, < 0: error. A value > 0 means, the device was opened, but some non blocking failure was detected (bad device identity, etc.). In this case, some device features may not be accessible, but it can be normally fixed via an update.
Examples:
master.c.

Referenced by Device::open().


Generated on Thu Feb 24 13:50:16 2011 for Device Control library by  doxygen 1.6.1