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  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: Alan Greer <ajg@observatorysciences.co.uk>
To: Mark Rivers <rivers@cars.uchicago.edu>
Cc: "tech-talk@aps.anl.gov" <tech-talk@aps.anl.gov>
Date: Mon, 08 Apr 2013 15:42:23 +0100
Hi sure, here it is:

record(stringout, "T1:STRING")
{
    field (DTYP, "stream")
    field (OUT,  "@test.proto stringIO SSH1")
}


I should say that originally I was attempting to write the contents of the string record to the device, instead of the hard coded string "cpu\n". I changed it to the hard coded value when I couldn't get the original setup to work.

Kind regards, Alan




On 04/08/2013 03:36 PM, Mark Rivers wrote:
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 Mark Rivers
References:
Stream Device and Asyn Alan Greer
RE: Stream Device and Asyn Mark Rivers

Navigate by Date:
Prev: RE: Stream Device and Asyn Mark Rivers
Next: RE: Stream Device and Asyn Mark Rivers
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: RE: Stream Device and Asyn Mark Rivers
Next: RE: Stream Device and Asyn Mark Rivers
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 
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 ·