asynDriver: Asynchronous Driver Support - Release Notes

Release 4-20

August 30, 2012


Fixed a bug that caused a deadlock if pasynManager->lockPort was called multiple times without calling pasynManager->unlockPort in between. Thanks to Sebastian Marsching from "aquenos GmbH" for this fix.


Added support for setting the record timestamp from the driver, using a new field, pasynUser->timeStamp. The driver can set this field in read and callback operations.

Fixed a long-standing bug in devAsynXXXArray support for input waveform records with SCAN=I/O Intr. The data were being copied to the record without using dbScanLock. This meant that the data could change while the record was processing.

Changed the "ring buffer overflow" messages from "ASYN_TRACE_ERROR" to "ASYN_TRACEIO_DEVICE", so they do not appear by default. These messages are not really errors, but warnings that record processing it not keeping up with the rate of driver callbacks for records with SCAN=I/O Intr.


Fixed a bug when adding a parameter that already existed. Thanks to Hinko Kocevar for fixing this.


Added new document "HowToDoSerial_StreamDevice.html".

Test programs

Added new test program, testConnectApp. It uses asynPortDriver, and has a polling thread that sends a user-defined string to a device and reads the response. It can be used to test the behavior when the device is disconnected and then reconnects, etc.

Build system

Added a rule in asyn/Makefile to fix a problem that could cause parallel make to fail.

Release 4-19

May 21, 2012


Added a new interface, asynEnum. This interface is designed to allow drivers to set the strings, values, and severities for record enum fields. This can be done both at iocInit(), in init_record() with the pasynEnumSyncIO->read() function, and after iocInit via callbacks to device support.


Added support for the new asynEnum interface for bo, bi, mbbo, and mbbi records in the asynInt32 and asynUInt32Digital device support. These records now attempt to read the initial values of the strings, values (mbbo and mbbi only) and severities for the enum fields. They also support callbacks on the asynEnum interface, so that enum values can be set dynamically at run-time.

Improved the support for setting the alarm status of records. Previously for records that were not I/O Intr scanned STAT was always to READ_ALARM or WRITE_ALARM, and SEVR was set to INVALID_ALARM. A new function, pasynEpicsUtils->asynStatusToEpicsAlarm() was added that converts asynStatus values to EPICS alarm values. This allows records to have STAT=TIMEOUT_ALARM, DISABLE_ALARM, etc. More values of STAT can be supported in the future by adding more values to the asynStatus enum.

Previously it was not possible for input records with SCAN=I/O Intr to have their alarm status set at all. This support has been added. Device support now uses the pasynUser->auxStatus field in the pasynUser passed to the callback function. If auxStatus != asynSuccess then the record alarm STAT and SEVR are set to values based on the asynStatus. asyn port drivers can now signal error status to clients in callback functions by setting pasynUser->auxStatus to asynSuccess, asynTimeout, asynError, etc. This change should be backwards compatible with all drivers because the pasynUser that is used for the callbacks is private to the callback function, and the auxStatus field is initialized to 0, which is asynSuccess.

Added new waveform record device support, asynInt32TimeSeries and asynFloat64TimeSeries. These use callbacks from the driver on those respective interfaces to collect a time series of values in a waveform record. Added new medm file asynTimeSeries.adl for this, and added an example waveform record to testEpics/Db/devInt32.db.


Fixed bugs that caused crashes if SCAN=I/O Intr was set at iocInit.

asynDriver and asynShellCommands

Added support for I/O redirection to the "dbior" and "asynPrint" commands.


Added support for the new asynEnum interface described above.

Added support in asynPortDriver for passing status information to clients in callbacks. Each parameter in the parameter library now has an associated asynStatus variable. New functions setParamStatus() and getParamStatus() are provided to access this variable. For example, if setParamStatus(paramIndex, asynError) is called then callParamCallbacks() will cause any input records with SCAN=I/O Intr to go into alarm state.

Moved asynPortDriver from the miscellaneous directory to its own directory. Improved the internals, but did not change the API. Thanks to John Hammonds for this.


Added a new test application, testErrorsApp. This application uses a driver based on asynPortDriver to test error handling for all interfaces and all records support by the asyn standard device support (asyn/devEpics). It can be used to test error handling of records with both periodic scanning and I/O Intr scanning. It also tests the new asynEnum interface for setting enum strings, values, and severities at iocInit.

Removed the newline terminator from all messages in pasynUser->errorMessage. This formatting does not belong in the error message. Thanks to Lewis Muir for this.

drvAsynIPServerPort. Added call to epicsSocketEnableAddressReuseDuringTimeWaitState which fixes problems when the IOC is restarted and the port is still in TIME_WAIT state. Thanks to Lewis Muir for this.

Release 4-18

November 2, 2011


Changes to avoid compiler warnings on 64-bit Darwin.

Changes to avoid compiler warnings and errors on older Solaris compiler.

Changed non-standard __VAR_ARGS__ to __VA_ARGS__ in asynPrint macro.

Added titles to EDM screens.

Added CSS BOY screens.

Fixed build problem. It was rebuilding the VXI11 code with rpcgen each time make was run, even if nothing had changed.


Cleaned up logic for callbacks on asynUInt32Digital interface. It was not doing callbacks if the value had not changed but an interrupt had occured for bits in the mask. This would happen when interrupts were only enabled on the falling or rising edges but not both. Added an additional form of setUIntDigitalParam that takes an interruptMask argument. In the previous releases drivers were calling setUInt32Interrupt for callbacks which is not correct. That function should only be called by device support to tell the driver which interrupts to recognize. These problems made the quadEM not work correctly with the ipUnidig.


Bug fix on WIN32. It was waiting forever when timeout=0 when it should return whatever characters are available without waiting at all.

Release 4-17

August 3, 2011


Fixed asynRecord.dbd to include promptgroup for fields that need it. Removed the SOCK field and asynSocketSetup.adl; the record no longer supports creating sockets, which can easily be done with the iocsh drvAsynIPPortConfigure command.

Added IXON, IXOFF, and IXANY fields for new XON/XOFF support on serial ports. These fields were added to the asynSerialPortSetup.adl medm screen.


For waveform output records the device support was always writing NELM elements, rather than NORD elements.


Added missing include file, which caused asyn not to build on EPICS base versions before 3.14.10.


Removed unneeded declarations of 'register int32_t *buf' from many functions. Removed register keyword from remaining instances, because address was being taken, which is illegal in C, and was causing errors on vxWorks Pentium cross-compiler.


Added a global function, findAsynPortDriver(const char *portName), that returns a pointer to an asynPortDriver object given the asyn port name.

Added 3 new asynPortDriver methods: setUInt32DigitalInterrupt, clearUInt32Interrupt, getUInt32Interrupt. These were needed to complete the asynUInt32Digital support.


The asynOctetSetInputEos, asynOctetSetOutputEos, asynOctetShowInputEos and asynOctetShowOutputEos commands now take effect even if the port is not connected. This makes startup scripts more robust in the face of devices that are not accessible at IOC startup. Removed the unused "drvInfo" parameter from each of these functions.


Host name lookup is now deferred until port connection time. This makes startup scripts robust in the face of a device that is offline at IOC startup and has been offline for so long that it's DNS entry has been deleted.

Prevent reconnects during IOC shutdown. The IP Port exithandler runs before record scanning stops. In that interval, if a record is scanned then it will trigger a reconnect, and new connection can be shutdown without sending data, or without waiting for a reply. Some embedded TCP/IP stacks have problems dealing with this. Thanks to Michael Davidsaver for this fix.


Added support for local serial ports on Windows, i.e.win32-x86 and windows-x64 architectures. Previously Windows local serial ports were only supported on the cygwin-x86 architecture.

Added support for serial line software handshake flags (ixon/ixoff/xany) on most architectures (e.g. Linux, Cygwin, Darwin, WIN32; see: man stty) and vxWorks (ixon only). Thanks to Dirk Zimoch for this.


Changed asyn/Makefile to fix build dependencies for rpcgen of vxi11. Thanks to Michael Davidsaver for this fix.

Release 4-16

January 17, 2011


