EPICS Home

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  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 
<== Date ==> <== Thread ==>

Subject: RE: Stream Device and Asyn
From: Mark Rivers <rivers@cars.uchicago.edu>
To: "'Alan Greer'" <ajg@observatorysciences.co.uk>, "tech-talk@aps.anl.gov" <tech-talk@aps.anl.gov>
Date: Mon, 8 Apr 2013 14:36:14 +0000
Can you send the database you are using that invokes that protocol file?

-----Original Message-----
From: tech-talk-bounces@aps.anl.gov [mailto:tech-talk-bounces@aps.anl.gov] On Behalf Of Alan Greer
Sent: Monday, April 08, 2013 9:17 AM
To: tech-talk@aps.anl.gov
Subject: Stream Device and Asyn

Hi all,

I have an Asyn driver (SSH) that I'm attempting to use with Stream Device.

My setup

EPICS_BASE=/home/epics/R3.14.12.2/base
ASYN=/home/epics/R3.14.12.2/asyn4-18
STREAM=/home/epics/R3.14.12.2/stream2-6

Here is my protocol file

 >> more test.proto

stringIO {
   out "cpu\n";
}


When I process the record that executes the stringIO routine I get the 
following IOC output (with asyn trace set)

epics> 2013/04/08 15:03:39.859 SSH1 addr -1 queueRequest priority 0 not 
lockHolder
2013/04/08 15:03:39.859 SSH1 schedule queueRequest timeout
2013/04/08 15:03:39.859 asynManager::portThread port=SSH1 callback
2013/04/08 15:03:39.859 SSH1 addr -1 queueRequest priority 0 not lockHolder
2013/04/08 15:03:39.859 SSH1 schedule queueRequest timeout
2013/04/08 15:03:39.859 asynManager::portThread port=SSH1 callback
2013/04/08 15:03:39.859 device read.
2013/04/08 15:03:39.859 Close device connection (fd -1221589168): Read error
2013/04/08 15:03:39.859 device read.
2013/04/08 15:03:39.859 Open connection to device  reason:0
2013/04/08 15:03:40.346 Opened connection to device
2013/04/08 15:03:40.347 Close device connection (fd -1221589168): Read error
2013/04/08 15:03:40.347 device read.

When I look at those messages I agree that the device read will return a 
read error, as there is nothing to read back.  What I don't understand 
is why readIt is called at all.  I was expecting the protocol function 
to only call into writeIt.  What I see is that readIt appears to be 
called with a timeout of 0.  Can anyone help me with this?  My asyn 
driver is (loosely) based on the  drvAsynIPPort driver, with an 
additional library in place of the actual socket calls made, and 
simplified as much as possible.

The output messages continue indefinitely when I process the record, 
disconnecting, reconnecting, attempt a read... etc.

I have successfully used the driver with a custom asyn motor record 
device support layer, and so the driver is functional (at least to some 
extent!)

Any help or suggestions would be appreciated.

Kind regards, Alan Greer




Replies:
Re: Stream Device and Asyn Alan Greer
References:
Stream Device and Asyn Alan Greer

Navigate by Date:
Prev: Stream Device and Asyn Alan Greer
Next: Re: Stream Device and Asyn Alan Greer
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 
Navigate by Thread:
Prev: Stream Device and Asyn Alan Greer
Next: Re: Stream Device and Asyn Alan Greer
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