itifg_ioctl(4)

NAME
itifg_ioctl - supported ioctl calls of the itifg(4) device driver

SYNOPSIS
GIOC|HIOC _ GE|CR|VS|DG|PV|PCD _ GET|SET _ ...

DESCRIPTION
To use one of the ioctl(2) system calls described below, the header file INSTALL_PREFIX/include/itifgExt.h must be included.
A system-wide unique coding of the ioctl numbers was achieved by coding each command with the letter ‘G /’ ‘H’ as indicated in the command prefix GIOC|HIOC. The letter combinations following the prefix refer to the underlying hardware:

VS | IC-VS
DG | IC-DIG
CLR | IC-CLR
RGB | IC-RGB
CMP | IC-COMP
PV | PCVision
PCD | PCDig
CR | Hardware general
GE | Software general

followed by the direction of data transfer: GET (reading out) and SET (setting) and completed by a abbreviation for the actual operation.
The following sections shows a listing of all available calls classified by the hardware they dealing with. New or changed ioctl's are highlighted with (!).

  Hardware general

GIOC_CR_SET_STOP (!)
    Running grab operations are stopped.

GIOC_CR_SET_START (!)
    A continuous image grab is initiated.

GIOC_CR_SET_SOFTTRIG (!)
    The software trigger is initiated.
    This is testable immediately with the swtrig_itifg program and a adjusted config file.

GIOC_CR_SET_HDEC|VDEC (!)
    If the IC-PCI base module is supporting the ‘Hardware Image Decimation’ feature (starting with rev.B board layout), is is possible to specify the degree of decimation with this call. Possible values are 1, 2, 4, 8 - the validity of the last value depends on the line width. On older boards, don't supporting this feature, only a value of 1 (no decimation) is valid.

  IC-VS/PCVision specific
The IC-VS/PCVision lookup table is read out/set (256Byte).

GIOC|HIOC_VS|PV_SET_LUT_LIN
    The IC-VS/PCVision lookup table is linearized (no transformation).

GIOC|HIOC_VS|PV_GET|SET_NREF
    Reading out/setting the negative reference voltage of the A/D converter. Values between 0 and 255 correspond to Voltages between 0 and 1200 mV.

GIOC|HIOC_VS|PV_GET|SET_PREF
    Reading out/setting the positive reference voltage of the A/D converter. Values between 0 and 255 correspond to voltages between 0 and 2000 mV.

  IC-DIG/PCDig common

GIOC|HIOC_DG|PCD_GET|SET_LUT*PG
    When a 16bit IC-DIG/PCDig is operated in 8/10/12bit mode, one can exploit 256/64/16 different LUT pages due to its 16bit lookup table. With this command one can read out/set the active page. 8bit IC-DIG modules does not offer this feature, at the PCDig the lower or upper 16bit LUT (0 or 1) have to be selected.

GIOC|HIOC_DG|PCD_GET|SET_LUT*
    The IC-DIG/PCDig 16bit lookup table is read out / set. As an argument a union must be provided that contains 256/1024/4096 or 65536 16bit values depending on the adjusted color depth. Again, at PCDig the lower or upper 16bit LUT (0 or 1) have to be selected.

GIOC|HIOC_DG|PCD_SET_LUT_LIN
    The 16bit lookup table is linearized. The type of linearization depends on the adjusted color depth; when this is not 16bit, the first page of the lookup table is linearized, the remaining pages are cleared (set to zero).

GIOC|HIOC_DG|PCD_SET_NORM_TO8
    This command can be used to reduce connected 10/12/16bit cameras to 8bit color depth. Note that values greater than 8bit are truncated.

GIOC|HIOC_DG|PCD_SET_NORM_TO16
    This command can be used to widen 8/10/12bit cameras to 16bit color depth.

