EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: asynPortDriver: get all addresses for ASYN_MULTIDEVICE
From: "Dunning, Michael via Tech-talk" <[email protected]>
To: EPICS Tech-Talk <[email protected]>
Date: Tue, 19 Nov 2019 14:02:38 -0800
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

Navigate by Date:
Prev: Re: EPICS Codeathon 2020 Johnson, Andrew N. via Tech-talk
Next: Re: asynPortDriver: get all addresses for ASYN_MULTIDEVICE Mark Rivers via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Uploading a file with SFTP from an EPICS driver - Issue fixed! Mark Rivers via Tech-talk
Next: Re: asynPortDriver: get all addresses for ASYN_MULTIDEVICE Mark Rivers via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024 
ANJ, 19 Nov 2019 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·