Martin Spott writes: > Yep, I already read this, but I'm not shure about the the data format of the > values I have to put in there. > > I assume the bools have exactly one bit anytime but how large are the > variable values .... or with other words: Won't I have to worry about the > platform FlightGear is currently running on ? I suspect 'double' and 'int' > will differ and the whole stuff depends on the CPU's byte order, so I have > to take serious bit-shifting into account, when running the application on > different platforms. > > Is an EOL the correct ending of a set of control data over a socket or > serial line ? > > Thanks for dealing with this,
One big question is what language/platform are you connecting to? The easiest thing to do would be to write the other application in C/C++ and just use the exact same structure. If you look at the socket calls you will see that you provide a buffer and a length and it will fill it in with the network data. You may have to worry about endianess if you are communicating between two different architectures, but in this case, the code converts to/from network byte order so that shouldn't be a problem. The whole task is probably a lot easier than you are making it out to be. :-) If you want to know the size of different structures such as bool or int or double, there is a function in C/C++ called sizeof(). So you could do something like "cout << sizeof(bool) << endl;" I believe the answer is printed in bytes. Curt. -- Curtis Olson IVLab / HumanFIRST Program FlightGear Project Twin Cities curt 'at' me.umn.edu curt 'at' flightgear.org Minnesota http://www.menet.umn.edu/~curt http://www.flightgear.org _______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