GIOC|HIOC_DG|PCD_SET_EXTIME
    This call configures the additional counter at the IC-DIG/PCDig, reserved for special purposes like controlling the exposure time of some line- or area-scan cameras.
    At camera side it needs a model, which supports a trigger-shutter input. This input have to accept a signal form like picture 1:
    picture 1:
                    frame readout
    ---               ---------               ---
       |             |         |             |
        -------------           -------------
         adjustable            ^
        exposure time       restart

    The camera exposures as long as a low level is supplied and begins with the frame output at a low/high edge.
    The described signal is emitted at pins 41(+)13(-)/83(+)84(-) of the 44/100 pin AM-DIG/PCDig connector. The low level period (means exposure time) can be adjusted online from approx 500ns/140ns to 500ms/18s with the included extime_itifg program.
    The restart of the cycle can be configured in three different ways:

    1. automatic restart after frame readout:

            EXSync_Counter_Enable
            ExtSync_Mode = FEN_Trigger
            Trigger_Gen_Disable

    2. manual restart with software trigger:

            EXSync_Counter_Enable
            ExtSync_Mode = SW_Trigger
            Trigger_Gen_Enable
            Trigger_Source = Software

        The moment of restart is determined by the swtrig_itifg program.

    3. manual restart with external (hardware) trigger

            EXSync_Counter_Enable
            ExtSync_Mode = Ext_Trigger
            Trigger_Gen_Enable
            Trigger_Source = External

    The trigger pulse have to applied within 5 sec (PCD_WAIT_TRG).
    An important point to go for success is also the polarity of the involved signals. A tested configuration is:

        FEN_NoInvert
        EXSYNC_Pulse_Active_Low.

    If you need only a hard coded exposure time, you can archive this with EXSCLK_14.32_Div???? and EXSCLK_CounterPreset entries into the config file. The values can be calculated with the following formula:
                         (divisor * counter preset)
    exposure time [us] = --------------------------.
                                14,32 MHz.

GIOC|HIOC_DG|PCD_GET|SET_CAMMD
    One of the additional IC-DIG/PCDig features is the 3/bit/4bit wide camera control bus (TTL-outputs). With this ioctl's it is possible to write/read back these ports.
    It is possible to test the calls with the [-m] option of the extime_itifg program.

  IC-DIG special

GIOC_DG_GET|SET_OLUTPG
    The 24bit IC-DIG offers an additional 8bit lookup table, in which the active LUT page (out of 8 available pages) can be read out/set. This command is not supported by 8/16bit IC-DIG modules.

GIOC_DG_GET|SET_OLUT
    256 values of the active page of the optional lookup table are read from /set to the 24bit IC-DIG.

  PCDig special

HIOC_PCD_SET_EXFREE (!)
    /* FILLME */

HIOC_PCD_GET_STMODE (!)
    /* FILLME */

HIOC_PCD_SET_STMODE (!)
    /* FILLME */

HIOC_PCD_GET_ETMODE (!)
    /* FILLME */

HIOC_PCD_SET_ETMODE (!)
    /* FILLME */

HIOC_PCD_GET_FCNT (!)
    /* FILLME */

HIOC_PCD_SET_FCNT (!)
    /* FILLME */

  Software general

GIOC_GE_GET_WIDTH (!)
    The adjusted image width is returned.

GIOC_GE_GET_HEIGHT (!)
    The adjusted image height is returned.

GIOC_GE_GET_DEPTH (!)
    The adjusted image depth is returned.

GIOC_GE_GET_RAWSIZE (!)
    The memory requirement (in byte) for the expected image is read out. This value depends on the width, height and the color depth of the recorded image.

GIOC_GE_GET_PAGEDSIZE (!)
    The rounded image buffer size read out. This value results from RAWSIZE plus a structure that contains informations on the image, rounded by the PAGESIZE of the system.

GIOC_GE_GET|SET_CAMERA / GIOC_GE_SET_CAMERA
    If an acquisition module has several camera inputs ( e. g. IC-VS) the active camera is read out/set with this command.

GIOC_GE_SET_DEFCNF (!)
    /* FILLME */ This is the most important system call and should be made immediately after the device is opened via open(2), because it presets/calculates a lot of other values (height, width, depth and thus number of buffer etc.). The union that must be supplied with the function call can be filled in easily using the function read_config(of, the, delivered, library) libiticonfig.a! The currently active configuration can also be read out.

GIOC_GE_GET_SYNCWAIT (!)
    /* FILLME */

GIOC_GE_SET_TIMEOUT
    To perform a fine tuning of the device driver's time-out values the current frame rate (frames per second) of the camera must be specified that usually ranges between ITI_FPS_MIN (0.01) and ITI_FPS_MAX (100). The default value refers to 50 Hz interlaced CCIR cameras.

GIOC_GE_GET_STATS
    Till version 0.5.1 of the driver you can access the statistic values only trough the struct icp_info_t, which is appended to the transfered image. With this call, you can get this - and some new i/o-port depending values - with this call.

GIOC_GE_SET_STATS
    Only the i/o-port depending part of the statistics structure will be reset to their default values (means to 0).

SEE ALSO
itifg(4), test_itifg(4), ioctl(2)