Skip to content
This repository has been archived by the owner on Jan 14, 2023. It is now read-only.

How are unsigned integers being stored in rosjava messages? #3

Open
chadrockey opened this issue Sep 24, 2013 · 1 comment
Open

How are unsigned integers being stored in rosjava messages? #3

chadrockey opened this issue Sep 24, 2013 · 1 comment
Assignees
Labels
Milestone

Comments

@chadrockey
Copy link

@damonkohler @stonier

It looks like uint32 and uint64 are being stored in the same integers as their signed counterparts: int and long. Can anyone confirm that's the case?

https://github.com/rosjava/rosjava_bootstrap/blob/hydro/message_generation/src/main/java/org/ros/internal/message/RawMessage.java#L112

Java doesn't have unsigned integers, so at the very least uint16 should be stored in an 'int' and uint32 should be stored in a 'long', and uint64 should be...???

@ghost ghost assigned damonkohler Sep 24, 2013
@chadrockey
Copy link
Author

Looks like this is the case with time as well:
Represented in C++ as uint32_t:
http://docs.ros.org/api/rostime/html/classros_1_1TimeBase.html
And in ROSJava as int: (32 bit signed):
https://github.com/rosjava/rosjava_bootstrap/blob/hydro/message_generation/src/main/java/org/ros/message/Time.java#L43

@damonkohler You're on a deadline to resolve this issue within the next 25 years.
http://en.wikipedia.org/wiki/Year_2038_problem

@stonier stonier added this to the ToDo milestone Jun 29, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants