Graphics.RunningWithComm - lordmundi/wikidoctest GitHub Wiki

Running with Comm

« Driving Flags Over DCOMM | EDGE User’s Guide | Timeouts On DCOMM Initialization Of Connection »

NOTE: This article only applies for user's running a Trick simulation using the DCOMM model pack distributed with early versions of EDGE

Simple directions

If you want to run with comm to EDGE so that graphics run realtime with the sim, do the following:

  1. Set the "DOUG_HOME" environment variable to the DOUG dir and source the environment:

    setenv DOUG_HOME <path_to_doug_directory> cd $DOUG_HOME source edge_env #(or .doug_cshrc for versions < 2.2)

  2. Add the following to your input file:

    graphics.data.comm.active = True;

What's really going on

When running with comm active, this will cause the "drive" routines to be invoked, as well as the comm init job to initialize comm with the sim. When initializing comm, the library will look on the network for a server that is broadcasting the info specified in the comm environment variables. This is why we have to source the .doug_cshrc file above.

NOTE: A new version of comm that can connect to a server directly via IP and bypass multicast discovery is in the works, but is not yet available. —FG

frankie February 04, 2008, at 04:03 PM: It is available now in EDGE with version "EDGE_v1.1_DCOMM_071120". You can see documentation on how the new updates work here. For EDGE v2.3 and above, this is even easier - see the article "ConnectingClientsToManagerWithoutMulticast".

Also, the comm library will try to open the config file pointed to by $DSP_CONFIG_FILE, which is another reason we source the .doug_cshrc and set the DOUG_HOME variable. It will open this config file so it can read the DSP_SCRIPT→FLAGS block and get the definition of the FLAG bits that the server is using.

If the comm library doesn't see a server, it will block with a message saying it is listening for a server. If you run into this, make sure the MC_TAG, MC_PORT, MC_GROUP, and TCP_PORT environment variables all match between client and server. Also, if you are still not connecting, make sure the two machines can pass multicast to one another. You can do this by using this multicast test program.

Note that right now, for orbital sims, the preferred method is to use the DOUG comm libraries method. With the new TRICK variable server capabilities that exist in TRICK 07 though, we expect to begin converting over sim to graphics comm to the new variable server. —FG

« Driving Flags Over DCOMM | EDGE User’s Guide | Timeouts On DCOMM Initialization Of Connection »