On Jul 20, 2005, at 11:12, Andrew Johnson wrote:
example where you actually need to destructively update a string..
stringCalc record...
...message-based device has to be able to create a new message every
time it processes
Very good examples!
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 *.
...segmented string requirement ... CA network input buffer, without
having to copy the character data at all
You're right that the string might arrive in pieces.
Just like the bytes of a double could be wrapped around
the network buffer boundary.
For a double, we expect CA to assemble the pieces back together
and hand us a usable number.
For the string, the end user also most likely needs the whole string.
Do you leave the assembly of strings, which logically ought to be hidden
in the network/middle ware layer, to the user?
-Kay
- Replies:
- Re: Standard String Andrew Johnson
- References:
- FW: Standard String Jeff Hill
- Re: FW: Standard String Benjamin Franksen
- Re: Standard String Kay-Uwe Kasemir
- Re: Standard String Andrew Johnson
- Navigate by Date:
- Prev:
Re: Type descriptor vs. enum Marty Kraimer
- Next:
RE: Type descriptor vs. enum Liyu, Andrei
- Index:
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: Standard String Andrew Johnson
- Next:
Re: Standard String Andrew Johnson
- Index:
2002
2003
2004
<2005>
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|