Added support for link specification of
@asynMask(portName,addr,nbits,timeout)drvParamsin addition to the previous support for
@asyn(portName,addr,timeout)drvParamsThis 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).
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.
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", "192.168.1.255:1234 UDP*", 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").
Fixed NULL pointer dereference.
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.
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.
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.
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.
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.
Users who want to use local serial ports or VXI-11 on Windows can use the Cygwin EPICS build (cygwin-x86).
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.
The names have been changed and now these methods only work for asynchronous ports. An error is returned if blockProcessCallback is called for a synchronous port.
These are new asynManager methods. They can be used in place of queueRequest if the caller can block. They have been added to make it easier to implement a driver with one addressing scheme that is a asynUser of a driver with a different addressing scheme. For example a multi-drop serial driver can be implemented that calls a standard serial driver.
This is a new interface for driver's that call other drivers.
The cancelInterruptUser methods of all interfaces has been changed from
asynStatus (*cancelInterruptUser)(void *registrarPvt, asynUser *pasynUser);to
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.
All length and size arguments now have type size_t.
These all use lockPort/unlockPort instead of queueRequest.
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.
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
If read reads maxchars, it forced the last character to be 0 and returned asynOverflow if it wasn't. This is fixed.
These did not properly set an error message in asynUser.errorMessage when they returned asynError. This is fixed.
Changes were made to the way serial port options are handled.
Previosly defaults were assigned for all options. Now the initial values are fetched from either the termios (POSIX) or sioLib (vxWorks).
The vxWorks sioLib uses clocal for what POSIX calls crtscts. The new serial support for vxWorks accepts both clocal and crtscts to specify RTSCTS (Request to send, Clear to send).
This has a new option to set Modem Control.
The only code change was to fix the drvAsynIPPort and drvAsynSerialPort segmentation faults on cygwin-x86.
APOLOGY: Many interfaces have changed since release 3-3. This is the reason this release is called 4-0.
Blanks no longer appear in the menu choices. For example.
device(ai,INST_IO,devAiAsynInt32,"asyn Int32")is now
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.
respond2Writesfield, if greater than 0, are now seconds rather than milliseconds. This change was made so that all time values set in the instrument support initialization routine are specified uniformly in units of seconds. Very few instrument support files are likely to be affected by this change
This release includes support for the following:
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:
It's vxiName must start with "hpib" rather than "gpib".
When communicating with the Ethernet port it acts like a VXI-11.2 rather than a VXI-11.3 device. It seems to just accept any GPIB address. SRQs did not work when connecting via the ethernet port but did when communicating via a LAN/GPIB gateway.
The generic serial support has been tested with the following: