static struct gpibCmd gpibCmds[] =
{
/* Parameter 0 */
{f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13},
/* parameter 1 */
...
};
where
f1
Address of the Device Support Entry Table (DSET) that describes the record type supported by the table entry..
f2
Type of GPIB I/O operation that is to be performed. The f2 field must be set to one of the enumerated values declared in devCommonGpib.h, i.e. GPIBREAD,...,GPIBEOS. See next section for the definitions.
f3
Processing priority of the I/O operation. Must be IB_Q_HIGH or IB_Q_LOW.
f4
Constant string that is used differently depending on the value of f2. See the discussion of f2 below. Set this field to NULL if not used.
f5
Constant string that is used differently depending on the value of f2. See the discussion of f2. Set this field to NULL if not used.
f6
Length of the buffer pointed to by dpvt.rsp. Holds the message read back from a device when performing a responds-to-writes read operation. Set this field to zero when not used. See the section "Machines That Respond to Everything" for more information.
f7
Length of the buffer that is pointed to by dpvt.msg. The buffer is used for GPIBWRITE, GPIBREAD, or GPIBREADW. Set this field to zero when not used.
f8
Function that is called to perform the I/O operation when f2 is set to GPIBSOFT, or to perform a conversion/parsing operation when f2 is set to any of the other operation types. This function is intended to be used to generate and parse strings being sent to and from an instrument, but can be used for anything. This function must make sure that it does not overflow the dpvt.msg field.. This function is passed f9, f10, and f11 as parameters.
For output operations the function is called to generate the string (possibly using the records VAL field) that is to be sent to the instrument. For input type operations, it is called to scan the response string from the instrument (and fill in the records VAL field.) It is highly recommended that if a custom conversion routine be used, that the designer of the function be familiar with the record-specific library function that calls it.
The function should be declared as returning an int. This return value is passed back to the caller of the device support module after a processing request when f2 is set to GPIBSOFT and is ignored in other cases.
Set to NULL when no conversion function is present.
f9
Integer passed to any conversion function specified in f8. It may be used for any purpose the designer wishes.
f10
Integer passed to any conversion function specified in f8. It may be used for any purpose the designer wishes.
f11
This field plays a double role. When the parameter table entry has a custom conversion routine, it is passed to the conversion routine specified in f8. When f2 is one of the EFAST operations, this field points to the EFAST table. See the EFAST operation descriptions under the f2 field definitions and the section "Efast Tables" for more on the use of this field.
Set this field to NULL when it is not used.
f12
Pointer to a Name Table. Name tables are described in the section "Name Tables".
Set this to NULL when no Name Table is used.
f13
Currently only used if GPIBEOS is specified for any operation. If GPIBEOS is specified then f13 is the value (interpeted as an unsigned 8 bit value) is the end of message character.