StuartWhelan Posted June 15, 2003 Report Posted June 15, 2003 Quick question here... It WideFS a simple passthrough conduit to FS, or does it cache data locally? Is there any 'recommended' polling frequency for applications using WideFS? Currently I poll ever 100ms for anything I am displaying as a gauge or numeric value, and once ever 500ms for other stuff such as local QNH, Control configuration, parking brake and altitude.. Is there a log setting I can use to see if I am thrashing widefs? Okay, so that is more than one question.
Pete Dowson Posted June 15, 2003 Report Posted June 15, 2003 It WideFS a simple passthrough conduit to FS, or does it cache data locally? I think this is documented, but in case not, here goes: WideClient maintains a memory map of all of the locations ever requested since it started running. When the values are requested by the client applications, it gets data from there and gives it to the client in a direct response. If there are data items which have not been requested before, it also sends appropriate requests to WideServer, whilst supplying the default value in its memory to the applications (this would be zero). There is an option in the INI ("WaitForNewData") which actually stops this return until WideServer has sent the newly requested data -- this is actually enabled by default with a 500 mSec timeout. See the DOC. Except for Write requests from clients, the Network traffic is totally controlled by WideServer, which maintains details of all data items requested by each client, separately, and monitors these for changes. This latter is done at FS frame rates. Only changes are sent out. If a connection dies or closed, the list for that client is cleared (by both ends) and the process starts over. Is there any 'recommended' polling frequency for applications using WideFS? No. It doesn't really matter, but if you are operating something graphical to run at FS speeds then you probably should try to match average frame rates, for smoothness of your displays. WideServer works better if you limit FS's frame rates to a bit less than its average performance in any case (as documented), so you would, say, set the FS limiter to 35 or 30 or 25 fps (according to processor) and poll WideClient at that sort of frequency. Of course, if your program does a lot of processing or heavy graphics, or is sharing the client PC with other such applications, you might not be able to or want to achieve such a frequency. Currently I poll ever 100ms for anything I am displaying as a gauge or numeric value, and once ever 500ms for other stuff such as local QNH, Control configuration, parking brake and altitude.. Really, since WideClient is supplying these from memory, directly, there's no benefit from splitting them like this. WideServer will be sending all the changes anyway. You'll just be skipping some. 100mSecs is only 10 fps, which would be too slow for smooth graphics. Project Magenta achieves FS frame rates quite easily, even with up to half a dozen client PCs running it. See the Jet Cockpit at PFC (http://www.flypfc.com). Is there a log setting I can use to see if I am thrashing widefs? You don't have any control over the Network operations, excepting how you write things. Certainly you should optimise writes. Don't keep writing the same values to the same places, only write what you need to write, and don't write that frequently that things bog down. But when you are reading you are not affecting anything on the Network. Provided you don't actually ask for any data you don't need (for once you have it will be monitored for changes and all changes sent), then it doesn't matter. Of course, if your program is also supposed to run well on the FS PC you have to consider the affect you may have on FS's performance. But there's a lot of other factors there apart from calling the IPC interface. Regards, Pete
StuartWhelan Posted June 19, 2003 Author Report Posted June 19, 2003 Many thanks once again Pete! I did have a very good hunt through the WideFS docs before I posted, and again just now, and I can't see any of the info you just explained (whew, I hate it when I bother you for something explained in the docs. :) ) I appreciate the time and effort that went into your explanation, it has cleared this up considerably. Thanks again! Stuart.
Pete Dowson Posted June 19, 2003 Report Posted June 19, 2003 I did have a very good hunt through the WideFS docs before I posted, and again just now, and I can't see any of the info you just explained Hmm. I'll take a look myself. Maybe it is only by implication. If you found the question and answer sequence above useful, maybe I'll add it as it stands into the DOC (without your name of course! ). Regards, Pete
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now