On Jul 15, 2005, at 19:33, Benjamin Franksen wrote:
Q: How is a client supposed to find out how to store the data it wants,
so that no information is lost?
...
type = string 1)
| timestamp 2)
| signed (bitwidth) 3)
| unsigned (bitwidth) 3)
| float (float_format)
| struct 4)
| array (base_type, size) 5)
...
please stop going back to this
useless enumeration scheme again, it won't work.
Hi:
I guess I don't understand how this type description is
fundamentally different from a type enum.
Is it mostly about the array-identifier
being combined with base & size, not requiring
another call after getting an "array" type-enum?
Or is it about signed(bitwidth) instead of int8, int16, int32, int64
and not being sure if we should already include int128?
To get it, I probably need a usage example that shows
why the enum doesn't cut it.
Q2: Now that you know the type, how do you get the data?
Do we all agree that the client has to allocate the storage?
Or is anybody proposing to use C++ RTTI or Java introspection:
Object getData(property_id what)
and then you check if result.getClass() == Integer or ...?
Does the client need a handle to the raw data?
Probably asking for trouble.
Does the client ask the data source to (maybe convert and) deposit the
value
into the client's storage, by exposing/traversing as in the dataAccess
proposal?
That's basically the same as using methods
getDataAsDouble(property_id what, double *my_double_storage)
getDataAsInt(....., int *...)
getDataAsString(..., string *my_string_storage)
/* for C++, they could all be called "getData", overloaded for the
different types */
Then I'm not sure how getDataAsString
is supposed to handle number -> string conversions.
Would it include units? What precision is used?
Would that be controlled by the client,
or would a client who cares have to request the numeric data as a
number,
together with e.g. the units and then sprintf the data itself?
Thanks,
-Kay
- References:
- Network Accessable Types Marty Kraimer
- Re: Network Accessable Types Benjamin Franksen
- Navigate by Date:
- Prev:
Re: Network Accessable Types Benjamin Franksen
- Next:
Re: Network Accessable Types Marty Kraimer
- 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: Network Accessable Types Benjamin Franksen
- Next:
Re: Network Accessable Types Marty Kraimer
- Index:
2002
2003
2004
<2005>
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|