EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Standard String
From: Benjamin Franksen <[email protected]>
To: [email protected]
Date: Wed, 20 Jul 2005 21:21:28 +0200
On Wednesday 20 July 2005 18:11, Andrew Johnson wrote:
> Kay-Uwe Kasemir wrote:
> > How would you prefer to handle these?
> > a) equip the EpicsString class with all the methods
> >    to change/insert/delete character sequences at any
> >    position in the string
> > b) have a
> >       char buf[...]
> >    where you can to all the character fiddling,
> >    then attach a string interface to that in order
> >    to hand it to the CA Server or other EPICS entity?
> >    So this String class would actually be non-mutable,
> >    it only provides read-access to the user-owned buf.
> >
> > I would prefer b, so we have another example for
> > my case that the most important task of the string class
> > it to interface with char *.
>
> c) Design the string class so that it has an internal API giving
> access to the raw data buffer.  Provide a set of manipulator
> functions that use this API to perform the string operations that we
> need.  Permit anyone else to write additional manipulators for
> operations they need which we haven't implemented.

d) Variant of b): Have a separate class for constructing a string. It 
should maintain a current char[] buffer, so that characters can be 
efficiently appended, but is extensible in size and supports operations 
like DA's streamWrite (with write position at the end only).

On Wednesday 20 July 2005 17:12, Andrew Johnson wrote:
> There is a record type called the stringCalc record, which is used
> extensively by the BCDA group's synApps software (among other things,
> it permits you to interface to new ASCII devices without having to
> write device support).  The VAL field of a stringCalc is string,
> which is regenerated every time the record processes.  I don't know
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> how you would implement this record type if all strings become
> read-only once created.

You already answered your question: The string gets regenerated every 
time. It's a new string, different from the old one. No destructive 
update of the string is necessary to achieve that.

Ben

Replies:
Re: Standard String Andrew Johnson
References:
FW: Standard String Jeff Hill
Re: Standard String Kay-Uwe Kasemir
Re: Standard String Andrew Johnson

Navigate by Date:
Prev: RE: Network Accessable Types Jeff Hill
Next: Network Accessable Data Marty Kraimer
Index: 2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Standard String Andrew Johnson
Next: Re: Standard String Andrew Johnson
Index: 2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Feb 2012 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·