Extended asTrapWrite to provide put data
Backwards-compatible enhancement to the asTrapWrite API to provide listener routines with the data being put by the client. The asTrapWriteMessage structure is extended with 3 new fields for data type, element count and a pointer to the source buffer. Tim Mooney requested this enhancement for his caPutRecorder code, which doesn't work if the record overwrites the new value within its process() routine, e.g. when jogging a motor record.
This commit is contained in:
@@ -13,6 +13,31 @@
|
||||
|
||||
<!-- Insert new items immediately below here ... -->
|
||||
|
||||
<h3>Enhanced API for asTrapWrite listeners</h3>
|
||||
|
||||
<p>External software such as the CA Put Logging module that registers a listener
|
||||
with the asTrapWrite subsystem was not previously given access to the actual
|
||||
data being sent by the CA client. In most cases this was not a problem as the
|
||||
listener can look at the field being modified both before and after the
|
||||
operation, but if the put processes the record which immediately overwrites the
|
||||
new value, the client's value cannot be observed.</p>
|
||||
|
||||
<p>This release adds three fields to the asTrapWriteMessage structure that is
|
||||
passed to the listener routines. These new fields provide the CA data type, the
|
||||
number of array elements, and a pointer to the source data buffer. This change
|
||||
is completely backwards compatible with listener code written against the
|
||||
original API. The new API can be detected at compile-time as follows:</p>
|
||||
|
||||
<blockquote><pre>
|
||||
#include "asLib.h"
|
||||
|
||||
/* ... */
|
||||
|
||||
#ifdef asTrapWriteWithData
|
||||
/* Enhanced API */
|
||||
#endif
|
||||
</pre></blockquote>
|
||||
|
||||
<h3>Back-ported the <q>tapfiles</q> build target from 3.15</h3>
|
||||
|
||||
<p>This GNUmake target runs the same tests as the <q>runtests</q> target, but
|
||||
|
||||
Reference in New Issue
Block a user