The recent fix I referred to in my previous post was done in asyn 4-21 (Feb. 2013). This is from the release notes for asynPortDriver:
******************
Changed the code so that the length of string parameters returned in readOctet and octetCallback is now strlen(string)+1, rather than strlen(string). The length thus now includes the terminating nil. This fixes problems with clients that request long strings or subscribe to monitors with a length of 0, but don't check for a nil terminator.
******************
That fix was discussed in detail in this tech-talk thread:
http://www.aps.anl.gov/epics/tech-talk/2012/msg02251.php
Note that this only has to do with reading strings, not with setting strings.
There was a related thread that involved problems with caput operations on long strings in 3.14.12.2:
http://www.aps.anl.gov/epics/tech-talk/2012/msg01693.php
Mark
________________________________________
From: [email protected] [[email protected]] on behalf of Mark Rivers [[email protected]]
Sent: Thursday, December 12, 2013 11:40 AM
To: Matt Newville
Cc: [email protected] >> [email protected]
Subject: Re: pilatus detecotr modify FileName problem
Hi Matt,
I don't recall that problem. If it existed it would almost certainly have been in asynPortDriver (part of asyn) and not in areaDetector itself. I was using IDL to set waveform strings almost from the start of areaDetector and it worked.
The one problem I do recall was quite recent and had to do with clients getting callbacks with such arrays which were not null terminated because they specified a length. I recently changed asyn so that it includes the null terminator in the callback and in the byte count. As I recall camonitor was such a client but it was also fixed by Ralph Lange.
Mark
Sent from my iPhone
> On Dec 12, 2013, at 9:12 AM, "Matt Newville" <[email protected]> wrote:
>
> Hi Mark,
>
> Do you recall a version of areaDetector where this (sending a short
> string, but NULL terminated) didn't work? I don't remember this
> being a problem, but if the version of base is up to date, it's the
> only thing I could think of so far for why it wouldn't work...
>
> --Matt
- Replies:
- Re: pilatus detecotr modify FileName problem Matt Newville
- References:
- pilatus detecotr modify FileName problem 洪春霞
- RE: pilatus detecotr modify FileName problem nick.rees
- Re: pilatus detecotr modify FileName problem Bruce Hill
- Re: pilatus detecotr modify FileName problem Matt Newville
- RE: pilatus detecotr modify FileName problem Mark Rivers
- Re: pilatus detecotr modify FileName problem Matt Newville
- Re: pilatus detecotr modify FileName problem Mark Rivers
- Navigate by Date:
- Prev:
Re: pilatus detecotr modify FileName problem Mark Rivers
- Next:
RE: areaDetector patches Mark Rivers
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
<2013>
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: pilatus detecotr modify FileName problem Mark Rivers
- Next:
Re: pilatus detecotr modify FileName problem Matt Newville
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
<2013>
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|