Support has been added for terminal servers which support the TELNET RFC 2217`protocol. To communicate with such devices specify "COM" as the protocol in the drvAsynIPPortConfigure command. This allows port parameters (speed, parity, etc.) to be set using an asynRecord or asynSetOption commands just as for local serial ports.


Fix from Benjamin Franksen to fix problem with reconnection.

The 'timeout' argument to vxi11Configure has been changed from double to string. This allows vxi11Configure to be called directly from the vxWorks shell.

Release 4-15

December 8, 2010


The third argument to the vxi11Configure command is now a bit-map. The least significant bit (value 0x1) remains the 'recover with IFC' control. The next-to-least significant bit (value 0x2) when set will cause all devices to be locked when a connection is made. This allows for cooperative exclusive access to devices.


Fixed memory leak in lockPort() when an error occured, was not calling freeAsynUser(). Thanks to Andrew Starritt for finding this.


Bug fix for devAsynInt32 and devAsynFloat64: it was not freeing the mutex in processAiAverage if numAverage==0, i.e. there had been no callbacks from the driver since the record last processed. This would hang the next thread that tried to take the mutex, typically the driver callback thread.

Bug fix for devAsynXXXArray: it was calling drvUserCreate in the port driver even if there was no userParam in the link, which could crash the driver.

Many files

Changes to allow building dynamically on WIN32 (i.e. making DLLs).


Changes to allow building on Cygwin 1.7.x or 1.5.x; replaced rpc with $(CYGWIN_RPC_LIB), which allows it to link with rpc on 1.5.x and tirpc on 1.7.x. You need to add one of the following 2 lines to base/configure/os/CONFIG_SITE.cygwin-x86.cygwin-x86

    For Cygwin 1.7.x:
    CYGWIN_RPC_LIB = tirpc

    For Cygwin 1.5.x
    CYGWIN_RPC_LIB = rpc

Release 4-14

July 29, 2010


Fixed bugs in connection management. Releases 4-11 through 4-13 had the following problems:

These problems were fixed by doing the following:

Fixed problems with the SyncIO calls, which were caused by the implementation of pasynManager->lockPort():


Fixed a bug in driver initialization. The driver had not completed all required initialization before it called pasynGpib->registerPort. Because pasynGpib->registerPort registers the asynCommon interface, that now normally triggers an immediate callback to vxiConnect, and the driver was not yet properly initialized to handle that callback.

Added an additional example driver, asynPortTest, that uses asynPortDriver. It implements the asynInt32, asynFloat64, and asynOctet interfaces to communicate with the echo server using asynOctetSyncIO calls. This tests nested SyncIO calls. Added a new startup script, database and medm screen for testing this new driver.


Added a call to asynOctet->flush() just before the call to asynOctet->write() operation when doing write/read operations. This eliminates any stale input that may have already been sent by the device and would otherwise be incorrectly returned by the read operation.


Now behaves properly even when eomReason is NULL.


Changed ipEchoServer2.c to eliminate the epicsThreadSleep(0.01) in the listener thread. This sleep is no longer necessary because of the change to lockPort described above, so the example program was changed to test and demonstrate this.

Release 4-13-1

May 20, 2010


Fixed bug in getXXXParam. It was not returning error status when a parameter was undefined. This caused device support to use undefined values for output records, because the initial read from the driver during device support initialization did not return an error it should have.

Release 4-13

April 1, 2010


Change some dependencies to fix parallel (-j) make problem.


A return of 0 from a read of a TCP stream is treated as an END condition rather than as an error. This makes it easier to handle devices that close the connection at the end of a reply.

Support has been added for devices such as web servers that require a connect at the beginning of each transaction. To enable this behaviour, specify "http" as the protocol in the drvAsynIPPortConfigure command and ensure that each transaction ends with a read that detects the broken connection from the device. Note that the device will always appear connected. The connect/disconnect around each transaction is handled within the drvAsynIPPort driver.


Corrected the documentation to state that only the TCP/IP protocol is supported, not UDP.


Fix problem with NULL-pointer dereferences.


Bug fix from Benjamin Franksen for devices that don't support IRQ.


The ring buffer code in devAsynFloat64.c, devAsynInt32.c and devAsynUInt32Digital.c has been improved. Previously when ring buffer overflow occurred during a callback the new value was simply discarded. This meant that when the record processed at the end of a rapid burst of callbacks it would not contain the most recent value. Now when overflow occurs the oldest value is removed from from the ring buffer and the new value is added, so that the record will contain the most recent callback value after a burst.

asynUInt32Digital: asynMask values implying shifts greater than 16 bits are now supported.


Fixed bug which caused an error when writing or reading in binary format if the driver did not implement the get(Input/Output)Eos functions. This bug was introduced when readRaw and writeRaw were removed from asynOctet in release 4-10.

Additional template -t streamSCPI <name> creates skeleton stream protocol and database files for a SCPI (IEEE-488.2) device.


Fixed bug in readInt32Array, not taking lock where needed.

Added drvInfo strings to parameter lists, and new methods to support this: createParam(), findParam(), getParamName(). The report functions now print out the drvInfo strings, which is very useful. The base class drvUserCreate() method can now be used without reimplementing in derived classes, because the parameter names are now available to the base class. Removed asynParamString_T and drvUserCreateParam(), which are no longer needed. The testAsynPortDriver test application has been updated to use these new features.

Release 4-12

August 19, 2009


A problem was introduced in R4-11 by not starting the autoconnect process until iocInit(), and operations that do not use the XXXSyncIO functions thus fail before iocInit(). This means, for example, that calls to asynSetOption() to set serial port parameters fail if done in a startup script before iocInit(). R4-12 fixes this problem by decoupling autoconnect operations from iocInit(). NOTE: The first call to the pasynCommon->connect() function now happens almost immediately after pasynManager->registerInterface() is called for the asynCommon interface. This timing is different from all previous asyn releases, and it means that port drivers must initialize everything required by asynCommon->connect() before they register the asynCommon interface. This may require minor re-ordering of the initialization sequence in some drivers.


Requests to set end-of-string values or serial port parameters are accepted even when the port is not connected. The request takes effect when the port is connected. This makes IOC startup more robust in the face of network or USB to serial adapters that may be unavailable on startup.

asynInt32Average, asynFloat64Average

If record is processed before new data have arrived (numAverage==0) set record to UDF/INVALID, set UDF to TRUE and leave value unchanged.

Release 4-11

June 16, 2009


asynReport at detail level 0 now reports only disconnected subaddresses.

The autoconnect code has undergone considerable modification. When a port is registered with autoConnect true, or whenever a port disconnect exception is raised on an autoConnect port, an attempt at connection occurs immediately followed by retry attempts at 20 second intervals. Attempts to queue requests to a disconnected port (even an autoConnect port) will be rejected. These changes have been made to reduce the occurences of 'connection flurries' and to ensure that requests do not languish in the queue when connections are broken.

Setting the trace mask or trace I/O mask for a port now also sets the trace mask or trace I/O mask for every device associated with that port.

Passing a NULL pasynUser argument to the setTraceMask and setTraceIOMask will set the asynBase (default) trace mask or trace I/O mask. To do this from the iocsh pass a zero length portName string to the iocsh commands asynSetTraceMask or asynSetTraceIOMask.


Add new version macros (ASYN_VERSION, ASYN_REVISION and ASYN_MODIFICATION). These are guaranteed to be numeric.

Add new asynStatus codes, asynDisconnected and asynDisabled. Attempts to queue a request to a disconnected or disabled port return these codes, respectively. Future changes to record support may propogate these to the record alarm status field.


Increased the size of the input buffer from 600 to 2048 bytes.


Fix from Takashi Asakawa, Yokogawa Electric Corporation, Japan to allow link identifiers with a value of zero.

devEpics (devAsynInt32, devAsynFloat64, devAsynUInt32Digital)


Add some cleanup code to eliminate memory/socket leaks.


The asynOctetSyncIO openSocket method will be removed in the next release. This method is redundant since it is no different than calling the connect method with the port name from a previous drvAsynIPPortConfigure command.


A new C++ base class called asynPortDriver from which real asyn port drivers can be derived. It greatly simplifies the code required to write a new asyn port driver. It is documented here.


A new test application to demonstrate the use of the new asynPortDriver C++ class. This driver simulates a simple digital oscilloscope, and includes a C++ driver, EPICS database, medm screen, and an example iocBoot directory in ioctestAsynPortDriver. It is described in the documentation for asynPortDriver.

Release 4-10

Sept. 2, 2008


Ths asynOctet writeRaw and readRaw methods have been removed. In most cases, if your code now calls readRaw or writeRaw it should be safe to simply change these calls to their non-Raw equivalent. If you're paranoid about someone interposing the end-of-string processing layer you could add something like the following to ensure that there is no end-of-string to match:


If you need to switch to 'raw' mode for a while and then back to 'eos mode', you can use code similar to that in devGpib.c:readArbitraryBlockProgramData:

char saveEosBuf[5];
int saveEosLen;
status = pasynOctet->getInputEos(asynOctetPvt,pasynUser,saveEosBuf,sizeof saveEosBuf,&saveEosLen);
if (status != asynSuccess) {
    epicsSnprintf(pasynUser->errorMessage,pasynUser->errorMessageSize,"Device EOS too long!");
    return -1;
if (saveEosLen)
if (saveEosLen)

When compiling your code against this new version of asyn you should pay particular attention to warning messages of the form "warning: initialization from incompatible pointer type". These are a good indication that you're initializing an asynOctet structure with the old-style I/O methods.


Add a strStatus method to convert an asynStatus code to a string.


Cleaned up timeout handling.

Fix memory leak (one epicsAtExit entry was allocated for every connect).

asynReport no longer reports as connected a port which has successfully disconnected.

Improved diagnostic messages.


Fixed bugs that caused the thread that listened for new connections to exit when errors occurred. Such errors included too many simultaneous connections.


Added three new array interfaces, asynInt8Array, asynInt16Array, and asynFloat32Array. asynInt8Array and asynInt16Array are the same as asynInt32Array except that the data types are for epicsInt8 and epicsInt16 respectively. asynFloat32Array is the same as asynFloat64Array except that the data type is for epicsFloat32.

Added asyn(XXX)ArraySyncIO for synchronous I/O to all array interfaces.

Added new asynGenericPointer interface. The datatype for this interface is void*, so it can be used to pass a pointer to anything. Includes asynGenericPointerSyncIO for synchronous I/O.

Added asynStandardInterfaces.h and asynStandardInterfacesBase.c to simplify driver initialization when using the standard asyn interfaces defined in asyn/interfaces (common, octet, int32, etc.)


Undid the change that was done in R4-9 with direct calls to dbScanLock and process in the interrupt callback functions. This could lead to deadlocks in some circumstances. The original reason for changing from scanIoRequest to (dbScanLock, process) was because callback values would be lost if the callbacks came so close together in time that the single callback value stored in device support was overwritten before scanIoRequest could process the record. This problem has been fixed by adding a FIFO (ring buffer) to the device support for the scalar interfaces asynInt32, asynUInt32Digital, and asynFloat64. The ring buffer is only created when the record is put into I/O Intr scan, so the storage is not allocated for records that are not I/O Intr scanned. The ring buffer default size is 10 values, but this can be changed on a per-record basis using the dbInfo string "FIFO" with a value such as "100".

Added support for bi and bo records for asynInt32 interface. Previously these records were only supported for the asynUInt32Digital interface.

Added waveform record device support for the asynInt8Array, asynInt16Array, and asynFloat32Array interfaces. These are the same as devAsynInt32Array and devAsynFloat64Array with changes to the data types.


Remove duplicate windows function decorations.


Improved diagnostic messages.


Fixed timeout bug introduced in R4-6 when timeouts of 0.0 and -1.0 were defined.

Release 4-9

October 19, 2007


Replaced scanIoRequest with direct call to rset->process in interrupt callback routines in all device support. Without this fix if another interrupt occurred before the first scanIoRequest was complete bad things could happen. The data from the first interrupt would be lost, and the read function in the driver would be called when it should not have been.


Added support for 28,800 baud for those architectures which support this unusual speed.

Added stub routines for WIN32 so that a separate DBD file is no longer needed.


Added short delay in cleanup routine so sockets would close cleanly.


Fixed bug which caused asynOctetRead() to return prematurely with eomReason=ASYN_EOM_CNT if the port driver returned 600 bytes in readRaw().


Build driver for Greensprings IP-488 if IPAC is defined in configure/RELEASE.


Added stub routines for WIN32 so that a separate DBD file is no longer needed.


Avoid duplicate clnt_destroy operations.

Release 4-8

April 28, 2007


Added support for link specification of


in addition to the previous support for


This allows device support to work with drivers that cannot return meaningful values in pasynInt32->getBounds because they do not know the range of the device. This is true, for example of Modbus ADCs. The nbits parameter is defined as follows:

  nbits > 0  Device is unipolar with a range from 0 to 2^nbits-1
  nbits < 0  Device is bipolar with a range from -2^(abs(nbits)-1) to 2^((abs(nbits)-1)-1
           Values returned on the asynInt32 interface will be sign extended
           using the sign bit (e.g. bit abs(nbits)-1 starting at bit 0).

devEpics/devAsynInt32Array, devAsynFloat64Array

Added support for callbacks from driver to device support. This allows waveform records to have I/O Intr scanning, as already supported for other records in devEpics.


Changed parser so it requires an exact match to "asyn(" or "asynMask(". Previously it tolerated other characters before the "(", and in particular it accepted "asynMask(" when "asyn(" was expected. Note that this change could cause problems with database files if they did not follow the documented syntax, which has no white space between "asyn" or "asynMask" and the "(" character.


Fix errors in format strings for asynPrint.

Temporary fix to asynReport thread for Cygwin. If the amount of output is small the thread exists for a very short time, and this causes a crash. The fix is a short wait, but it should really be fixed in base/src/libCom/osi/os/posix/osdThread.c.


Fix problem with Makefile.


Add more SCPI commands to devGpib template.


Close sockets on application exit. This is very important for vxWorks, otherwise sockets are not closed cleanly which often leads to problems when the IOC reboots.


Hold off SRQ callbacks until iocInit.

Release 4-7

February 28, 2007


Clean up operation on POSIX/termios systems (everything but vxWorks). The old mechanism was prone to polling during read operations rather than using the termios read timeout mechanism.


asynRecord sets line-buffering on trace file.

Peter Mueller provided code to remove/restore a device from/to the SRQ polling list.


Clean up dangling 'default' statement.


Fixed error in GPIBACMD operations.


Patches from Gasper Jansa to improve option handling.


Fixed null pointer dereference for all device support when SCAN=I/O Intr and asyn port could not be found.


Fixed buffer overflow error when NRRD>40 and IFMT=ASCII.


Read method now sets return status and *eomReason properly.


*eomReason now set to ASYN_EOM_CNT when read count has been satisfied.

Fix timeout settings on RTEMS.

Add support for UDP broadcasts. Specify "UDP*" and the network broadcast address in the port configuration command:
drvAsynIPPortConfigure("L0", " UDP*", 0, 0, 0)


Full support for new timeout semantics (timeout<0 means "wait forever for characters to arrive", timeout=0 means "return characters immediately available", timeout>0 means "return a timeout status if no characters are received within the specified number of seconds").

Release 4-6


Fixed NULL pointer dereference.


Previous versions of drvAsynIPPort.c (1.29 and earlier, asyn R4-5 and earlier) attempted to allow 2 things:

  1. Use an EPICS timer to time-out an I/O operation, such as send(), recv() and connect().
  2. Periodically check (every 5 seconds) during a long I/O operation to see if the operation should be cancelled.

Item 1) above was not really implemented because there is no portable robust way to abort a pending I/O operation. So the timer set a flag which was checked after the poll() was complete to see if the timeout had occured. This was not robust, because there were competing timers (timeout timer and poll) which could fire in the wrong order.

Item 2) was not implemented, because asyn has no mechanism to issue a cancel request to a driver which is blocked on an I/O operation.

Since neither of these mechanisms was working as designed, the driver has been re-written to simplify it. If one or both of these are to be implemented in the future the code as of version 1.29 should be used as the starting point.

If pasynUser->timeout < 0 an infinite timeout is now used.

Fixed bug so that ports connected with a file descriptor in pasynUser->reason execute code to set timeouts.

Fixed bug to return error if pasynCommon->connect is called when port already connected.


Added two new functions which are related to pasynTrace->print and pasynTrace->printIO the way vprintf is related to printf.


Changed pasynManager->connectDevice for ports which have the properties autoConnect=1 and isConnected=0. In this case a request is queued to call asynCommon->connect for that port. This ensures that ports that have a pasynUser connected to them will report being connected even if no I/O has yet been done. Previously such ports reported a disconnected state until the first I/O or operation such as setTraceMask. This was confusing.

Clarify documentation on meaning of pasynUser->timeout. Previously there was no documented method of specifying an "infinite" timeout to a driver, and the meaning of timeout=0.0 was not defined. The new definitions are:

> 0.0 Wait for up to timeout seconds for the I/O to complete

= 0.0 Peform any I/O that can be done without blocking. Return timeout error if no I/O can be done without blocking.

< 0.0 Infinite timeout. Wait forever for I/O to complete.


Fixed bugs with asynFloat64Average device support. The wrong interrupt function was being called, and UDF was not being cleared.

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

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.