Sign in to follow this  
Guest 2002cbr600f4i

Anyone figure out a way....

Recommended Posts

Anyone figure out a way yet to have 1 SimConnect client app (I work in C#) interact with 2 instances of FSX at the same time (on 2 different machines)? If so, how did you do it? Was there something you had to change in a config file?--2002cbr600f4i

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

>Anyone figure out a way yet to have 1 SimConnect client app>(I work in C#) interact with 2 instances of FSX at the same>time (on 2 different machines)? I wouldn't have thought that could be done. It sounds unlikely. You can change the Port used, I think, in the SimConnect.CFG file, so that can take care of the selection of the appropriate FSX, but how do you run and link separately to two different instances of SimConnect on the client with two different SimConnect.CFG settings?RegardsPete

Share this post


Link to post
Share on other sites

>>Anyone figure out a way yet to have 1 SimConnect client app>>(I work in C#) interact with 2 instances of FSX at the same>>time (on 2 different machines)? >>I wouldn't have thought that could be done. It sounds>unlikely. You can change the Port used, I think, in the>SimConnect.CFG file, so that can take care of the selection of>the appropriate FSX, but how do you run and link separately to>two different instances of SimConnect on the client with two>different SimConnect.CFG settings?>>Regards>>Pete>Pete, Heheh! Hence why I asked! :-)Basically, I'm wanting to see if there's some way I can write a "bridge" between FSX instances so I can do something similar to WideView or Magenta, but using 2+ instances of FSX running on seperate machines with one as the master and the others as slaves. This way you don't have to use any sort of "custom" panels on the slaves to still get gauges and such and it should work for any setup. Just not sure that it's possible to set up SimConnect to interact with multiple FSX instances simultaneously.The other alternative is that I run a small lightweight SimConnect client on each machine and then have the clients talk to each other directly via some other protocol over the wire. This is definitely the more complicated solution though.I'm all ears on other ways to do this though!Edit: I just saw the following in the SimConnect documentation, which leads me to believe that it might be possible to do what I want to do:"Only one version of Flight Simulator can be running on one computer at a time, so a client installed on a local machine will only be communicating with one server. However it is possible to have one client communicate with multiple copies of Flight Simulator, running on a network."The question is, does it mean "multiple copies of FS, running on a network SIMULATENOUSLY" or just that you can write your client to connect to any one of many instances running on the network?--2002cbr600f4i

Share this post


Link to post
Share on other sites

>Basically, I'm wanting to see if there's some way I can write>a "bridge" between FSX instances so I can do something similar>to WideView or Magenta, but using 2+ instances of FSX running>on seperate machines with one as the master and the others as>slaves. This way you don't have to use any sort of "custom">panels on the slaves to still get gauges and such and it>should work for any setup. Just not sure that it's possible to>set up SimConnect to interact with multiple FSX instances>simultaneously.I don't think you need Simconnect or any extra programming to do that -- I think that's the new meaning of 2multiplayer" -- multiple users or PCs flying the same sim.>The other alternative is that I run a small lightweight>SimConnect client on each machine and then have the clients>talk to each other directly via some other protocol over the>wire. This is definitely the more complicated solution>though.That's what I would have have thought WidevieW would give you. I believe it is being re-written to use SimConnect.>"Only one version of Flight Simulator can be running on one>computer at a time, so a client installed on a local machine>will only be communicating with one server. However it is>possible to have one client communicate with multiple copies>of Flight Simulator, running on a network.">>The question is, does it mean "multiple copies of FS, running>on a network SIMULATENOUSLY" or just that you can write your>client to connect to any one of many instances running on the>network?Sorry, I don't know what it means.However, I do think you are possibly missing the point of all the work MS have done on cockpit sharing / multiplayer. However, this is not saomething I've investigated. Why not ask on the FSX forums out there? I still don't think it needs Simconnect applications.Regards,Pete

Share this post


Link to post
Share on other sites

Sorry Pete, I guess I'm not being clear enough (and it's probably because I'm just getting back into FS after many many years away from it, so I'm out of the loop in terms of how a lot of these add-ons work and what's been done in my absense...)I'm wanting to make a cockpit setup. I have multiple pretty decent end machines (A64 4800+X2 as my main rig, an A64 FX-51 and a a64 3200+ laptop as well). What I'd like to be able to do is have the 4800+X2 be the primary machine, running 1 copy of FSX as the "master". On it, I'd set it up to be the "out the window" displays.Then I'd like to have FSX running on both the laptop and the FX-51, and have a simconnect-based client hook the 3 instances of FS-X together so I can pop up the control panel on the FX-51's screen, and the radio stack/GPS on the laptop's screen. Those 2 machines are data slaves to the master. So, the master machine says "we're now at heading 155" that is picked up by the client and then sent to the slave machines so they can update their copy of the sim and refresh the panels accordingly (just like if I pumped in a "set the aircraft heading to 155" on the master). My (granted very limited) undestanding of Magenta and WideView is that they use custom-written panels for their displays rather than taking advantage of a 2nd or 3rd copy of FS running on the slave machines.By doing it the way I want to, you're not running "custom" crafted panels, but the REAL panels from FS because you're really using FS on the slave machines.No, I'm not looking to make a "tandem" or "multiplayer" setup.Maybe I'm wrong though and it is possible to do what I want through the "cockpit sharing" setup. I don't know. I just pulled down the Beta the other night and have started diving into this.Alternatively, something I could see being useful is a client that hooks to 2+ instances of flight sim and does data logging from all of them into 1 log for post-flight analysis (think something similar to the TAC(sp?) Trainer that you see them studying in Top Gun post-flight.) Might be useful to the group aerobatics crowd.Anyhow, just brainstorming here for cool things that I could do with SimConnect. After plodding through the 3 provided C# examples, I think I get how to receive event-driven updates and pull data on demand. I just don't see anything on how to push data/commands into the sim. Hopefully there will be more examples forthcoming.Oh, and Pete, BTW, I feel INCREDIBLY honored that you've taken the time to respond to my posts! Your name is legendary in this arena and even though I've been out of the loop for many years I still know how much work you've put into this community. Thank you!--2002cbr600f4i

Share this post


Link to post
Share on other sites

>... I'd like to have FSX running on both the laptop and the>FX-51, and have a simconnect-based client hook the 3 instances>of FS-X together so I can pop up the control panel on the>FX-51's screen, and the radio stack/GPS on the laptop's>screen. Those 2 machines are data slaves to the master.Yes, I did and do understand all that, but I do really think this should be achievable with the built-in multiplayer or shared cockpit facilities. Just because no one separate from you is actually sitting at the "client" PCs doesn't mean they won't be able to have active gauges on them. As far as I know it is only the main flight controls which are switched between pilot/copilot or whatever. The copilot should be free to operate other switches and so on (tune radios) on one of the "clients" whilst you are flying on the "server" -- actually here, client and server are misnomers, they are probably all conceptually peer-to-peer, it's just that only one is "flying".Just because there's no actual physical copilot doesn't stop the gauges on that PC being used by you.I haven't tried all this, mind, it is just what I undertstand from seeing the demos and reading the blurb. I don't think any of this involves additional applications or SimConnect programming.>My (granted very limited) undestanding of Magenta and WideView>is that they use custom-written panels for their displays>rather than taking advantage of a 2nd or 3rd copy of FS>running on the slave machines.No, WidevieW links multiple running copies of FS. There are no separate panels. However, the data it swaps is normally only enough for views, rather than gauge operations.>No, I'm not looking to make a "tandem" or "multiplayer">setup.Sorry, but that would seem to me to be the complete and ideal answer to what you want. Multiple copies of FSX with different displays and gauges on each yet all flown from one PC. >Maybe I'm wrong though and it is possible to do what I want>through the "cockpit sharing" setup.Exactly. I would have thought it would fit your need like a glove.RegardsPete

Share this post


Link to post
Share on other sites

The beta SDK doco says that it is possible "to have one client communicate with multiple copies of Flight Simulator, running on a network", but there is no clean way of doing this yet.This is because you need a simconnect.cfg config file on the client that has the address and port of the FSX machine you want to connect to, so the only way to connect to multiple clients is to re-write the address and port info in the simconnect.cfg file before each connection you make.I have not tried if this will actually work because I only have FSX installed on one machine so far.

Share this post


Link to post
Share on other sites

Hmmm, nevermind, I should really learn to read the doco better. The answer to the question is the 6th parameter of SimConnect_Open(). This is an index into the SimConnect.cfg file that identifies the configuration to use (and each configuration can have a different machine to connect to).So if for example you have[simConnect.2]Protocol=IPv4Address=192.168.0.9Port=1234MaxReceiveSize=4096DisableNagle=0[simConnect.3]Protocol=IPv4Address=192.168.0.10Port=1234MaxReceiveSize=4096DisableNagle=0in your SimConnect.cfg file and pass 3 as the index in the open call then you will connect to 192.168.0.10 and if you use 2 as the index you will connect to 192.168.0.9

Share this post


Link to post
Share on other sites

>The answer to the question is the 6th parameter of>SimConnect_Open(). This is an index into the SimConnect.cfg>file that identifies the configuration to use (and each>configuration can have a different machine to connect to).Hey, that's really neat! You know, I must have read that several times in the last few months and each time it has simply not sunk in.Thanks!Pete

Share this post


Link to post
Share on other sites

Wow, one thing that comes to mind reading this would be a set up with two (or more) systems running FSX in multiplayer mode, and a "mission" system communicating with them all, so that, for instance, you could have several aircraft doing firefighting, or several helos on a rescue mission to a hot LZ.Really pushes the envelope quite a bit.

Share this post


Link to post
Share on other sites

This is just to add to the discussion, even if a solution exists as above. In the managed world, one way to implement a distributed application is to use .NET remoting especially if you're not into sockets or pipes (it does this for you underneath the hood). For the type of application you describe, it may have some interesting uses in the simconnect / FSX world across multiple machines. Combined with the ability for .NET to create windows services, I've found it to have some interesting possibilities in past projects (although none are FS related).E.M.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this