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  2009  2010  2011  <20122013  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  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Long string support in CA clients and device support
From: Andrew Johnson <[email protected]>
To: "J. Lewis Muir" <[email protected]>, "Tech-talk" <[email protected]>
Date: Thu, 15 Nov 2012 11:43:07 -0500
Hi Lewis,

On 2012-11-15 J. Lewis Muir wrote:
> 
> The problem with this logic is that you're thinking of a waveform
> record's VAL field as a C string.  

Sorry, but I'm not.  I understand that waveform records can hold all kinds of 
data, but I'm not asking this to be done for me personally.  Think of my 
recommendation as asking for a safety railing on a cliff-top.

> Another problem with including the NUL byte is that if I fetch a
> waveform record's VAL field from another language, say Java, I now have
> to do extra work by checking to see if the NUL byte is included and
> throw it away if it is; it's a totally bogus character in this context.

You'll have to do that anyway, because if you point your Java client using the 
$ field modifier at an 80-char CALC field or a link address you *will* get a 
Nil byte in it that terminates the string.  With the current code that Nil 
byte may be followed by non-Nil data from previous contents of that field 
(because the field modifier code doesn't support dynamimc sizing yet anyway), 
so code that converts a char array into a non-C string must stop at either the 
first Nil or the end of the array.

Until we added dynamic array sizing CA could only give you ca_element_count() 
characters with Nil values used to fill up the array after the first NORD 
characters.

- Andrew
-- 
READ CAREFULLY. By reading this email, you agree, on behalf of your
employer, to release me from all obligations and waivers arising from
any and all NON-NEGOTIATED agreements, licenses, terms-of-service,
shrink-wrap, click-wrap, browse-wrap, confidentiality, non-disclosure,
non-compete and acceptable use policies ("BOGUS AGREEMENTS") that I
have entered into with your employer, its partners, licensors, agents
and assigns, in perpetuity, without prejudice to my ongoing rights
and privileges. You further represent that you have the authority to
release me from any BOGUS AGREEMENTS on behalf of your employer.

Replies:
Re: Long string support in CA clients and device support J. Lewis Muir
References:
Long string support in CA clients and device support Andrew Johnson
Re: Long string support in CA clients and device support Andrew Johnson
Re: Long string support in CA clients and device support J. Lewis Muir

Navigate by Date:
Prev: Re: StreamDevice and sCalcoutRecord.h Pavel Maslov
Next: Re: Long string support in CA clients and device support J. Lewis Muir
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Long string support in CA clients and device support J. Lewis Muir
Next: Re: Long string support in CA clients and device support J. Lewis Muir
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·