Board index FlightGear Support Interfacing

Generic Protocol Output limit

Connecting two computers, using generic protocol, connecting with Matlab?

Generic Protocol Output limit

Postby joef1993 » Wed Nov 30, 2016 4:10 pm

I'm just curious as to whether anyone knows the limit to the number of variables that can be output via generic protocol? Through trial and error I'm currently finding that FG will start with an generic protocol XML containing around 1700 but anymore and it wont start or will crash shortly after. I've had a search but could not find anything documented.
joef1993
 
Posts: 12
Joined: Wed Oct 19, 2016 11:08 am

Re: Generic Protocol Output limit

Postby Johan G » Sun Dec 04, 2016 10:26 am

That is a lot of properties to log. :o Is there something in particular you need all of those logged for?

I am not aware whether or not there is a limit or some throttling involved.

If you would not mind reading source code, I have tried to link to the relevant header and source files at the end of the FlightGear wiki article Generic protocol (perm).
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Some YouTube videos
Johan G
Moderator
 
Posts: 6634
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit

Re: Generic Protocol Output limit

Postby Hooray » Sun Dec 04, 2016 11:15 am

Given that number of variables, it would make more sense to consider using a binary, and hard-coded, protocol - e.g. refer to $FG_SRC/Network
Apart from that, there's apparently ongoing work to provide a web socket based wrapper to retrieve a whole property tree according to this: https://sourceforge.net/p/flightgear/fl ... d5cd1f422/

Note that regardless of what you end up using, most I/O is taking place in the fg main loop - thus, even if you find that you are able to send hundreds of properties per frame, doing so will inevitably affect your framerate, too.

In general, I guess it would make more sense to tell us exactly what you are doing - for instance, usually, it might be much better to selectively send properties, e.g. only if they've been updated - see the telnet subscribe/unsubscribe commands for example. Those would be easy to re-implement on top of a binary UDP based protocol to implement a simple PUB/SUB mechanism.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU


Return to Interfacing

Who is online

Users browsing this forum: No registered users and 3 guests