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  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: Zero length length requests, EPICS upgrades, and cothread
From: Matt Newville <[email protected]>
To: Michael Abbott <[email protected]>
Cc: EPICS Tech Talk <[email protected]>
Date: Wed, 18 Dec 2013 09:41:59 -0600
Hi Michael,

On Wed, Dec 18, 2013 at 1:20 AM,  <[email protected]> wrote:
> From: [email protected] [mailto:tech-talk-
>> I'm not a user of cothread.catools either, but I think it might be
>> useful to have cothreads.catools and pyepics have similar behaviors
>> whenever possible.    I've been confused about what the correct
>> behavior for waveforms should be too.
>
> Hi Matt!
>
>> >> QUESTION: What should be the correct *default* result length when
>> >> using cothread to perform caget() or camonitor() on a waveform?
>> >>
>> >> A. The "natural" length, encoded as zero: this returns NORD elements
>> >> on a .12 and above server, but NELM elements on older version of
>> >> EPICS.  (This is the current default.)
>> >
>> > I think you should stick with this meaning.
>> >
>> >> B. The "full" length, which for a waveform is NELM elements.
>> >>
>> >>
>> >> I am proposing to make the following *incompatible* change: the
>> >> default result length (encoded by the 'count' parameter to 'caget'
>> >> and 'camonitor') will change from 0 ("natural" length) to "full"
>> >> length, and if the "natural" length is wanted it will be necessary to
>> >> explicitly specify 'count=0' as an argument.
>> >>
>> >> Please shout if you think this is a bad idea...
>> >
>> > Shout!
>>
>> Oh, Micheal's proposal is (mostly) exactly what pyepics ca.get() does.
>>  It takes a count argument with a default value of None.  That is
>> interpreted as "use ca_element_count() to figure out count".   One can
>> pass in count=0 to get the natural length (NORD elements), but the
>> default is the full array.
>
> That's what I was in the middle of rewriting cothread to do when I sent this mail, but on reflection and thinking about Andrew's response,
>  I've decided to keep cothread's current behaviour which is to default count to 0 with the behaviour we're discussion.

I was hoping there was a standard behavior for how channel access
clients should deal with waveform records.  I don't know what that is,
but having the writer of every CA wrapper decide how to handle this
seems likely to cause confusion.  Perhaps with older versions of libCA
still in wide use, different behaviors are unavoidable, but striving
for uniformity seems like a good goal.

--Matt Newville

References:
Zero length length requests, EPICS upgrades, and cothread michael.abbott
Re: Zero length length requests, EPICS upgrades, and cothread Andrew Johnson
Re: Zero length length requests, EPICS upgrades, and cothread Matt Newville
RE: Zero length length requests, EPICS upgrades, and cothread michael.abbott

Navigate by Date:
Prev: areaDetector driver for Point Grey FlyCapture2 SDK? Mark Rivers
Next: Design strategies for CSS BOY screens tom.cobb
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: RE: Zero length length requests, EPICS upgrades, and cothread michael.abbott
Next: RE: Zero length length requests, EPICS upgrades, and cothread michael.abbott
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