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