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  <20132014  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  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: drvAsynIPPort question
From: Mark Rivers <[email protected]>
To: "'Sinisa Veseli'" <[email protected]>, "[email protected]" <[email protected]>
Date: Wed, 20 Mar 2013 17:43:48 +0000
> I see that connection is closed in asynCommonDisconnect() method (file 
> interfaces/asynOctetSyncIO.c), but it isn't quite clear to me how this 
> method would get called (pasynOctetSyncIO->disconnect() does not seem to 
> do it).

The method you need to call is pasynCommonSyncIO->disconnectDevice(pasynUser)

Note that the pasynUser that you pass in this call must be created with pasynCommonSyncIO->connect(), and it must NOT be the pasynUser that you created with pasynOctetSyncIO->connect().  That is a common mistake.

Note that the asyn unfortunately has two meanings of the term "connect".  

1) The first meaning is to connect a pasynUser to an asyn port driver and address.
2) The second to connect the asyn port driver to the underlying device, in your case a TCP socket.

pasynManager->connectDevice does the type 1 connection.
pasynCommon->connect does the type 2 connection.

To make things even more confusing the terms "connect" and "connectDevice" are reversed in the asynXXXSyncIO functions.

The asynXXXSyncIO functions pasynXXXSyncIO->connect do a type 1 connection.  This really should have been called "connectDevice" to make it consistent with the pasynManager function.

pasynCommonSyncIO->connect does a type 1 connection, to be consistent with all of the other asynXXXSyncIO methods.  pasynCommonSyncIO->connectDevice does a type 2 connection, while this should have been called "connect" to be consistent with the pasynCommon method.

Unfortunately we need to live with these names, it's too late to change them now.

Mark

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Sinisa Veseli
Sent: Wednesday, March 20, 2013 12:02 PM
To: [email protected]
Subject: drvAsynIPPort question

Hi,

Does anyone know what is the proper way to destroy tcp socket created 
via drvAsynIPPortConfigure?

My test client and server use drvAsynIPPortConfigure and 
drvAsynIPServerPortConfigure from asyn 4-18, and I can connect and 
exchange data between the two. However, no matter what I try, I am not 
able to destroy the client socket properly.

I see that connection is closed in asynCommonDisconnect() method (file 
interfaces/asynOctetSyncIO.c), but it isn't quite clear to me how this 
method would get called (pasynOctetSyncIO->disconnect() does not seem to 
do it).


I looked through marCCD.cpp in area detector module (Tim Madden kindly 
pointed that out as an example),  but I only saw 
pasynOctetSyncIO->connect() being called.


In any case, I would appreciate any pointers, and sorry if I'm missing 
something obvious...

Thanks,

Sinisa




-- 
Sinisa Veseli
Software Services Group
APS Engineering Support Division
Argonne National Laboratory
[email protected]
(630)252-9182



Replies:
Re: drvAsynIPPort question Sinisa Veseli
Re: drvAsynIPPort question J. Lewis Muir
References:
drvAsynIPPort question Sinisa Veseli

Navigate by Date:
Prev: delay before alarm on alarm handler James F Ross
Next: Re: delay before alarm on alarm handler Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: drvAsynIPPort question Sinisa Veseli
Next: Re: drvAsynIPPort question Sinisa Veseli
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 20 Apr 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·