Ø
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
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.
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
|
Márcio Paduan Donadio
| Control Systems Engineer
Advanced Control Systems Department
SLAC National Accelerator Laboratory | Menlo Park, CA
p: 650.926.5007 | w:
slac.stanford.edu
|