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: Network Accessable Types
From: Kay-Uwe Kasemir <[email protected]>
To: EPICS Core Talk <[email protected]>
Date: Sat, 16 Jul 2005 00:37:32 -0400
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  <20052006  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  <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 ·