5.1. GPIB command bytes
The meaning and values of the possible GPIB command bytes are as follows: Table 12. GPIB command bytes byte (hexadecimal) 0x1 0x4 0x5 value name GTL SDC PPConfig (also 'PPC' on non-powerpc architectures) GET TCT LLO DCL PPU SPE SPD MLA0 to MLA30 description Go to local Selected device clear Parallel poll configure 0x8 0x9 0x11 0x14 0x15 0x18 0x19 0x20 to 0x3e 0x3f 0x40 to 0x5e 0x5f 0x60 to 0x6f Group execute trigger Take control Local lockout Device clear Parallel poll unconfigure Serial poll enable Serial poll disable My (primary) listen address 0 to 30 UNL Unlisten MTA0 to MTA30 My (primary) talk address 0 to 30 UNT Untalk MSA0 to MSA15, also When following a talk or PPE listen address, this is 'my secondary address' 0 to 15. When following a parallel poll configure, this is 'parallel poll enable'. For parallel poll enable, the least significant 3 bits of the command byte specify which DIO line the device should use to send its parallel poll response. The fourth least significant bit (0x8) 0x70 to 0x7d 0x7e
5.2. GPIB bus lines
indicates the 'sense' or polarity the device should use when responding. MSA16 to MSA29, also When following a talk or PPD listen address, this is 'my secondary address' 16 to 29. When following a parallel poll configure, this is 'parallel poll disable'. MSA30 My secondary address 30 Physically, the GPIB bus consists of 8 data lines, 3 handshaking lines, and 5 control lines (and 8 ground lines). Brief descriptions of how they are used follow:
Table 13. GPIB bus lines bus line DIO1 through DIO8 description Data input/output bits. These 8 lines are used to read and write the 8 bits of a data or command byte that is being sent over the bus. End-or-identify. This line is asserted with the last byte of data during a write, to indicate the end of the message. It can also be asserted along with the ATN line to conduct a parallel poll. Data valid. This is a handshaking line, used to signal that the value being sent with DIO1-DIO8 is valid. During transfers the DIO1-DIO8 lines are set, then the DAV line is asserted after a delay called the 'T1 delay'. The T1 delay lets the pin number DIO1 to DIO4 use pins 1 to 4, DIO5 to DIO8 use pins 13 to 16 5 EOI DAV 6 NRFD NDAC IFC SRQ ATN REN data lines settle to stable values before they are read. Not ready for data. NRFD is a handshaking line asserted by listeners to indicate they are not ready to receive a new data byte. Not data accepted. NDAC is a handshaking line asserted by listeners to indicate they have not yet read the byte contained on the DIO lines. Interface clear. The system controller can assert this line (it should be asserted for at least 100 microseconds) to reset the bus and make itself controller-in-charge. Service request. Devices on the bus can assert this line to request service from the controller-in-charge. The controller can then poll the devices until it finds the device requesting service, and perform whatever action is necessary. Attention. ATN is asserted to indicate that the DIO lines contain a command byte (as opposed to a data byte). Also, it is asserted with EOI when conducting parallel polls. Remote enable. Asserted by the system controller, it enables devices to enter remote mode. When REN is asserted, a device will enter remote mode when it is addressed by the controller. When REN is false, all devices will immediately return to local mode. 7 8 9 10 11 17
ibwrt Name
ibwrt -- write data bytes (board or device) Synopsis
class=FUNCSYNOPSISINFO #include int ibwrt(int ud, const void *data, long num_bytes); Description ibwrt() is used to write data bytes to a device or board. The argument ud can be either a device or board descriptor. num_bytes specifies how many bytes are written from the user-supplied array data. EOI may be asserted with the last byte sent or when the end-of-string character is sent (see ibeos() and ibeot()). The write operation may be interrupted by a timeout (see ibtmo()), the board receiving a device clear command, or receiving an interface clear. If ud is a device descriptor, then the library automatically handles addressing the device as listener and the interface board as talker, before sending the data bytes onto the bus. If ud is a board descriptor, the board simply writes the data onto the bus. The controller-in-charge must address the board as talker. After the ibwrt() call, ibcnt and ibcntl are set to the number of bytes written. Return value The value of ibsta is returned. ibdev Name ibdev -- open a device (device) Synopsis class=FUNCSYNOPSISINFO#include int ibdev(int board_index, int pad, int sad, int timeout, int send_eoi, int eos); Description ibdev() is used to obtain a device descriptor, which can then be used by other functions in the library. The argument board_index specifies which GPIB interface board the device is connected to. The pad and sad arguments specify the GPIB address of the device to be opened (see ibpad() and ibsad()). The timeout for io operations is specified by timeout (see ibtmo()). If send_eoi is nonzero, then the EOI line will be asserted with the last byte sent during writes (see ibeot()). Finally, the eos argument specifies the end-of-string character and whether or not its reception should terminate reads (see ibeos()). Return value If sucessful, returns a (non-negative) device descriptor. On failure, -1 is returned. ibcnt and ibcntl Name ibcnt and ibcntl -- hold number of bytes transferred, or errno Synopsis class=PROGRAMLISTING #include volatile int ibcnt; volatile long ibcntl; Description ibcnt and ibcntl are set after IO operations to the the the number of bytes sent or received. They are also set to the value of errno after EDVR or EFSO errors. If you wish to avoid using a global variable, you may instead use ThreadIbcnt() or ThreadIbcntl() which return thread-specific values. iberr Name iberr -- holds error code Synopsis class=PROGRAMLISTING #include volatile int iberr; Description iberr is set whenever a function from the 'traditional' or 'multidevice' API fails with an error. The meaning of each possible value of iberr is summarized in the following table: Table 1. iberr error codes constant value EDVR 0 ECIC ENOL EADR EARG ESAC EABO 1 2 3 4 5 6 meaning A system call has failed. ibcnt/ibcntl will be set to the value of errno. Your interface board needs to be controller-in-charge, but is not. You have attempted to write data or command bytes, but there are no listeners currently addressed. The interface board has failed to address itself properly before starting an io operation. One or more arguments to the function call were invalid. The interface board needs to be system controller, but is not. A read or write of data bytes has been aborted, possibly ENEB EDMA EOIP ECAP 7 8 10 11 EFSO EBUS ESTB 12 14 15 ESRQ 16 ETAB 20 due to a timeout or reception of a device clear command. The GPIB interface board does not exist, its driver is not loaded, or it is not configured properly. Not used (DMA error), included for compatibility purposes. Function call can not proceed due to an asynchronous IO operation (ibrda(), ibwrta(), or ibcmda()) in progress. Incapable of executing function call, due the GPIB board lacking the capability, or the capability being disabled in software. File system error. ibcnt/ibcntl will be set to the value of errno. An attempt to write command bytes to the bus has timed out. One or more serial poll status bytes have been lost. This can occur due to too many status bytes accumulating (through automatic serial polling) without being read. The serial poll request service line is stuck on. This can occur if a physical device on the bus requests service, but its GPIB address has not been opened (via ibdev() for example) by any process. Thus the automatic serial polling routines are unaware of the device's existence and will never serial poll it. This error can be returned by ibevent(), FindLstn(), or FindRQS(). See their descriptions for more information. If you wish to avoid using a global variable, you may instead use ThreadIberr() which returns a thread-specific value. ibsta Name ibsta -- holds status Synopsis class=PROGRAMLISTING #include volatile int ibsta; Description ibsta is set whenever a function from the 'traditional' or 'multidevice' API is called. Each of the bits in ibsta has a different meaning, summarized in the following table: Table 1. ibsta Bits bit DCAS value (hexadecimal) 0x1 meaning used for board/device DCAS is set when a board board receives the device clear command (that is, the SDC or DCL command byte). It is cleared on the next 'traditional' or 'multidevice' function call following ibwait() (with DCAS set in the wait mask), or following a read or write (ibrd(), ibwrt(), Receive(), etc.). The DCAS and DTAS bits will only be set if the event queue is disabled. The event queue may be disabled with ibconfig(). DTAS is set when a board board has received a device trigger command (that is, the GET command byte). It is cleared on the next 'traditional' or 'multidevice' function call following ibwait() (with DTAS in the wait mask). The DCAS and DTAS bits will only be set if the event queue is disabled. The event queue may be disabled with ibconfig(). Board is currently board addressed as a listener. Board is currently board addressed as talker. The ATN line is asserted. board Board is board DTAS 0x2 LACS TACS ATN CIC 0x4 0x8 0x10 0x20 REM LOK CMPL 0x40 0x80 0x100 EVENT 0x200 SPOLL 0x400 RQS 0x800 SRQI 0x1000 controller-in-charge, so it is able to set the ATN line. Board is in 'remote' state. Board is in 'lockout' state. I/O operation is complete. Useful for determining when an asynchronous io operation (ibrda(), ibwrta(), etc) has completed. One or more clear, trigger, or interface clear events have been received, and are available in the event queue (see ibevent()). The EVENT bit will only be set if the event queue is enabled. The event queue may be enabled with ibconfig(). If this bit is enabled (see ibconfig()), it is set when the board is serial polled. The SPOLL bit is cleared when the board requests service (see ibrsv()) or you call ibwait() on the board with SPOLL in the wait mask. RQS indicates that the device has requested service, and one or more status bytes are available for reading with ibrsp(). RQS will only be set if you have automatic serial polling enabled (see ibconfig()). SRQI indicates that a device connected to the board is asserting the SRQ line. It is only set if the board is the controller-in-charge. If automatic serial polling is enabled (see ibconfig()), SRQI will generally be cleared, since when a device requests service it board board board or device board board device board END 0x2000 TIMO 0x4000 will be automatically polled and then unassert SRQ. END is set if the last io board or device operation ended with the EOI line asserted, and may be set on reception of the end-of-string character. The IbcEndBitIsNormal option of ibconfig() can be used to configure whether or not END should be set on reception of the eos character. TIMO indicates that the last board or device io operation or ibwait() timed out. 指示上次输入输出操作或者ibwait()函数超时 ERR 0x8000 ERR is set if the last board or device 'traditional' or 'multidevice' function call failed. The global variable iberr will be set indicate the cause of the error. If you wish to avoid using a global variable, you may instead use ThreadIbsta() which returns a thread-specific value. ibask Name ibask -- query configuration (board or device) // 质问, 询问, 怀疑, 疑问 Synopsis class=FUNCSYNOPSISINFO#include Description Queries various configuration settings associated with the board or device descriptor ud. The option argument specifies the particular setting you wish to query. The result of the query is written to the location specified by result. To change the descriptor's configuration, see ibconfig(). Table 1. ibask options option IbaPAD IbaSAD value (hexadecimal) 0x1 0x2 result of query used for board/device primary board or device board or device IbaTMO 0x3 IbaEOT 0x4 IbaPPC 0x5 IbaREADDR 0x6 IbaAUTOPOLL 0x7 IbaCICPROT 0x8 IbaSC 0xa GPIB address GPIB secondary address (0 for none, 0x60 to 0x7e for secondary addresses 0 to 30) Timeout setting for io operations (a number from 0 to 17). See ibmto(). Nonzero if EOI is asserted with last byte on writes. See ibeot(). Parallel poll configuration. See ibppc(). Useless, included for compatibility only. Nonzero if automatic serial polling is enabled. Useless, included for compatibility only. Nonzero if board is system board or device board device board board board IbaSRE 0xb IbaEOSrd 0xc IbaEOSwrt 0xd IbaEOScmp 0xe IbaEOSchar IbaPP2 0xf 0x10 controller. See ibrsc(). Nonzero if board autmatically asserts REN line when it becomes the system controller. See ibsre(). Nonzero if termination of reads on reception of the end-of-string character is enabled. See ibeos(), in particular the REOS bit. Nonzero if EOI is asserted whenever end-of-string character is sent. See ibeos(), in particular the XEOS bit. Nonzero if all 8 bits are used to match end-of-string character. Zero if only least significant 7 bits are used. See ibeos(), in particular the BIN bit. The end-of-string byte. Nonzero if in local parallel poll configure mode. Zero if in remote board board or device board or device board or device board or device board IbaTIMING 0x11 IbaReadAdjust 0x13 IbaWriteAdjust 0x14 IbaEventQueue IbaSPollBit 0x15 0x16 IbaSendLLO 0x17 parallel poll configure mode. Number indicating T1 delay. 1 for 2 microseconds, 2 for 500 nanoseconds, 3 for 350 nanoseconds. The values are declared in the header files as the constants T1_DELAY_2000ns, T1_DELAY_500ns, and T1_DELAY_350ns. Nonzero if byte pairs are automatically swapped during reads. Nonzero if byte pairs are automatically swapped during writes. Nonzero if event queue is enabled. Nonzero if the use of the SPOLL bit in ibsta is enabled. Nonzero if devices connected to this board are automatically put into local lockout mode when brought online board board or device board or device board board board IbaSPollTime 0x18 IbaPPollTime 0x18 IbaEndBitIsNormal 0x1a IbaUnAddr 0x1b IbaHSCableLengt0x1f h IbaIst IbaRsv 0x20 0x21 IbaBNA 0x200 with ibfind() or ibdev(). Timeout for serial polls. The value of the result is between 0 and 17, and has the same meaning as in ibtmo(). Timeout for parallel polls. The value of the result is between 0 and 17, and has the same meaning as in ibtmo(). Nonzero if END bit of ibsta is set on reception of end-of-string character or EOI. Zero if END bit is only set on EOI. Nonzero if UNT (untalk) and UNL (unlisten) commands are automatically sent after a completed io operation using this descriptor. Useless, included only for compatibility. Individual status bit, a.k.a. 'ist'. The current status byte this board will use to respond to serial polls. Board index (minor number) of device board board or device device board board board device Iba7BitEOS 0x1000 interface board which is the controller-in-charge of this device's GPIB bus. Nonzero if board board supports 7 bit EOS comparisons. See ibeos(), in particular the BIN bit. This is a Linux-GPIB extension. Return value The value of ibsta is returned. ibbna Name ibbna -- change access board (device) Synopsis class=FUNCSYNOPSISINFO#include Description ibbna() changes the GPIB interface board used to access the device specified by ud. Subsequent device level calls using the descriptor ud will assume the device is connected to the interface board specified by name. If you wish to specify a device's new access board by board index instead of name, you can use the IbcBNA option of ibconfig(). The name of a board can be specified in the configuration file gpib.conf. On success, iberr is set to the board index of the device's old access board. Return value The value of ibsta is returned. ibcac Name ibcac -- assert ATN (board) Synopsis class=FUNCSYNOPSISINFO#include Description ibcac() causes the board specified by the board descriptor ud to become active controller by asserting the ATN line. The board must be controller-in-change in order to assert ATN. If synchronous is nonzero, then the board will wait for a data byte on the bus to complete its transfer before asserting ATN. If the synchronous attempt times out, or synchronous is zero, then ATN will be asserted immediately. It is generally not necessary to call ibcac(). It is provided for advanced users who want direct, low-level access to the GPIB bus. Return value The value of ibsta is returned. ibclr Name ibclr -- clear device (device) Synopsis class=FUNCSYNOPSISINFO#include Description ibclr() sends the clear command to the device specified by ud. Return value The value of ibsta is returned. ibcmd Name ibcmd -- write command bytes (board) Synopsis class=FUNCSYNOPSISINFO#include Description ibcmd() writes the command bytes contained in the array commands to the bus. The number of bytes written from the array is specified by num_bytes. The ud argument is a board descriptor, and the board must be controller-in-charge. Most of the possible command bytes are declared as constants in the header files. In particular, the constants GTL, SDC, PPConfig, GET, TCT, LLO, DCL, PPU, SPE, SPD, UNL, UNT,and PPD are available. Additionally, the inline functions MTA(), MLA(), MSA(), and PPE_byte() are available for producing 'my talk address', 'my listen address', 'my secondary address', and 'parallel poll enable' command bytes respectively. It is generally not necessary to call ibcmd(). It is provided for advanced users who want direct, low-level access to the GPIB bus. Return value The value of ibsta is returned. ibcmda Name ibcmda -- write command bytes asynchronously (board) Synopsis class=FUNCSYNOPSISINFO#include Description ibcmda() is similar to ibcmd() except it operates asynchronously. ibcmda() does not wait for the sending of the command bytes to complete, but rather returns immediately. While an asynchronous operation is in progress, most library functions will fail with an EOIP error. In order to sucessfully complete an asynchronous operation, you must call ibwait() until the CMPL bit is set ibsta. Asynchronous operations may also be aborted with an ibstop() or ibonl() call. Return value The value of ibsta is returned. ibconfig Name ibconfig -- change configuration (board or device) Synopsis class=FUNCSYNOPSISINFO#include Description Changes various configuration settings associated with the board or device descriptor ud. The option argument specifies the particular setting you wish to modify. The setting argument specifies the option's new configuration. To query the descriptor's configuration, see ibask(). Table 1. ibconfig options option IbcPAD value (hexadecimal) 0x1 effect used for board/device Sets GPIB board or device primary address. Same as ibpad() Sets GPIB board or device secondary address. Same as ibsad() Sets timeout for io board or device operations. Same as ibmto(). If setting is nonzero, EOI is asserted with last byte on writes. IbcSAD 0x2 IbcTMO 0x3 IbcEOT 0x4 IbcPPC 0x5 IbcREADDR 0x6 IbcAUTOPOLL 0x7 IbcCICPROT 0x8 IbcSC 0xa IbcSRE 0xb IbcEOSrd 0xc IbcEOSwrt 0xd Same as ibeot(). Sets parallel poll configuration. Same as ibppc(). Useless, included for compatibility only. If setting is nonzero then automatic serial polling is enabled. Useless, included for compatibility only. If setting is nonzero, board becomes system controller. Same as ibrsc(). If setting is nonzero then board asserts REN line. Otherwise REN is unasserted. Same as ibsre(). If setting is nonzero then reads are terminated on reception of the end-of-string character. See ibeos(), in particular the REOS bit. If setting is nonzero then EOI is asserted whenever the end-of-string character is sent. See ibeos(), in particular the board device board board board board board or device board or device IbcEOScmp 0xe IbcEOSchar 0xf IbcPP2 0x10 IbcTIMING 0x11 XEOS bit. If setting is board or device nonzero then all 8 bits are used to match the end-of-string character. Otherwise only the least significant 7 bits are used. See ibeos(), in particular the BIN bit. Sets the board or device end-of-string byte. See ibeos(). If setting is board nonzero then the board is put into local parallel poll configure mode, and will not change its parallel poll configuration in response to receiving 'parallel poll enable' command bytes from the controller-in-charge. Otherwise the board is put in remote parallel poll configure mode. Some older hardware does not support local parallel poll configure mode. Sets the T1 delay. board Use setting of 1 for 2 IbcReadAdjust 0x13 IbcWriteAdjust 0x14 IbcEventQueue 0x15 microseconds, 2 for 500 nanoseconds, or 3 for 350 nanoseconds. These values are declared in the header files as the constants T1_DELAY_2000ns, T1_DELAY_500ns, and T1_DELAY_350ns. A 2 microsecond T1 delay is safest, but will limit maximum transfer speeds to a few hundred kilobytes per second. If setting is board or device nonzero then byte pairs are automatically swapped during reads. Presently, this feature is unimplemented. If setting is board or device nonzero then byte pairs are automatically swapped during writes. Presently, this feature is unimplemented. If setting is board nonzero then the event queue is enabled. The event queue is disabled by IbcSPollBit 0x16 IbcSendLLO 0x17 IbcSPollTime 0x18 IbcPPollTime 0x18 IbcEndBitIsNormal 0x1a default. If the setting is nonzero then the use of the SPOLL bit in ibsta is enabled. If the setting is nonzero then devices connected to this board are automatically put into local lockout mode when brought online with ibfind() or ibdev(). Sets timeout for serial polls. The setting must be between 0 and 17, which correspond to the same time periods as in ibtmo(). Sets timeout for parallel polls. The setting must be between 0 and 17, which correspond to the same time periods as in ibtmo(). If setting is nonzero then the END bit of ibsta is set on reception of the end-of-string character or EOI (default). Otherwise END board board device board board or device IbcUnAddr 0x1b IbcHSCableLength IbcIst 0x1f 0x20 IbcRsv 0x21 IbcBNA 0x200 bit is only set on EOI. If setting is nonzero then UNT (untalk) and UNL (unlisten) commands are automatically sent after a completed io operation using this descriptor. This option is off by default. Useless, included only for compatibility. Sets the individual status bit, a.k.a. 'ist'. Same as ibist(). Sets the current status byte this board will use to respond to serial polls. Same as ibrsv(). Changes the GPIB interface board used to access a device. The setting specifies the board index of the new access board. This configuration option is similar to ibbna() except the new board is specified by its board index instead of a name. device board board board device Return value The value of ibsta is returned. ibeos Name ibeos -- set end-of-string mode (board or device) Synopsis class=FUNCSYNOPSISINFO #include Description ibeos() is used to set the end-of-string character and mode. The least significant 8 bits of eosmode specify the eos character. You may also bitwise-or one or more of the following bits to set the eos mode: Table 1. End-of-String Mode Bits constant REOS value (hexadecimal) 0x400 meaning Enable termination of reads when eos character is received. Assert the EOI line whenever the eos character is sent during writes. Match eos character using all 8 bits (instead of only looking at the 7 least significant bits). XEOS 0x800 BIN 0x1000 Return value The value of ibsta is returned. ibeot Name ibeot -- assert EOI with last data byte (board or device) Synopsis class=FUNCSYNOPSISINFO#include Description If send_eoi is non-zero, then the EOI line will be asserted with the last byte sent by calls to ibwrt() and related functions. Return value The value of ibsta is returned. ibevent Name ibevent -- get events from event queue (board) Synopsis class=FUNCSYNOPSISINFO#include int ibevent(int ud, short *event); Description ibevent() is used to obtain the oldest event stored in the event queue of the board specified by the board descriptor ud. The EVENT bit of ibsta indicates that the event queue contains 1 or more events. An event may be a clear command, a trigger command, or reception of an interface clear. The type of event is stored in the location specified by event and may be set to any of the following values: Table 1. events constant EventNone EventDevTrg value 0 1 description The board's event queue is empty The board has received a trigger command from the controller-in-charge. The board has received a clear command from the controller-in-charge. The board has received an interface clear from the system controller. Note, some models of GPIB interface board lack the ability to report interface clear events. EventDevClr 2 EventIFC 3 The event queue is disabled by default. It may be enabled by a call to ibconfig(). Each interface board has a single event queue which is shared across all processes and threads. So, only one process can retrieve any given event from the queue. Also, the queue is of finite size so events may be lost (ibevent() will return an error) if it is neglected too long. Return value The value of ibsta is returned. ibfind Name ibfind -- open a board or device (board or device) Synopsis class=FUNCSYNOPSISINFO#include Description ibfind() returns a board or device descriptor based on the information found in the configuration file. It is not required to use this function, since device descriptors can be obtained with ibdev() and the 'board index' (minor number in the configuration file) can be used directly as a board descriptor. Return value If sucessful, returns a (non-negative) board or device descriptor. On failure, -1 is returned. ibist Name ibist -- set individual status bit (board) Synopsis class=FUNCSYNOPSISINFO#include Description If ist is nonzero, then the individual status bit of the board specified by the board descriptor ud is set. If ist is zero then the individual status bit is cleared. The individual status bit is sent by the board in response to parallel polls. On success, iberr is set to the previous ist value. Return value The value of ibsta is returned. ibln Name ibln -- check if listener is present (board or device) Synopsis class=FUNCSYNOPSISINFO#include Description ibln() checks for the presence of a device, by attempting to address it as a listener. ud specifies the GPIB interface board which should check for listeners. If ud is a device descriptor, then the device's access board is used. The GPIB address to check is specified by the pad and sad arguments. pad specifies the primary address, 0 through 30 are valid values. sad gives the secondary address, and may be a value from 0x60 through 0x7e (96 through 126), or one of the constants NO_SAD or ALL_SAD. NO_SAD indicates that no secondary addressing is to be used, and ALL_SAD indicates that all secondary addresses should be checked. If the board finds a listener at the specified GPIB address(es), then the variable specified by the pointer found_listener is set to a nonzero value. If no listener is found, the variable is set to zero. The board must be controller-in-charge to perform this function. Also, it must have the capability to monitor the NDAC bus line (see iblines()). Return value The value of ibsta is returned. iblines Name iblines -- monitor bus lines (board) Synopsis class=FUNCSYNOPSISINFO#include Description iblines() is used to obtain the status of the control and handshaking bus lines of the bus. The board used to monitor the bus is specified by the ud argument, and the status of the various bus lines are written to the location specified by line_status. Some older chips are not capable of reporting the status of the bus lines, so each line has two corresponding bits in line_status. One bit indicates if the board can monitor the line, and the other bit indicates the line's state. The meaning of the line_status bits are as follows: Table 1. line status bits constant ValidDAV ValidNDAC ValidNRFD ValidIFC ValidREN ValidSRQ ValidATN ValidEOI BusDAV value 0x1 0x2 0x4 0x8 0x10 0x20 0x40 0x80 0x100 description The BusDAV bit is valid. The BusNDAC bit is valid. The BusNRFD bit is valid. The BusIFC bit is valid. The BusREN bit is valid. The BusSRQ bit is valid. The BusATN bit is valid. The BusEOI bit is valid. Set/cleared if the DAV line is asserted/unasserted. Set/cleared if the NDAC line is asserted/unasserted. Set/cleared if the NRFD line is asserted/unasserted. Set/cleared if the IFC line is asserted/unasserted. BusNDAC 0x200 BusNRFD 0x400 BusIFC 0x800 BusREN 0x1000 BusSRQ 0x2000 BusATN 0x4000 BusEOI 0x8000 Set/cleared if the REN line is asserted/unasserted. Set/cleared if the SRQ line is asserted/unasserted. Set/cleared if the ATN line is asserted/unasserted. Set/cleared if the EOI line is asserted/unasserted. Return value The value of ibsta is returned. ibloc Name ibloc -- go to local mode (board or device) Synopsis class=FUNCSYNOPSISINFO #include Description Causes the board or device specified by the descriptor ud to go to local mode. If ud is a board descriptor, and the board is in local lockout, then the function will fail. Note, if the system controller is asserting the REN line, then devices on the bus will return to remote mode the next time they are addressed by the controller in charge. Return value The value of ibsta is returned. ibonl Name ibonl -- close or reinitialize descriptor (board or device) Synopsis class=FUNCSYNOPSISINFO#include Description If the online is zero, then ibonl() frees the resources associated with the board or device descriptor ud. The descriptor cannot be used again after the ibonl() call. If the online is nonzero, then all the settings associated with the descriptor (GPIB address, end-of-string mode, timeout, etc.) are reset to their 'default' values. The 'default' values are the settings the descriptor had when it was first obtained with ibdev() or ibfind(). Return value The value of ibsta is returned. ibpad Name ibpad -- set primary GPIB address (board or device) Synopsis class=FUNCSYNOPSISINFO#include Description ibpad() sets the GPIB primary address to pad for the device or board specified by the descriptor ud. If ud is a device descriptor, then the setting is local to the descriptor (it does not affect the behaviour of calls using other descriptors, even if they refer to the same physical device). If ud is a board descriptor, then the board's primary address is changed immediately, which is a global change affecting anything (even other processes) using the board. Valid GPIB primary addresses are in the range from 0 to 30. Return value The value of ibsta is returned. ibpct Name ibpct -- pass control (board) Synopsis class=FUNCSYNOPSISINFO#include Description ibpct() passes control to the device specified by the device descriptor ud. The device becomes the new controller-in-charge. Return value The value of ibsta is returned. ibppc Name ibppc -- parallel poll configure (board or device) Synopsis class=FUNCSYNOPSISINFO#include Description Configures the parallel poll response of the device or board specified by ud. The configuration should either be set to the 'PPD' constant to disable parallel poll responses, or set to the return value of the PPE_byte() inline function to enable and configure the parallel poll response. After configuring the parallel poll response of devices on a bus, you may use ibrpp() to parallel poll the devices. Return value The value of ibsta is returned. ibrd Name ibrd -- read data bytes (board or device) Synopsis class=FUNCSYNOPSISINFO#include Description ibrd() is used to read data bytes from a device or board. The argument ud can be either a device or board descriptor. Up to num_bytes bytes are read into the user-supplied array buffer. The read may be terminated by a timeout occuring(see ibtmo()), the talker asserting the EOI line, the board receiving the end-of-string character (see ibeos()), receiving a device clear command, or receiving an interface clear. If ud is a device descriptor, then the library automatically handles addressing the device as talker and the interface board as listener before performing the read. If ud is a board descriptor, no addressing is performed and the board must be addressed as a listener by the controller-in-charge. After the ibrd() call, ibcnt and ibcntl are set to the number of bytes read. Return value The value of ibsta is returned. ibrda Name ibrda -- read data bytes asynchronously (board or device) Synopsis class=FUNCSYNOPSISINFO#include Description ibrda() is similar to ibrd() except it operates asynchronously. ibrda() does not wait for the reception of the data bytes to complete, but rather returns immediately. While an asynchronous operation is in progress, most library functions will fail with an EOIP error. In order to sucessfully complete an asynchronous operation, you must call ibwait() until the CMPL bit is set ibsta. Asynchronous operations may also be aborted with an ibstop() or ibonl() call. Return value The value of ibsta is returned ibrdf Name ibrdf -- read data bytes to file (board or device) Synopsis class=FUNCSYNOPSISINFO#include Description ibrdf() is similar to ibrd() except that the data bytes read are stored in a file instead of an array in memory. file_path specifies the save file. If the file already exists, the data will be appended onto the end of the file. Return value The value of ibsta is returned. ibrsc Name ibrsc -- request system control (board) Synopsis class=FUNCSYNOPSISINFO#include Description If request_control is nonzero, then the board specified by the board descriptor ud is made system controller. If request_control is zero, then the board releases system control. The system controller has the ability to assert the REN and IFC lines, and is typically also the controller-in-charge. A GPIB bus may not have more than one system controller. Return value The value of ibsta is returned. ibrsv Name ibrsv -- request service (board) Synopsis class=FUNCSYNOPSISINFO#include Description The serial poll response byte of the board specified by the board descriptor ud is set to status_byte. If the request service bit (0x40 hexadecimal) in status_byte is set, then the board will also request service by asserting the RQS line. Return value The value of ibsta is returned ibsad Name ibsad -- set secondary GPIB address (board or device) Synopsis class=FUNCSYNOPSISINFO#include Description ibsad() sets the GPIB secondary address of the device or board specified by the descriptor ud. If ud is a device descriptor, then the setting is local to the descriptor (it does not affect the behaviour of calls using other descriptors, even if they refer to the same physical device). If ud is a board descriptor, then the board's secondary address is changed immediately, which is a global change affecting anything (even other processes) using the board. This library follows NI's unfortunate convention of adding 0x60 hexadecimal (96 decimal) to secondary addresses. That is, if you wish to set the secondary address to 3, you should set sad to 0x63. Setting sad to 0 disables the use of secondary addressing. Valid GPIB secondary addresses are in the range from 0 to 30 (which correspond to sad values of 0x60 to 0x7e). Return value The value of ibsta is returned. ibsic Name ibsic -- perform interface clear (board) Synopsis class=FUNCSYNOPSISINFO#include Description ibsic() resets the GPIB bus by asserting the 'interface clear' (IFC) bus line for a duration of at least 100 microseconds. The board specified by ud must be the system controller in order to assert IFC. The interface clear causes all devices to untalk and unlisten, puts them into serial poll disabled state (don't worry, you will still be able to conduct serial polls), and the board becomes controller-in-charge. Return value The value of ibsta is returned. ibsre Name ibsre -- set remote enable (board) Synopsis class=FUNCSYNOPSISINFO#include Description If enable is nonzero, then the board specified by the board descriptor ud asserts the REN line. If enable is zero, the REN line is unasserted. The board must be the system controller. Return value The value of ibsta is returned. ibstop Name ibstop -- abort asynchronous i/o operation (board or device) Synopsis class=FUNCSYNOPSISINFO#include Description ibstop() aborts an asynchronous i/o operation (for example, one started with ibcmda(), ibrda(), or ibwrta()). The return value of ibstop() is counter-intuitive. On successfully aborting an asynchronous operation, the ERR bit is set in ibsta, and iberr is set to EABO. If the ERR bit is not set in ibsta, then there was no asynchronous i/o operation in progress. If the function failed, the ERR bit will be set and iberr will be set to some value other than EABO. Return value The value of ibsta is returned. ibtmo Name ibtmo -- adjust io timeout (board or device) Synopsis class=FUNCSYNOPSISINFO#include Description ibtmo() sets timeout for IO operations performed using the board or device descriptor ud. The actual amount of time before a timeout occurs may be greater than the period specified, but never less. timeout is specified by using one of the following constants: Table 1. Timeout constants constant TNONE T10us T30us T100us T300us T1ms T3ms T10ms T30ms T100ms T300ms T1s T3s T10s T30s T100s T300s T1000s Return value The value of ibsta is returned. ibtrg Name value 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 timeout Never timeout. 10 microseconds 30 microseconds 100 microseconds 300 microseconds 1 millisecond 3 milliseconds 10 milliseconds 30 milliseconds 100 milliseconds 300 milliseconds 1 second 3 seconds 10 seconds 30 seconds 100 seconds 300 seconds 1000 seconds ibtrg -- trigger device (device) Synopsis class=FUNCSYNOPSISINFO#include Description ibtrg() sends a GET (group execute trigger) command byte to the device specified by the device descriptor ud. Return value The value of ibsta is returned. ibwait Name ibwait -- wait for event (board or device) Synopsis class=FUNCSYNOPSISINFO #include int ibwait(int ud, int status_mask); Description ibwait() will sleep until one of the conditions specified in status_mask is true. The meaning of the bits in status_mask are the same as the bits of the ibsta status variable. If status_mask is zero, then ibwait() will return immediately. This is useful if you simply wish to get an updated ibsta. Return value The value of ibsta is returned. ibwrta Name ibwrta -- write data bytes asynchronously (board or device) Synopsis class=FUNCSYNOPSISINFO#include Description ibwrta() is similar to ibwrt() except it operates asynchronously. ibwrta() does not wait for the sending of the data bytes to complete, but rather returns immediately. While an asynchronous operation is in progress, most library functions will fail with an EOIP error. In order to sucessfully complete an asynchronous operation, you must call ibwait() and until the CMPL bit is set ibsta. Asynchronous operations may also be aborted with an ibstop() or ibonl() call. Return value The value of ibsta is returned. ibwrtf Name ibwrtf -- write data bytes from file (board or device) Synopsis class=FUNCSYNOPSISINFO#include Description ibwrtf() is similar to ibwrt() except that the data to be written is taken from a file instead of an array in memory. file_path specifies the file, which is written byte for byte onto the bus. Return value The value of ibsta is returned. AllSPoll Name AllSPoll -- serial poll multiple devices Synopsis class=FUNCSYNOPSISINFO#include void AllSPoll(int board_desc, Addr4882_t *addressList, short *resultList); void AllSpoll(int board_desc, const Addr4882_t *addressList, short *resultList); Description AllSPoll() causes the interface board specified by board_desc to serial poll all the GPIB addresses specified in the addressList array. The results of the serial polls are stored into resultList. If you only wish to serial poll a single device, ReadStatusByte() or ibrsp() may be more convenient. This function may also be invoked with the alternate capitalization 'AllSpoll' for compatibility with NI's library. DevClear Name DevClear -- clear a device Synopsis class=FUNCSYNOPSISINFO#include Description DevClear() causes the interface board specified by board_desc to send the clear command to the GPIB addresses specified by address. The results of the serial polls are stored into resultList. If you wish to clear multiple devices simultaneously, use DevClearList() DevClearList Name DevClearList -- clear multiple devices Synopsis class=FUNCSYNOPSISINFO#include void DevClearList(int board_desc, const Addr4882_t addressList[]); Description DevClear() causes the interface board specified by board_desc to send the clear command simultaneously to all the GPIB addresses specified by the addressList array. If addressList is empty or NULL, then the clear command is sent to all devices on the bus. If you only wish to clear a single device, DevClear() or ibclr() may be slightly more convenient. EnableLocal Name EnableLocal -- put devices into local mode. Synopsis class=FUNCSYNOPSISINFO#include void EnableLocal(int board_desc, const Addr4882_t addressList[]); Description EnableLocal() addresses all of the devices in the addressList array as listeners then sends the GTL (go to local) command byte, causing them to enter local mode. This requires that the board is the controller-in-charge. Note that while the REN (remote enable) bus line is asserted, the devices will return to remote mode the next time they are addressed. If addressList is empty or NULL, then the REN line is unasserted and all devices enter local mode. The board must be system controller to change the state of the REN line. FindLstn Name FindLstn -- find devices Synopsis class=FUNCSYNOPSISINFO#include void FindLstn(int board_desc, const Addr4882_t padList[], Addr4882_t resultList[], int maxNumResults); Description FindLstn() will check the primary addresses in the padList array for devices. The GPIB addresses of all devices found will be stored in the resultList array. The maxNumResults limits the maximum number of results that will be returned, and is usually set to the number of elements in the resultList array. If more than maxNumResults devices are found, an ETAB error is returned in iberr. The padList should consist of primary addresses only, with no secondary addresses (all possible secondary addresses will be checked as necessary). Your GPIB board must have the capability to monitor the NDAC bus line in order to use this function (see iblines). FindRQS Name FindRQS -- find device requesting service and read its status byte Synopsis class=FUNCSYNOPSISINFO#include void FindRQS(int board_desc, const Addr4882_t addressList[], short *status); Description FindRQS will serial poll the GPIB addresses specified in the addressList array until it finds a device requesting service. The status byte of the device requesting service is stored in the location specified by status. The addressList array index of the device requesting service is returned in ibcnt. If no device requesting service is found, an ETAB error is returned in iberr. PassControl Name PassControl -- make device controller-in-charge Synopsis class=FUNCSYNOPSISINFO#include void PassControl(int board_desc, const Addr4882_t address); Description PassControl() causes the board specified by board_desc to pass control to the device specified by address. On success, the device becomes the new controller-in-charge. PPoll Name PPoll -- parallel poll devices Synopsis class=FUNCSYNOPSISINFO#include Description PPoll() is similar to the 'traditional' API function ibrpp(). It causes the interface board to perform a parallel poll, and stores the parallel poll byte in the location specified by result. Bits 0 to 7 of the parallel poll byte correspond to the dio lines 1 to 8, with a 1 indicating the corresponding dio line is asserted. The devices on the bus you wish to poll should be configured beforehand with PPollConfig(). The board must be controller-in-charge to perform a parallel poll. PPollConfig Name PPollConfig -- configure a device's parallel poll response Synopsis class=FUNCSYNOPSISINFO#include void PPollConfig(int board_desc, Addr4882_t address, int dio_line, int line_sense); Description PPollConfig() configures the device specified by address to respond to parallel polls. The dio_line (valid values are 1 through 8) specifies which dio line the device being configured should use to send back its parallel poll response. The line_sense argument specifies the polarity of the response. If line_sense is nonzero, then the specified dio line will be asserted to indicate that the 'individual status bit' (or 'ist') is 1. If sense is zero, then the specified dio line will be asserted when ist is zero. RcvRespMsg Name RcvRespMsg -- read data Synopsis class=FUNCSYNOPSISINFO#include void RcvRespMsg(int board_desc, void *buffer, long count, int termination); Description RcvRespMsg() reads data from the bus. A device must have already been addressed as talker (and the board as listener) before calling this function. Addressing may be accomplished with the ReceiveSetup() function. Up to count bytes are read into the array specified by buffer. The termination argument specifies the 8-bit end-of-string character (which must be a value from 0 to 255) whose reception will terminate a read. termination can also be set to the 'STOPend' constant, in which case no end-of-string character will be used. Assertion of the EOI line will always end a read. You may find it simpler to use the slightly higher level function Receive(), since it does not require addressing and reading of data to be performed separately. ReadStatusByte Name ReadStatusByte -- serial poll a device Synopsis class=FUNCSYNOPSISINFO#include void ReadStatusByte(int board_desc, Addr4882_t address, short *result); Description ReadStatusByte() causes the board specified by the board descriptor board_desc to serial poll the GPIB address specified by address. The status byte is stored at the location specified by the result pointer. If you wish to serial poll multiple devices, it may be slightly more efficient to use AllSPoll(). Serial polls may also be conducted with the 'traditional API' function ibrsp(). ReceiveSetup Name ReceiveSetup -- perform receive addressing Synopsis class=FUNCSYNOPSISINFO#include Description ReceiveSetup() addresses the device specified by address as talker, and addresses the interface board as listener. A subsequent RcvRespMsg() call will read data from the device. You may find it simpler to use the slightly higher level function Receive(), since it does not require addressing and reading of data to be performed separately. ResetSys Name ResetSys -- reset system Synopsis class=FUNCSYNOPSISINFO#include void ResetSys(int board_desc, const Addr4882_t addressList[]); Description ResetSys() has the following effects: The remote enable bus line is asserted. An interface clear is performed (the interface clear bus line is asserted for at least 100 microseconds). The device clear command is sent to all the devices on the bus. The *RST message is sent to every device specified in the addressList. Send Name Send -- perform send addressing and write data Synopsis class=FUNCSYNOPSISINFO#include void Send(int board_desc, Addr4882_t address, const void *data, long count, int eot_mode); Description Send() addresses the device specified by address as listener, then writes data onto the bus. It is equivalent to a SendList() except it only uses a single GPIB address to specify the listener instead of allowing an array of listeners. SendCmds Name SendCmds -- write command bytes onto bus Synopsis class=FUNCSYNOPSISINFO#include void SendCmds(int board_desc, const void *cmds, long count); Description SendCmds() writes count command byte onto the the GPIB bus from the array cmds. It is generally not necessary to call SendCmds(). It is provided for advanced users who want direct, low-level access to the GPIB bus SendDataBytes Name SendDataBytes -- write data Synopsis class=FUNCSYNOPSISINFO#include void SendDataBytes(int board_desc, const void *data, long count, int eot_mode); Description SendDataBytes() writes data to the bus. One or more devices must have already been addressed as listener (and the board as talker) before calling this function. Addressing may be accomplished with the SendSetup() function. count bytes are written from the array specified by data. The eot_mode argument specifies how the message should be terminated, and may be any of the following values: Table 1. eot modes constant NULLend value 0 description Do not assert EOI or add a newline at the end of the write. Assert EOI with the last byte of the write. Append a newline, and assert EOI with the newline at the end of the write. DABend NLend 1 2 You may find it simpler to use the slightly higher level functions Send() or SendList(), since they does not require addressing and writing of data to be performed separately. SendIFC Name SendIFC -- perform interface clear Synopsis class=FUNCSYNOPSISINFO#include Description SendIFC() resets the GPIB bus by asserting the 'interface clear' (IFC) bus line for a duration of at least 100 microseconds. The board specified by board_desc must be the system controller in order to assert IFC. The interface clear causes all devices to untalk and unlisten, puts them into serial poll disabled state (don't worry, you will still be able to conduct serial polls), and the board becomes controller-in-charge. SendLLO Name SendLLO -- put devices into local lockout mode Synopsis class=FUNCSYNOPSISINFO#include Description SendLLO() asserts the 'remote enable' bus line, then sends the LLO command byte. Any devices currently addressed as listener will be put into RWLS (remote with lockout state), and all other devices will enter LWLS (local with lockout state). Local lockout means the remote/local mode of devices cannot be changed though the devices' front-panel controls. Unasserting the REN line should bring the devices out of lockout state. The SetRWLS() performs a similar function, except it lets you specifiy which devices you wish to address as listener before sending the LLO command SendSetup Name SendSetup -- perform send addressing Synopsis class=FUNCSYNOPSISINFO#include void SendSetup(int board_desc, const Addr4882_t addressList[]); Description SendSetup() addresses the devices in addressList as listeners, and addresses the interface board as talker. A subsequent SendDataBytes() call will write data to the devices. You may find it simpler to use the slightly higher level functions Send() or SendList(), since they does not require addressing and writing of data to be performed separately. SetRWLS Name SetRWLS -- put devices into remote with lockout state Synopsis class=FUNCSYNOPSISINFO#include void SetRWLS(int board_desc, const Addr4882_t addressList[]); Description SetRWLS() asserts the 'remote enable' bus line, addresses the devices in the addressList array as listeners, then sends the LLO command byte. The devices addressed as listener will be put into RWLS (remote with lockout state), and all other devices will enter LWLS (local with lockout state). Local lockout means the remote/local mode of devices cannot be changed though the devices' front-panel controls. Unasserting the REN line should bring the devices out of the lockout state. TestSRQ Name TestSRQ -- query state of SRQ bus line Synopsis class=FUNCSYNOPSISINFO#include void TestSRQ(int board_desc, short *result); Description TestSRQ() checks the state of the SRQ bus line and writes its state to the location specified by result. A '1' indicates the SRQ line is asserted, and a '0' indicates the line is not asserted. Some boards lack the capability to report the status of the SRQ line. In such a case, an ECAP error is returned in iberr. TestSys Name TestSys -- perform self-test queries on devices Synopsis class=FUNCSYNOPSISINFO#include void TestSys(int board_desc, const Addr4882_t addressList[], short results[]); Description TestSys() sends the '*TST?' message to all the devices in the addressList array, then reads their responses into the results array. This will cause devices that conform to the IEEE 488.2 standard to perform a self-test and respond with a zero on success. A non-zero response indicates an error during the self-test. The number of devices which responded with nonzero values from their self-tests is returned in ibcnt and ibcntl. If a device fails to respond to the *TST? query, an error will be flagged in ibsta (this is different than NI's documented behaviour which is broken). Trigger Name Trigger -- trigger a device Synopsis class=FUNCSYNOPSISINFO#include Description Trigger() is equivalent to a TriggerList() call with a single address. TriggerList Name Trigger -- trigger multiple devices Synopsis class=FUNCSYNOPSISINFO#include Description TriggerList() sends a GET (group execute trigger) command byte to all the devices specified in the addressList array. If no addresses are specified in addressList then the GET command byte is sent without performing any addressing. WaitSRQ Name WaitSRQ -- sleep until the SRQ bus line is asserted Synopsis class=FUNCSYNOPSISINFO#include Description WaitSRQ() sleeps until either the SRQ bus line is asserted, or a timeout (see ibtmo()) occurs. A '1' will be written to the location specified by result if SRQ was asserted, and a '0' will be written if the function timed out. GetPAD Name GetPAD -- extract primary address from an Addr4882_t value Synopsis class=FUNCSYNOPSISINFO#include static __inline__ unsigned int GetPAD(Addr4882_t address); Description GetPAD() extracts the primary address packed into the Addr4882_t value address. Return value The primary GPIB address (from 0 through 30) stored in address. GetSAD Name GetSAD -- extract secondary address from an Addr4882_t value Synopsis class=FUNCSYNOPSISINFO#include static __inline__ unsigned int GetSAD(Addr4882_t address); Description GetSAD() extracts the secondary address packed into the Addr4882_t value address. Return value The secondary GPIB address (from 0x60 through 0x7e, or 0 for none) stored in address. MakeAddr Name MakeAddr -- pack primary and secondary address into an Addr4882_t value Synopsis class=FUNCSYNOPSISINFO#include static __inline__ Addr4882_t MakeAddr(unsigned int pad, unsigned int sad); Description MakeAddr() generates an Addr4882_t value that corresponds to the specified primary address pad and secondary address sad. It does so by putting pad into the least significant byte and left shifting sad up to the next byte. Examples class=PROGRAMLISTINGAddr4882_t addressList[ 5 ]; addressList[ 0 ] = 5 /* primary address 5, no secondary address */ addressList[ 1 ] = MakeAddr(3, 0); /* primary address 3, no secondary address */ addressList[ 2 ] = MakeAddr(7, 0x70); /* primary address 3, secondary address 16 */ addressList[ 3 ] = MakeAddr(20, MSA(9)); /* primary address 20, secondary address 9 */ addressList[ 4 ] = NOADDR; Return value An Addr4882_t value corresponding to the specified primary and secondary GPIB address MLA Name MLA -- generate 'my listen address' command byte Synopsis class=FUNCSYNOPSISINFO#include Description MLA() returns a 'my listen address' command byte corresponding to the address argument. The address my be between 0 and 30. Return value The appropriate MLA command byte is returned. MSA Name MSA -- generate 'my secondary address' command byte Synopsis class=FUNCSYNOPSISINFO#include Description MSA() returns a 'my secondary address' command byte corresponding to the address argument. The address my be between 0 and 30. This macro is also useful for mangling secondary addresses from the 'real' values between 0 and 30 to the range 0x60 to 0x7e used by most of the library's functions. Return value The appropriate MSA command byte is returned MTA Name MTA -- generate 'my talk address' command byte Synopsis class=FUNCSYNOPSISINFO#include Description MTA() returns a 'my talk address' command byte corresponding to the address argument. The address my be between 0 and 30. Return value The appropriate MTA command byte is returned PPE_byte Name PPE_byte -- generate 'parallel poll enable' command byte Synopsis class=FUNCSYNOPSISINFO#include Description PPE_byte() returns a 'parallel poll enable' command byte corresponding to the dio_line and sense arguments. The dio_line (valid values are 1 through 8) specifies which dio line the device being configured should use to send back its parallel poll response. The sense argument specifies the polarity of the response. If sense is nonzero, then the specified dio line will be asserted to indicate that the 'individual status bit' (or 'ist') is 1. If sense is zero, then the specified dio line will be asserted when ist is zero. Return value The appropriate PPE command byte is returned ThreadIbcnt and ThreadIbcntl Name ThreadIbcnt and ThreadIbcntl -- thread-specific ibcnt and ibcntl values Synopsis class=FUNCSYNOPSISINFO#include Description ThreadIbcnt() and ThreadIbcntl() return thread-local versions of the global variables ibcnt and ibcntl. Return value The value of ibcnt or ibcntl corresponding to the last 'traditional' or 'multidevice' function called in the current thread is returned ThreadIberr Name ThreadIberr -- thread-specific iberr value Synopsis class=FUNCSYNOPSISINFO#include Description ThreadIberr() returns a thread-local version of the global variable iberr. Return value The value of iberr corresponding to the last 'traditional' or 'multidevice' function called by the current thread is returned. ThreadIbsta Name ThreadIbsta -- thread-specific ibsta value Synopsis class=FUNCSYNOPSISINFO#include Description ThreadIbsta() returns a thread-local version of the global variable ibsta. Return value The value of ibsta corresponding to the last 'traditional' or 'multidevice' function called by the current thread is returned. 因篇幅问题不能全部显示,请点此查看更多更全内容