ISIS Logo
VISAdrv
ASYN driver for National Instruments VISA
Public Attributes | List of all members
visaDriver_t Struct Reference

driver private data structure More...

Public Attributes

asynUser * pasynUser
 
char * portName
 asyn port name More...
 
ViSession defaultRM
 
ViSession vi
 VISA session handle. More...
 
bool connected
 are we currently connected More...
 
char * resourceName
 VISA resource name session connected to. More...
 
unsigned long nReadBytes
 number of bytes read from this resource name More...
 
unsigned long nWriteBytes
 number of bytes written to this resource More...
 
unsigned long nReadCalls
 number of read calls from this resource name More...
 
unsigned long nWriteCalls
 number of written calls to this resource More...
 
double timeout
 requested timeout for current operation More...
 
bool isSerial
 are we an RS232 style serial device? More...
 
bool isGPIB
 are we a GPIB device? More...
 
bool deviceSendsEOM
 Indicates that the device signals an "end of message". More...
 
int readIntTimeout
 internal read timeout (ms) used instead of a zero timeout immediate read. More...
 
ViUInt8 termCharIn
 read termination character, this is purely to improve read efficiency and is independent of any characters specified at the asyn or stream device later. More...
 
bool flush_on_write
 use viFlush to flush output buffer every write More...
 
asynInterface common
 
asynInterface option
 
asynInterface octet
 

Detailed Description

driver private data structure

Definition at line 36 of file drvAsynVISAPort.cpp.

Member Data Documentation

asynInterface visaDriver_t::common

Definition at line 54 of file drvAsynVISAPort.cpp.

Referenced by drvAsynVISAPortConfigure().

bool visaDriver_t::connected

are we currently connected

Definition at line 41 of file drvAsynVISAPort.cpp.

Referenced by asynCommonReport(), closeConnection(), connectIt(), drvAsynVISAPortConfigure(), flushIt(), getOption(), readIt(), setOption(), and writeIt().

ViSession visaDriver_t::defaultRM

Definition at line 39 of file drvAsynVISAPort.cpp.

Referenced by connectIt(), drvAsynVISAPortConfigure(), and visaCleanup().

bool visaDriver_t::deviceSendsEOM

Indicates that the device signals an "end of message".

If this is true, then the driver can assume that a VI_SUCCESS call translate to ASYN_EOM_END and this will stop a further call from Stream device if there are no termination characters to otherwise know all output has been received. GPIB devices usually signal END, RS232 serial devices do not and you need to look for a termination character instead etc.

Definition at line 50 of file drvAsynVISAPort.cpp.

Referenced by asynCommonReport(), drvAsynVISAPortConfigure(), and readIt().

bool visaDriver_t::flush_on_write

use viFlush to flush output buffer every write

Definition at line 53 of file drvAsynVISAPort.cpp.

Referenced by drvAsynVISAPortConfigure(), setOption(), and writeIt().

bool visaDriver_t::isGPIB

are we a GPIB device?

Definition at line 49 of file drvAsynVISAPort.cpp.

Referenced by asynCommonReport(), connectIt(), and drvAsynVISAPortConfigure().

bool visaDriver_t::isSerial

are we an RS232 style serial device?

Definition at line 48 of file drvAsynVISAPort.cpp.

Referenced by asynCommonReport(), connectIt(), drvAsynVISAPortConfigure(), getOption(), and setOption().

unsigned long visaDriver_t::nReadBytes

number of bytes read from this resource name

Definition at line 43 of file drvAsynVISAPort.cpp.

Referenced by asynCommonReport(), and readIt().

unsigned long visaDriver_t::nReadCalls

number of read calls from this resource name

Definition at line 45 of file drvAsynVISAPort.cpp.

Referenced by asynCommonReport(), and readIt().

unsigned long visaDriver_t::nWriteBytes

number of bytes written to this resource

Definition at line 44 of file drvAsynVISAPort.cpp.

Referenced by asynCommonReport(), and writeIt().

unsigned long visaDriver_t::nWriteCalls

number of written calls to this resource

Definition at line 46 of file drvAsynVISAPort.cpp.

Referenced by asynCommonReport(), and writeIt().

asynInterface visaDriver_t::octet

Definition at line 56 of file drvAsynVISAPort.cpp.

Referenced by drvAsynVISAPortConfigure().

asynInterface visaDriver_t::option

Definition at line 55 of file drvAsynVISAPort.cpp.

Referenced by drvAsynVISAPortConfigure().

asynUser* visaDriver_t::pasynUser

Definition at line 37 of file drvAsynVISAPort.cpp.

Referenced by drvAsynVISAPortConfigure(), getOption(), setOption(), and visaCleanup().

char* visaDriver_t::portName

asyn port name

Definition at line 38 of file drvAsynVISAPort.cpp.

Referenced by driverCleanup(), drvAsynVISAPortConfigure(), getOption(), setOption(), and visaCleanup().

int visaDriver_t::readIntTimeout

internal read timeout (ms) used instead of a zero timeout immediate read.

Stream device will use such a timeout to flush the input buffer prior to a write, also the driver may use it internally to check for bytes. If you get problems with 0 as this value, try either a small positive number, or if you set it to a negative number then any read call with zero timeout will be replaced with a viFlush() call to clear the input buffer. Such an assumption is valid for stream device, not necessarily for other drivers. Note that for GPIB/ENET we found that such zero timeout reads of no data took much longer than normal reads, hence the option to skip them via a negative timeout.

Definition at line 51 of file drvAsynVISAPort.cpp.

Referenced by asynCommonReport(), drvAsynVISAPortConfigure(), and readIt().

char* visaDriver_t::resourceName

VISA resource name session connected to.

Definition at line 42 of file drvAsynVISAPort.cpp.

Referenced by asynCommonReport(), closeConnection(), connectIt(), driverCleanup(), drvAsynVISAPortConfigure(), flushIt(), getOption(), readIt(), setOption(), and writeIt().

ViUInt8 visaDriver_t::termCharIn

read termination character, this is purely to improve read efficiency and is independent of any characters specified at the asyn or stream device later.

It allows a read to terminate early without waiting for a timeout, if the calling layer is stream device then it will still decide whether it has all the correct characters or not.

Definition at line 52 of file drvAsynVISAPort.cpp.

Referenced by asynCommonReport(), connectIt(), and drvAsynVISAPortConfigure().

double visaDriver_t::timeout

requested timeout for current operation

Definition at line 47 of file drvAsynVISAPort.cpp.

Referenced by drvAsynVISAPortConfigure(), readIt(), and writeIt().

ViSession visaDriver_t::vi

VISA session handle.

Definition at line 40 of file drvAsynVISAPort.cpp.

Referenced by closeConnection(), connectIt(), getOption(), readIt(), setOption(), and writeIt().


The documentation for this struct was generated from the following file:
Copyright © 2013 Science and Technology Facilities Council | Generated by   doxygen 1.8.5