asynDriver: Asynchronous Driver Support - Release Notes

April 14, 2006

Release 4-5


memMalloc was allocating the amount of memory the caller requested rather than the amount required for the freeList. If memFree was called and the memory reallocated to a user requesting a larger size, memory corruption occured. This is fixed.

SyncIO routines

If the connect call fails the asynUser is no longer freed. Instead a message is put into asynUser.errorMessage. The caller must call disconnect in order to free the storage for the asynUser.

The SyncIO routines no longer call asynPrint if there is an error and there is a valid asynUser available. Rather they return an error message in pasynUser->errorMessage. The SyncIO*Once functions still call asynPrint for errors, because they do not have a way of returning an error message.

Serial, TCP/UDP/IP

Handle 0-length write requests.


Added drvAsynIPServerPort to support TCP and UDP socket servers.

Added iocBoot/testIPServer to test TCP server support.

drvAsynIPPort now closes TCP sockets when remote system closes connection.

drvAsynIPPort connect function now uses pasynUser->reason as a file descriptor if it is > 0. This allows drvAsynIPServerPort to re-use asyn ports it creates.

Made drvAsynIPPort add null byte at end of input if there is room.

Made drvAsynIPPort:readRaw set eomReason to 0. It was not setting eomReason at all previously.


Made drvAsynSerialPort add null byte at end of input if there is room.

Made drvAsynSerialPort:readRaw set eomReason to 0. It was not setting eomReason at all previously.


Added asynCommonSyncIO for synchronous support of the asynCommon interface.


Add delay loops to get these boards to work with faster VME CPU modules.

Release 4-4


Better support was provided for VXI-11.3 controllers, i.e. talking directly to an ethernet port on an instrument. In particular a TDS3054B was tested.

WARNING: The VXI-11.1 ansd VXI-11.3 standards do NOT allow access to GPIB lines, i.e. conmmands like Untalk/Unlisten are not possible. The previous support issued these commands after each read or write. Some really old GPIB devices may fail. If so the device specific code must be modified to sent these commands separately.


Changes were made to allow asyn to build on native Windows (win32-x86) architecture.

There are two asyn components that do not yet work on win32-x86.

  1. Local serial ports. The asyn uses the "termios" API for serial ports, and termios is not available for native Windows.
  2. VXI-11. The asyn VXI-11 support uses the Sun XDR API, which is not available for native Windows.

Users who want to use local serial ports or VXI-11 on Windows can use the Cygwin EPICS build (cygwin-x86).

devGpib: devGpibConvertExample

An example of how to implement convert routines for devGpib support modules is available in asyn/devGpib/devGpibConvertExample.c


The UDF field is now set FALSE when the VAL field is updated.

Release 4-3



The cancelInterruptUser methods of all interfaces has been changed from

    asynStatus (*cancelInterruptUser)(void *registrarPvt, asynUser *pasynUser);
    asynStatus (*cancelInterruptUser)(void *drvPvt, asynUser *pasynUser,
                                      void *registrarPvt);


The length and size arguments now have type size_t.


Several improvements were made to devSupportGpib.c. All changes should be transparent to code that uses devGpib.


The maxchars argument to callInterruptUsers has been removed.


The filename argument has been removed.


For asynAoFloat64 it now uses oval instead of val.

asynFloat64Array, asynInt32Array, asynOctet, asynOctetSyncIO

All length and size arguments now have type size_t.

asynFloat64SyncIO, asynInt32SyncIO, asynOctetSyncIO, and asynUInt32DigitalSyncIO

These all use lockPort/unlockPort instead of queueRequest.

Release 4-2-1


Device support was not returning 2 (do not convert) for ai records when it should. This meant that the VAL field was being set back to 0 by the record after device support wrote to it. This bug is fixed.


The record sometimes did not read the current input and output EOS values from the driver when it connected. This bug is fixed.

Release 4-2


Yevgeny A. Gusev has again reported some hard to recognize bugs. He must have spent many hours looking at the code. His extra set of very good eyes are much appreciated!!. He also thought of the way to handle support that uses one addressing scheme but wants to use support that has a different addressing scheme. For example support for mult-drop serial that wants to use the standard serial support

Release 4-2


If read reads maxchars, it forced the last character to be 0 and returned asynOverflow if it wasn't. This is fixed.

drvAsynSerialPort,drvAsynIPPort - Error reporting

These did not properly set an error message in asynUser.errorMessage when they returned asynError. This is fixed.

drvAsynSerialPort - serial port options

Changes were made to the way serial port options are handled.

asynRecord - Serial Port Options

This has a new option to set Modem Control.

Release 4-1

The only code change was to fix the drvAsynIPPort and drvAsynSerialPort segmentation faults on cygwin-x86.

Release 4-0

Incompatible Changes.

APOLOGY: Many interfaces have changed since release 3-3. This is the reason this release is called 4-0.

New Features

Release 3-3

Incompatible Changes.

Major New Features


The following changes have been made


Removed the GOPT field. This is no longer necessary because the port options are automatically read whenever connecting to a port. "special" requests are now queued without changing the state of the record, using the new duplicateAsynUser, memMalloc(), and memFree() methods. This means that there is no longer a possibility of a special request being rejected because the record is busy. It is no longer possible to cancel a special request.




Flushes input only.


The EOS read method now calls the low-level read method only once and returns as many characters as the low-level method supplies. This makes the EOS read semantics match those of the low-level serial and IP drivers.


vxi11SetRpcTimeout - now handles fractions of a second properly


A new field has beem added, AQR (Abort Queue Request)

The semantics have been changed as follows: process is responsible for all and only for I/O operations. Only I/O operations cause the alarm status and severity to change. Special is responsible for all other operations performed by asynRecord.

Release 3-2

Changed and obsolete features

Major New Features

Release 3-1

Major New Features

Changed and obsolete features

Release 2-1

Major New Features

Changed and obsolete features

Release 1-2

Release 1-1

This release includes support for the following:

Modifications include:

  1. Added asynSetPortOption and asynGetPortOption to manipulate port options.
  2. Changed serial support to use asynSetPortOption/asynGetPortOption.
  3. Added devGPIB GPIBCVTIO commmand type to allow custom conversion routine to perform all I/O operations.
  4. Changed rules for return value from devGPIB custom conversion routines.
  5. Added dbior support.
  6. Changed devGPIB to no longer cache EOS.

Release 1-0alpha2

Support Provided in addition to asynDriver and asynGpib

Future Support


The vxi11 support has been tested on the following platforms: Solaris, Linux (redhat 9), Darwin, Windows XP (Cygwin), and vxWorks. It has been tested with the following vxi11 controllers:

The generic serial support has been tested with the following:

Two Device Support modules have been converted from the 3.13 gpib support: DG535 and TDS3014B Scope.