Home |
Function RTUOpenPipe |
Function RTUOpenPipeRTUOpenPipe opens a pipe for I/O to a device endpoint: RTUPipeHandle RTUOpenPipe(RTUDeviceHandle Device, const RTUEndpointDescriptor * Endpoint, int MaxIOs); ParametersDeviceDevice handle passed to an attachment/detachment callback. EndpointPointer to the endpoint descriptor to which the pipe should be opened. Such a pointer is returned by RTUGetEndpoint or RTUFindEndpoint. NULL can be specified to open a pipe to the default control endpoint 0. MaxIOsMaximum number of simultaneous I/O transactions the application will need on this pipe. Using high values does not cause any performance degradation, but each potential open transaction requires about 20 bytes of memory. If an application attempts to start more transactions, the program is aborted with a fatal error. For Control endpoints, this value must be 1. return valueThe function returns a handle to the new pipe. Pipes to Control endpoints should only use RTUSendSetup to communicate with the device. Several pipes to the default Control endpoint 0 (Endpoint parameter NULL) may be opened. However, for other endpoints, clients should open at most one pipe per endpoint. By default, all non Control pipes use Asynch notification, which can be changed with RTUSetPipeMsgQ or RTUSetPipeCallback. I/O transactions on non Control endpoints are initiated using RTUStartIO. Pipes should be closed with RTUClosePipe when the device is detached.
|