I've changed the subject of this to better reflect what it is about, and 
am responding on both users and developers lists so that the original 
audience will still see it.

I suggest that future follow ups be on just the developers list.

I do seem to recall a prior discussion about data types, but since I 
don't keep files of such things, I don't have a pointer to it and I 
could easily be mistaken.

While using doubles to get higher precision would be a solution, it is 
aesthetically nasty for us purists. Why would one use a floating point 
number for something that is inherently an integer? Also, one could 
easily imagine porting HAL to a platform where floating point arithmetic 
has significantly higher cost than integer arithmetic. For example, some 
of us are thinking about a split where the HAL layer would be moved to a 
remote controller using (say) an ARM processor.

The general answer to the issue of integer typing is that the C standard 
(at least the older versions I'm familiar with) does not say that an 
integer is 32 bits. I've worked on platforms where an int was 16 bits, 
and I can imagine machines where it might be eight or 64 bits.

My answer to the issue of more precision for encoders would be to use a 
type hal_s64. That would be defined as a long long on the machines I 
usually use.

I'm aware that there are some "standard" definitions for such types that 
do not have "hal" in the name.  The kernel source is full of things like 
  int32, s32, _s32, __s32.  Using hal_s32 makes more sense to me than 
any of those because I can at least figure out where to go to find the 
definition if I ever want to port this.

Ken



paul_c wrote:
> On Thursday 05 June 2008, Stephen Wille Padnos wrote:
>> We've discussed various methods of handling larger data types, which
>> this would require.
> 
> I don't recall ever seeing any discusssion about the usage of "data types"..
> 
>> The good news is that once we have that, we can use 
>> doubles anywhere.
> 
> Please tell us why doubles can not be used throughout.
> 
>>>  Do any of the other encoder interfaces use the same 32-bit integer value?
>> Yes, since a hal_s32 is a 32-bit int ;)
> 
> So why not use a standard int rather than hiding behind some @$&! naming 
> scheme ?
> 
> 
> 
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users

-- 
Kenneth Lerman
Mark Kenny Products Company, LLC
55 Main Street
Newtown, CT 06470
888-ISO-SEVO
203-426-7166

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to