[Rxtx] termios.h defines ... JNA related
Kustaa.Nyholm at planmeca.com
Wed Aug 18 11:45:21 MDT 2010
toying with the JNA approach, one of the issues is how to handle the #defines like B19200 etc etc.
It is of course trivial to have them as constants on the Java side, but there are a few details that
will affect how this is best approached.
On Mac OS X B19200 has the value on 19200 where as on one Linux it has the value of 16.
How much the different Linux constants differ or can we assume that across Linux:es they are the same?
The size of some fields in 'struct termios' is size_t according to POSIX, which makes them depend on architecture.
Handling this is trivial with JNA but what about the values in those fields?
Is it conceivable that the values are different depending on architecture (on the same OS)?
Like Mac OS X has i386 (32 bit) ppc (32 bit) and x86_64 (64 bit) architecture and I presume the size
of for example c_flags in termios struct is different depending on the architecture (maybe it is not?)
but what about the values?
More information about the Rxtx