20,741
edits
m (+-cat: Software → FlightGear) |
m (→Binary protocol parameters: https://www.mail-archive.com/flightgear-devel%40lists.sourceforge.net/msg33545.html) |
||
Line 166: | Line 166: | ||
<byte_order>network</byte_order> <!-- default --> | <byte_order>network</byte_order> <!-- default --> | ||
</syntaxhighlight> | </syntaxhighlight> | ||
if your generic protocol file specifies | |||
<syntaxhighlight lang="xml"> | |||
<binary_mode>true</binary_mode> | |||
<byte_order>network</byte_order> | |||
</syntaxhighlight> | |||
your receiver (or sender) code also have to use that encoding convention. | |||
The encoding used by the generic protocol is independent of the output | |||
channel you choose (file, TCP socket, UDP socket, serial port or | |||
whatever). | |||
If you are unsure about what encoding FG uses for | |||
binary data src/Network/generic.cxx is the place to find out. It is | |||
pretty much standard for the basic types as far as I know, though. | |||
Network order is MSB first (as is host order if your system is big | |||
endian but that is not so common these days). If you use host order and | |||
both your systems have the same endianness (and you only care about | |||
your use case) you don't have to worry about this. | |||
== Variable Parameters - <chunk> spec == | == Variable Parameters - <chunk> spec == |