ThorstenB
51f16337c2
#903 : generic protocol: fix a rare corner case
...
ASCII protocols consisting of a single chunk only (one variable per line)
would not work when no "separator" was defined.
Also add error message for protocols with more than one var per line which
are missing a separator...
2012-11-01 14:42:26 +01:00
James Turner
39307d335c
Avoid an 'overloaded-virtual' warning.
...
Clang reports an overloaded-virtual in FGGeneric (and it's correct). Rename the overload to avoid both the warning and confusion.
2012-09-18 00:59:36 +01:00
ThorstenB
39a7caae15
Proper error checks for generic protocol.
...
Drop FGGeneric instances which failed to initialize to avoid run-time
issues.
2012-07-13 20:33:36 +02:00
ThorstenB
e59fabaf82
Clean-up some SGMath dependencies.
2012-05-05 00:56:29 +02:00
ThorstenB
511072f206
protocol module: minor clean-up
2012-02-19 14:57:25 +01:00
Thomas Geymayer
ccf15ac97e
Remove unneeded function and add bool relative changes
2012-02-19 14:53:04 +01:00
Thomas Geymayer
4ec6810c29
Support relative changes and wrapping for generic protocol input.
2012-02-19 14:53:04 +01:00
ThorstenB
d47342a5a4
Add --log-class option, improve logging classes.
...
Replace SG_GENERAL by more specific log classes in many places.
Allow "," to separate logging classes (using "|" is odd on the
command-line).
Also add new option to make logging more useful for developers.
You can use:
--log-level=debug --log-class=environment
to only get environment debug messages, or
--log-level=debug --log-class=sound,ai
to only get debug messages related to the sound or AI subsystem.
2011-12-11 14:06:17 +01:00
ThorstenB
5bd8828fe6
Allow bidirectional support for generic interfaces.
2011-08-10 00:05:10 +02:00
Torsten Dreyer
0114fd962e
Fix broken tank properties. More verbose generic protocol error messages
2011-03-22 18:00:55 +01:00
Csaba Halasz
ae8438333c
Quick fix for ascii generic input line separator problem
2011-03-06 02:38:39 +01:00
James Turner
94a3471956
Merge commit 'refs/merge-requests/7' of git://gitorious.org/fg/flightgear into topics/merge7
2010-10-19 09:05:51 +01:00
James Turner
84b45683fc
Refactor exit code, so the osgViewer gets 'done'.
2010-09-30 23:13:11 +01:00
Thorsten Brehm
5a7f838ff2
Fixed all type-casts violating the strict-aliasing rule.
...
=> Removes compiler warnings and optimization problems.
2010-09-27 23:48:20 +02:00
ehofman
d0f6f748ed
Improve handling of type DOUBLE in generic i/o protocol.
2010-02-10 15:02:49 +01:00
ehofman
6072e3d969
reorganize the code a bit to prevent an infinite loop in ascii mode
2010-02-10 15:02:42 +01:00
torsten
949981a6d7
only complain about binary record length mismatch if mode is binary.
2009-09-18 10:38:34 +02:00
curt
606f9173b2
Avoid strtof() for portability reasons.
2009-09-12 15:47:52 +02:00
curt
bf423ef0ca
Handle "double" type fields correctly for ascii input data. Previously double
...
data was being down-cast to float and the loss of precision impacted data types like lon/lat positions dramatically, preventing smooth replay of data.
2009-09-12 15:47:52 +02:00
ehofman
1fa48722b4
One last update; remember whether input or output is requested. This will make sure FlightGear isn't communicating in both directions all the time.
2009-09-09 08:56:31 +02:00
ehofman
aeefd12522
Don't forget to clear the previous configuration
2009-09-09 08:56:31 +02:00
ehofman
ea4a3ee1df
Make FGIO a proper subsystem and add a reinit method for the generic protocol. This should allow for easy runtime reloading of the configuration file.
2009-09-09 08:56:31 +02:00
Tim Moore
be4b46b894
change back unsigned byte count to signed (multiplaymgr)
...
Also, small fixes to generic protocol from AndersG
2009-08-27 00:12:44 +02:00
Tim Moore
62620177aa
Fix transmission of float and double values in generic protocol
...
gcc -Wall -Werror turned up some problems with the type-punning of pointers
used to write the message buffer; it turns out that truncated ints were being
written to the message buffer when values needed to be swapped to network byte
order.
2009-08-24 18:06:06 +02:00
ehofman
a4a593745e
Hopefuly fix what might be a 64-bit OS problem
2009-07-12 00:55:33 +02:00
ehofman
f5ab3756a1
although the official name is 'bool' also support 'boolean' for backward compatibility.
2009-07-02 08:59:16 +02:00
ehofman
38d538cdb8
Add the statement about the wrong received-buffer size again which might be a useful debugging tool.
2009-07-02 08:59:16 +02:00
ehofman
0dfd7b8024
If more than one packet has arrived in the mean time, process them all.
2009-07-02 08:59:16 +02:00
fredb
00d7c1865f
Suppress warnings
2009-07-02 08:59:15 +02:00
ehofman
a9c47a7b78
split up binary and ascii message handling functions, mostly for readability
2009-07-02 08:59:15 +02:00
ehofman
36f8519973
* Add proper support for float and double values
...
* properly honour network byte order on little-endian and big-endian systems
* various cleanups and bug-fixes
2009-06-23 10:54:09 +02:00
ehofman
30e925bb38
Anders Gidenstam:
...
Add support for generic binary input.
This patch has been sitting in my source tree since 2007.
2009-06-23 10:54:09 +02:00
timoore
0d0bd58268
Allow generic file protocol to terminate fg after a number of repetitions.
2008-08-07 22:24:47 +00:00
mfranz
306b818490
generic/output:
...
- support optional <preamble> and <postamble> which are written right
after opening and before closing respectively. This can be used for a header
line or an XML header.
- unescape <preamble>, <postamble>, <format>, <line_separator>, <var_separator>
so that \t, \n, \r, \f, \v, \xnn, \nnn can be used directly (\a and \b are
ignored; use \\ for the backslash) The long names ("carriagereturn") are still
supported for <var_separator>, but one can just use \r, or \r\n too.
- don't abort when a chunk doesn't have a <node>. This is useful for adding
constant chunks which consist only of a <format>, such as XML tags.
2007-07-29 13:58:58 +00:00
mfranz
80bada55cd
remove redundant vector::clear(). A just created vector *is* clear.
2006-07-05 09:39:46 +00:00
ehofman
f531203951
Add binary output support for the generic protocol.
2006-04-29 12:17:30 +00:00
mfranz
e8c2b8c9f4
--warnings
2006-03-09 21:41:51 +00:00
mfranz
c9813d1b5d
new FSF address
2006-02-21 01:16:04 +00:00
fredb
36e4045810
Add missing include files needed by the new math code under windows
2006-02-18 13:58:09 +00:00
curt
d05121ef46
Fix my mailing address by replacing it with my web page.
2004-11-19 22:10:41 +00:00
ehofman
fc2bf98122
prevent a segmentation error under certain circumstances.
2004-10-16 11:24:48 +00:00
ehofman
359fb0d3b7
Fix some bugs
2004-10-15 12:23:36 +00:00
ehofman
ca31288e64
Set the format default to float instead of int.
2004-10-15 11:29:09 +00:00
ehofman
ebae60a00b
Add generic input support
2004-10-15 11:11:37 +00:00
ehofman
99a7850cc7
Add a few else statements to make the checking work correct. Thanks Tiago Gusmao for detecting this.
2004-07-27 16:35:34 +00:00
curt
2acdd02879
Clean up various compiler warnings that have crept into the code. This
...
by no means get's them all, but it's a start.
2004-04-01 15:27:53 +00:00
david
633e0fde43
Be a little quieter at the default debug level.
2004-02-07 21:37:35 +00:00
ehofman
980012e168
Move FGEventMgr and FGSubsystemMgr over to SimGear, add SGEventMgr to FlightGear's globals structre and some small code cleanups
2003-09-24 17:20:55 +00:00
ehofman
a3fb470f7c
Fix a bug where a test was perfromed on a variable that wasn;'t even initialized (and wrong) and add support for tab and space as a seperator
2003-08-18 09:26:26 +00:00
ehofman
f1dddc9298
Chnage seperator to separator
2003-06-22 07:58:04 +00:00