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  <20122013  2014  2015  2016  2017  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017 
<== Date ==> <== Thread ==>

Subject: Re: 'reconnect' in asyn / streamDevice
From: Eric Norum <eric@norum.ca>
To: Emmanuel Mayssat <emayssat@yahoo.com>
Cc: epics <tech-talk@aps.anl.gov>
Date: Fri, 11 May 2012 09:59:38 -0700
You should specify this "connect per transaction" when configuring the ASYN port -- here's the salient portion of the documentation -- note the 'HTTP' protocol option:


TCP/IP or UDP/IP Port

The drvAsynIPPort driver supports devices which communicate over a TCP/IP or UDP/IP connection. A typical example is a device connected through an Ethernet/Serial converter box.

TCP/IP or UDP/IP connections are configured with the drvAsynIPPortConfigure command:

   drvAsynIPPortConfigure("portName","hostInfo",priority,noAutoConnect,
        noProcessEos)

where the arguments are:

  • portName - The portName that is registered with asynManager.
  • hostInfo - The Internet host name, port number and optional IP protocol of the device (e.g. "164.54.9.90:4002", "serials8n3:4002", "serials8n3:4002 TCP" or "164.54.17.43:5186 udp"). If no protocol is specified, TCP will be used. Possible protocols are
    • TCP
    • UDP
    • UDP* — UDP broadcasts. The address portion of the argument must be the network broadcast address (e.g. "192.168.1.255:1234 UDP*").
    • HTTP — Like TCP but for servers which close the connection after each transaction.
    • COM — For Ethernet/Serial adapters which use the TELNET RFC 2217 protocol. This allows port parameters (speed, parity, etc.) to be set with subsequent asynSetOption commands just as for local serial ports. The default parameters are 9600-8-N-1 with no flow control.
  • priority - Priority at which the asyn I/O thread will run. If this is zero or missing, then epicsThreadPriorityMedium is used.
  • noAutoConnect - Zero or missing indicates that portThread should automatically connect. Non-zero if explicit connect command must be issued.
  • noProcessEos If 0 then asynInterposeEosConfig is called specifying both processEosIn and processEosOut.
On May 11, 2012, at 9:51 AM, Emmanuel Mayssat wrote:

I have a webserver type device.
The connection 'breaks' at the end of each successful request.

With asyn autoconnect feature, it seems that at least one request should fail for asyn to attempt to reconnect.
With stream, I intended to use the 'connect 1000' at the beginning of my protocols, but it doesn't seem to work.
(Now that I think of it, maybe I should explicitly disconnect at the end)

So currently I have 50% of my requests that fail.
What is the solution?

--
Emmanuel


-- 
Eric Norum
eric@norum.ca





References:
'reconnect' in asyn / streamDevice Emmanuel Mayssat

Navigate by Date:
Prev: 'reconnect' in asyn / streamDevice Emmanuel Mayssat
Next: Re: 'reconnect' in asyn / streamDevice Emmanuel Mayssat
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017 
Navigate by Thread:
Prev: 'reconnect' in asyn / streamDevice Emmanuel Mayssat
Next: Re: 'reconnect' in asyn / streamDevice Emmanuel Mayssat
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·