What I meant is that I set autoConnect to 0 and handle it manually why doing IO, I thought that is how autoConnect works.
Does implementing the connect() give correct feedback on the CNCT field? It would be great if you share existing drivers implementing the connect() method.
Abdalla.
- Should I set autoConnect to 0 in case I want to implement a connection logic in the driver?
Or it does not matter in this case of UDP?
I suggest setting autoConnect=1 and implementing the connect() method in your driver. Then asynManager will call your driver periodically to try to connect. If your driver finds that the device is available
it then calls the asynPortDriver base class connect() method, which calls pasynManager->exceptionConnect().
Or were you thinking of some other connection logic in your driver?
Mark
Hi Mark
Thanks for the info. Should I set autoConnect to 0 in case I want to implement a connection logic in the driver? Or it does not matter in this case of UDP?
Best Regards,
Abdalla Al-Dalleh
Control Engineer
SESAME
P.O. Box 7, Allan 19252, Jordan
Tel: +96253511348 , ext. 265
Fax: +96253511423
Email :
[email protected]
Website: www.sesame.org.jo
Hi Abdalla,
Sorry, I missed the fact that you are using UDP, not TCP. In that case there is no permanent connection established between your driver and the device. Each UDP read or write operation is completely independent. Your driver
will need to implement the logic which might be, for example, after 5 unsuccessful I/O attempts call pasynManager ->exceptionDisconnect() to tell asynManager that the device is disconnected. Since you have set autoConnect=1 asynManager will periodically call
the connect() method in your driver. If your driver finds that the device is available, it then calls pasynManager->exceptionConnect().
Mark
From: Tech-talk <[email protected]>
On Behalf Of Abdalla Ahmad via Tech-talk
Sent: Tuesday, November 25, 2025 11:37 AM
To: [email protected]
Subject: Asyn record CNCT field does not update
Hi
I developed an asynPortDriver to control a device through UDP, I want to use asynRecord CNCT field to monitor the port connection state whether the device is connected or not. The driver is configured
with auto connect flag set to 1. When I monitor the field and disconnect the device, I get error message indicating IO error, but the field does not change to disconnect. I am I missing other settings to be done?
Best Regards,
Abdalla.