One way to do this would be to use the asyn "addr" parameter
In this implementation you might only have a few parameters:
The $(ADDR) macro in the link can specify the register address as in the following example records.
# Register address 6, int8
# Register address 10, int32
# Register address 22, float64
You would set the flag ASYN_MULTIDEVICE and specify the maximum register address in the call to the asynPortDriver constructor.
It's not super-efficient in terms of memory, because you will have 5 parameters for each address, and only 1 being used. But we are probably only talking a few kilobytes at most.
From: Konrad, Martin [mailto:firstname.lastname@example.org]
Sent: Friday, January 06, 2017 4:31 PM
To: EPICS Tech Talk; Mark Rivers
Subject: Asyn and devices with changing register map
I am intending to implement a driver for an FPGA-based device based on
asynPortDriver. I am wondering how to deal with devices which are under
heavy development resulting in frequent changes to their register map.
In this context I am looking for a simple and clean way to tie records
to a certain address.
In a world without Asyn I would implement a driver that simply reads the
address and the type of a register from the INP/OUT fields of my
records. This could be changed easily (even by an FPGA engineer) without
recompiling the driver and all configuration data is in the record
definition. Note that I'm fine with this slightly harder to read data in
the INP/OUT field. Usually the record's name, the description field, and
if necessary additional comments provide sufficient information about
what the address stands for.
Using Asyn it seems like I need to populate Asyn's paramList which in
the case of most drivers seems to be a hard-coded mapping between names
and addresses. Are there any drivers that populate this dynamically on
IOC start from a configuration file or even from the EPICS database file?
Thanks a lot,
Control System Engineer
Facility for Rare Isotope Beams
Michigan State University
640 South Shaw Lane
East Lansing, MI 48824-1321, USA
- RE: Asyn and devices with changing register map Mooney, Tim M.
- Asyn and devices with changing register map Konrad, Martin
- Navigate by Date:
RE: Asyn: example driver for slow device? Mark Rivers
The limit of height property of Grouping Container of CSS widget 吴煊
- Navigate by Thread:
RE: Asyn and devices with changing register map tom.cobb
RE: Asyn and devices with changing register map Mooney, Tim M.