Graphics.ManagerSetup - lordmundi/wikidoctest GitHub Wiki

Manager Setup

« Running standalone | EDGE User’s Guide | Running with a Simple Scene »

Simple directions

  1. Run the "run_manager" script on the machine that will act as the comm server
  2. Run the "run_client" script on all other machines that will run a visualization of the shared scene
  3. Make sure that multicast is enabled between the machines so that the discovery of the server can occur (i.e., make sure that you are logged in as the same user on all the machines, the machines are on the same network, and multicast is not being blocked)

What's really going on

EDGE has the capability to run with a manager process embedded, or it can be run separately. The stand-alone manager is a non-graphical process that acts as a EDGE comm (dcomm) server and serves the tree to all connected clients and accepts commands to change the tree.

To trigger the manager process, the "-server" option is sent to the dcomm plugin on the command line. When running a combined client/manager setup (i.e. single machine, single process), this is enough.

When running the manager separately using the dsp_manager executable, the config file block labeled "MANAGER" is read and used. Only plugins and options that manipulate the tree and read in models are really needed here since there are no visuals.

The most important piece of information that lets the clients and manager connect is the SOCKET_COMM parameters. These are usually set in a SOCKET_COMM block in the config file. The parameters are also normally set using environment variables to make it easy to sync with other clients. A common block would look like:

SOCKET_COMM
 {
   CONFIGS
   {
     mc_tag        ${MC_TAG}
     tcp_port      ${TCP_PORT}
     mc_port       ${MC_PORT}
     mc_group      ${MC_GROUP}
     uds_node      ${UDS_NODE}
   }
 }

These parameters are crucial in connecting clients to the manager. They must match. The manager will broadcast the parameters on the network (via multicast) and if a client sees matching parameters, they will negotiate a connection to the manager.

Having said that, these parameters are also crucial to not connecting to other people's manager and changing their scene! Make sure they are different if you want to avoid this.

Commonly, these parameters are set as follows:

# DComm Stuff
 setenv MC_TAG   cev_comm_${USER}
 setenv MC_PORT  12342
 setenv MC_GROUP 225.0.0.48
 setenv TCP_PORT 7010
 setenv UDS_NODE /tmp/cev_comm_${USER}

Notice the _${USER} appended to the tag. This means that users will only connect to managers that are started by them. Obviously, sometimes this is not what you want, but it works in most instances.

Set the variables according to your situation. They are defaulted in the edge_settings.cfg file and can be overwritten in the "$USERDATA/user.cfg" DEFINES block. Hostnames can also be used in variable form to keep things from connecting to different machines.

If you wish to bypass multicast discovery of the manager and just specify the IP and port of the manager directly to the clients, please see the article "Connecting Clients To Manager Without Multicast".

« Running standalone | EDGE User’s Guide | Running with a Simple Scene »