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 2025 | 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 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | RE: Should drvAsynIPPortConfigure print an error when device is not connected? |
From: | Mark Rivers via Tech-talk <[email protected]> |
To: | 'Abdalla Ahmad' <[email protected]> |
Cc: | "[email protected]" <[email protected]> |
Date: | Wed, 15 May 2019 16:09:06 +0000 |
Ø
When calling drvAsynIPPortConfigure on the IOC, shell passing an IP of a disconnected device, no message is print on the IOC shell. Is there a way to configure it? Actually a message is printed on the IOC shell. It is not printed immediately when you call drvAsynIPPortConfigure, it is printed 5 seconds later by default. This is by design.
-
drvAsynIPPortConfigure does not actually try to connect to the device. That is done in the asynCommon->connect() method.
-
Recall that one of the arguments to drvAsynIPPortConfigure is noAutoConnect.
o
If that flag is true then connections to the device only happen when some software explicitly calls pasynCommon->connect().
o
If that flag is false then asynManager will queue a connection request when the port is created, using a 5 second timeout.
-
That timeout can be configured with the command asynSetAutoConnectTimeout command in your startup script before calling drvAsynIPPortConfigure.
-
If the connection request times out, i.e. it cannot connect to the device, then an error message will be printed by asynManager.
-
Note that only a single message will be printed when the device is not available, even if there are many connection attempts because the autoConnect flag is true.
-
There will be another single message printed if the device becomes available and does connect.
-
The reason that the connection attempt is not done in drvAsynIPPortConfigure is because it could greatly slow down the startup script if there are lots of disconnected devices. How long should it wait
for a device to connect? Here is a demonstration that it is working correctly. corvette:asyn/iocBoot/ioctestConnect>../../bin/linux-x86_64/testConnect st.cmd dbLoadDatabase("../../dbd/testConnect.dbd") testConnect_registerRecordDeviceDriver(pdbbase) # This is a bogus IP address that will never connect drvAsynIPPortConfigure("IPPort", "164.54.160.220:20", 0, 0, 1); date 2019/05/15 10:44:57.158058 Starting iocInit ############################################################################ ## EPICS R7.0.2.2 ## EPICS Base built May 10 2019 ############################################################################ iocRun: All initialization complete epics> 2019/05/15 10:45:02.670 IPPort -1 autoConnect could not connect So at 10:44:57 drvAsynIPPortConfigure was called. At 10:45:02 (5 seconds later) the error message was printed saying that it could not connect. Mark From: [email protected] <[email protected]>
On Behalf Of Abdalla Ahmad via Tech-talk Totally forgot about this issue. Same issue here with Asyn 4.34 and stream 2.8.8, we started facing this issue with stream 2.8.8. I think when we used 2.7.7c
it was reporting disconnected devices. Best Regards, Abdalla. From:
[email protected] [mailto:[email protected]]
On Behalf Of Paduan Donadio, Marcio via Tech-talk Hello, all. When calling drvAsynIPPortConfigure on the IOC, shell passing an IP of a disconnected device, no message is print on the IOC shell. Is there a way to configure
it? Thank you, Márcio
|