epics-modules / asyn

EPICS module for driver and device support
http://epics-modules.github.io/asyn/
Other
37 stars 75 forks source link

Improve waveform device support, add aai and aao #162

Closed MarkRivers closed 2 years ago

MarkRivers commented 2 years ago

This PR addresses #139.

Previously devAsynXXXArray used a 485 line C macro. This has been rewritten to use a new C++ template class in devAsynXXXArray.cpp. The new class adds support for aao and aai records, in addition to the existing waveform record support. The device support creates 24 dsets (6 data types * 4 record types).

Data types:

Record types:

The new code has 9 fewer files and 150 fewer lines of code than R4-43.

It still has a 30 line C macro which is used to create the 120 C functions used by the 24 dsets. Any ideas on whether that could also be made more elegant would be welcome.

AppVeyorBot commented 2 years ago

:white_check_mark: Build asyn 1.0.146 completed (commit https://github.com/epics-modules/asyn/commit/84a8c2013f by @MarkRivers)

mdavidsaver commented 2 years ago

Here is another example of namespace {} extern "C" {} which may be easier to parse.

MarkRivers commented 2 years ago

Thanks all for the review, I have made the changes @mdavidsaver and @anjohnson suggested.