API Reference Guide > ISIS Component API Reference > ISIS Component Functions Reference > Pipe Functions > IG_ISIS_drv_link |
Establish a link between two drivers.
Copy Code
|
|
---|---|
AT_ERRCOUNT ACCUAPI IG_ISIS_drv_link( HISISDRV hDriver, HISISDRV hNext ); |
Name | Type | Description |
---|---|---|
hDriver | HISISDRV | The handle of the driver from which the link is being originated. The output of this driver is linked to the input of hNext. |
hNext | HISISDRV | The handle of the driver to which the link is being made. The input of this driver is connected to the output of hDriver. |
Error count.
This function does not process image pixels.
IG_ISIS_drv_link sets up a link between two drivers. Once links are established, virtually all tags sent to hDriver are also sent to hNext. Note, however, that when data is sent to hDriver (see IG_ISIS_drv_put_data, the data is usually processed before being passed to hNext, so that hNext receives a modified form of the data that was sent to hDriver.
IG_ISIS_drv_link and its companion IG_ISIS_drv_split establish ISIS pipes. A pipe is a group of linked drivers that processes image data in a stream. For example, an application could link together a scanner driver, a set of compression drivers, and a file writing driver. When the pipe is invoked, image data moves in a stream from the scanner's output through each driver and is saved in a file in one operation. (In this example, the entire image never exists in memory at one time.).
IG_ISIS_drv_link establishes parent-child relationships between drivers; that is, the linked driver's input is dependent on the linking driver's output. IG_ISIS_drv_split establishes sibling relationships between drivers; that is, the linked driver shares the linking driver's input and each driver's output is independent of the other driver.
To unlink a driver, use IG_ISIS_drv_link to link the driver with a null hNext:
Copy Code
|
|
---|---|
INT32 IG_ISIS_drv_link(hDriver, 0); |
A driver can only be linked to a single hNext destination. To link a driver to two destinations, link the driver to the first destination, then use IG_ISIS_drv_split to split the first destination to the second destination. This is illustrated in the example below.
IG_ISIS_drv_link is used as part of a set of four related functions: IG_ISIS_drv_load which loads individual drivers, IG_ISIS_drv_init which initializes both individual drivers and entire linked pipes of drivers, and IG_ISIS_drv_link and IG_ISIS_drv_split which establish relationships between the loaded drivers. Alternatively, the IG_ISIS_drv_load_init_pipe function loads, initializes, and links drivers in a single step. Use the separate load, initialize, and link/split functions when you need to either link and unlink drivers that remain resident in memory, and when you need to split an ISIS pipe into two or more drivers.
You cannot link an un-initialized driver, and you cannot unload a linked driver. Attempting to do either of these operations will cause problems, including system crashes. |
The foundation of using ISIS is understanding ISIS pipes. An ISIS pipe is a linked set of drivers that is established prior to any scanning or image processing. Once all desired drivers are linked, messages from other ISIS functions are sent to the head driver (the first driver in the pipe). The head driver processes the messages and passes them on to the next driver in the pipe. All drivers receive all messages, and either respond to them or ignore them as appropriate. After all necessary configuration and settings are complete, IG_ISIS_run_zone is used to invoke the pipe, causing each driver to perform its intended operation in turn. This pipe structure requires that the desired functionality be implemented as drivers, and allows large image files to be processed without copying the image data from one full-page buffer to another. The result is much faster and more efficient than alternative image processing schemes.