[Dev] [Scientific] .get inifinity questions

Jamie Bullock jb at integralive.org
Thu Mar 15 18:51:37 GMT 2007


Hi Stephen,

I have moved this thread over to the dev list, as it's probably the
right place for this discussion.

On Thu, 2007-03-15 at 13:57 -0400, Stephen Sinclair wrote:

> I was just looking at the modules/trunk/XML folder.  Looks nice!
> I had a question though, you used the following code:
> 
> <subAttributeCodes>
>       <item code="0">
>         <name>.get</name>
>         <description>Request the current value of the 
> attribute.</description>
>       </item>
> </subAttributeCodes>
> 
> 
> I was under the impression that the decision had been made to go with 
> /get instead, to make programming more consistent.
> 

I remember this also. Although, I guess what the examples are
illustrating is the structure of the XML rather than the content. The
files will eventually be autogenerated, and the content will come from
the Integra database. Whether they end up with .get or /get is just the
case of changing one entry in a lookup table via the web interface.

However, if we all agree on /get, then I guess the examples should be
updated to reflect that.


> More questions, are you using the value 0 in attributeMaxima to 
> represent infinity? 

I don't think so. Henrik might correct me here, but 0 is just a
placeholder here. Again, the actual values in the files will be
populated from the database data, and we have the possibility to
represent inf, -inf and NaN's using a double precision numerical data
type. I guess eventually in the XML files those values will indeed be
stored as strings.

>  Would it not be safer to use some string to 
> represent special values?
> 
> What is the meaning of the "code" attribute for "item"?  Also, what is 
> the need for the "item" tag?
> 

Again, Henrik may correct me, but I think that "code" corresponds to the
lookup code used in the database, and again "0" has been used as a
placeholder. Henrik: if this is the case, perhaps the "code" attribute
can be removed since we are expanding it out in the XML. perhaps <item
name="double"><description>blah</description></item> would be better?


> Thanks, I think this is a good beginning!
> 

It's great to get things moving!

best,

Jamie






More information about the Dev mailing list