![]() |
![]() ![]()
Experimental Physics and
| ||||||||||||||
|
I've written an asynPortDriver for a TCP/IP-to-BitBus gateway which talks to power supply controllers. The driver sends addressed messages to each controller and receives similar messages as responses. The controllers may have non-sequential addresses in the [1, 200] range.
It works well with a single controller, and now I'm adding support for multiple controllers. Since the gateway doesn't support multiple sockets, I'm using ASYN_MULTIDEVICE (multiple addresses using a single asyn port). To poll the controllers, I need to loop over all addresses in my driver. If I have sequential addresses that's easy, but mine may be non-sequential and I don't want to loop over non-existent addresses. Is there a way to get a list of all registered addresses for a given port from asynManager somehow? By "registered" I mean an address that's present in a record and tied to a specific port, e.g.: record(bo, "$(ps):StateSetpt") { field(DESC, "Power Supply On/Off") field(DTYP, "asynInt32") field(OUT, "@asyn($(asynPort), $(address), 0) STATE_SETPT") field(ZNAM, "OFF") field(ONAM, "ON") } My first attempt would be to follow the asynReport (pasynManager->report) function which sets up a linked list and prints all addresses. Am I on the right track? Or is there something built-in that I missed? Thanks, Mike Michael Dunning SLAC National Accelerator Laboratory 2575 Sand Hill Road Menlo Park, CA 94025 (650) 926-5200
| ||||||||||||||
ANJ, 19 Nov 2019 |
![]() · Download · Search · IRMIS · Talk · Documents · Links · Licensing · |