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 <2019> 2020 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 <2019> 2020 2021 2022 2023 2024 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: StreamDevice device locking |
From: | Dirk Zimoch via Tech-talk <[email protected]> |
To: | <[email protected]> |
Date: | Fri, 8 Feb 2019 14:49:39 +0100 |
I thing one could make it work if the device can send SRQ when it has a reply. So the IOC would only address the device when it has actually something to talk. But that is probably more effort to implement than it's worth.
Dirk On 08.02.19 14:40, Dirk Zimoch via Tech-talk wrote:
The question is: Is there a way to tell *asyn* to block only on the address level?This may depend on the implementation of the particular asyn interface. I do not have any devices with addresses at the moment. (Only GPIB comes to my mind.) So I cannot test.StreamDevice calls pasynManager->blockProcessCallback() with its asynUser handle. The asynUser handle is bound to an address on a port. So I had expected that asyn blocks only that address, not others on the same port.I have to set up a GPIB system with at least 2 devices first before I can test this case.Dirk On 08.02.19 14:24, Joao Afonso via Tech-talk wrote:Hello,At the moment I am experimenting with StreamDevice, while connecting it to a custom asynPortDriver (instantiated with ASYN_MULTIDEVICE, ASYN_CANBLOCK).According to the documentation, each protocol command blocks the device for the duration of the protocol, which makes sense. But an access to two devices on two different addresses should be possible:http://epics.web.psi.ch/software/streamdevice/doc/processing.html * /"The first |out| command in the protocol locks the device for exclusive access. That means that no other record can communicate with that device. This ensures that replies given by the device reach the record which has sent the request. _On a bus with many devices on different addresses, this normally locks only one device_. The device is unlocked when the protocol terminates. Another record trying to lock the same device has to wait and might get a |LockTimeout|." /However, I noticed that if I process two records with stream device, for addresses #1 and #2, it first runs all callbacks for address #1, and only after to #2. This is contrary to my expectation, which would be to see callbacks to both devices being executed interleaved.Is there a way to tell StreamDevice to block only on the address level, allowing to different addresses to be processes simultaneously?Thanks, Joao Afonso CERN TE-EPC-CCS