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  <20092010  2011  2012  2013  2014  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  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: reading with the asyn record
From: Eric Norum <[email protected]>
To: Patrick Thomas <[email protected]>
Cc: [email protected]
Date: Tue, 30 Jun 2009 08:15:20 -0500

On Jun 29, 2009, at 11:27 PM, Patrick Thomas wrote:

Hi,
Two questions:

1) Does the asyn record block when reading until the requested amount of bytes (NRRD) is available in the serial fifo buffer, or does it only block until 1 byte is available (like the c read function), or not at all?

The asyn record performas a single asynOctet read operation. The semantics of this depend on the underlying asynOctet driver and any interposed layers. The low-level serial driver, for example, behaves like the POSIX read() routine -- a read request returns as much data is available, up to the size of the request. The asynInterposeEos layer can be stacked on top of the low-level serial driver and will loop until the specified 'end-of-string' sequence has been read (or the read count has been satisfied, or some other 'end-of-message' condition has been met).


2) Is there a way to check that it has gotten all the requested bytes into the record before doing a caget on the BINP field to retrieve them?

The EOMR 'End Of Message Reason' field contains bits describing the conditions that terminated the read. The ASYN_EOM_CNT bit is set when the full number of requested characters have been read.


Thank you for your time,
Patrick

--
Eric Norum <[email protected]>
Advanced Photon Source
Argonne National Laboratory
(630) 252-4793



References:
reading with the asyn record Patrick Thomas

Navigate by Date:
Prev: RE: choosing snmp version Rees, NP (Nick)
Next: Prodex MAXv command responses (RA, QA, EA, RL) for different versions of firmware Rose, AJ (Austen)
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: reading with the asyn record Patrick Thomas
Next: Prodex MAXv command responses (RA, QA, EA, RL) for different versions of firmware Rose, AJ (Austen)
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 31 Jan 2014 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·