Graphics.DCOMMPatch071120ReleaseNotes - lordmundi/wikidoctest GitHub Wiki

DCOMM Patch 071120 Release Notes

DCOMM 071120 Patch - EDGE Compatible Version 1.1

On this page… (hide)

  1. 1. Changes
  2. 2. Requirements
  3. 3. Download
  4. 4. Installation
  5. 5. Caveats
    1. 5.1 Multicast -vs- Direct Comm
  6. 6. Usage
    1. 6.1 Linking DCOMM In A Trick Sim
    2. 6.2 Using Direct Comm With A Trick Sim
    3. 6.3 Using Direct Comm With A Doug Client
    4. 6.4 Deactivating Multicast
    5. 6.5 DCF_NumClients(): Accessing The Number Of Clients
    6. 6.6 DCF_SetPosD(): A double precision compliment to DCF_SetPos()
    7. 6.7 Overriding The Manager Broadcast Address

1.  Changes

  • Fixes
    • Eliminated symbol conflicts with the Trickcomm library
  • New Features
    • 64 bit support
    • Direct comm (hard-coded IP address) for client connection
    • New function calls, DCF_NumClients() and DCF_SetPosD()

2.  Requirements

This update is only meant to work with EDGE v1.1.

3.  Download

This update is currently available in the download section for people with permissions. Contact your simulation provider or your graphics integration lead if you are not in the download group.

4.  Installation

Unpack the dcomm patch into the EDGE toplevel directory.

$ cd $DOUG_HOME
 $ tar -xzvf EDGE_v1.1_dcomm_patch_071120.tgz

5.  Caveats

5.1  Multicast -vs- Direct Comm

By default, DCOMM uses multicast for establishing comm between client and manager. Multicast is preferable when possible since it requires no hard-coded IP dependent configurations; however, there are cases where it is not possible to use multicast (such as running between different networks). The new direct comm features allow users to work around these cases.

6.  Usage

6.1  Linking DCOMM In A Trick Sim

Modify your sim to pick up the correct libraries. Example:

# Example line in ${HOME}/.Trick_user_cshrc
 setenv TRICK_USER_LINK_LIBS "-L${DOUGCOMM_HOME}/lib_${TRICK_HOST_CPU}"

6.2  Using Direct Comm With A Trick Sim

If you elect to use direct addressing for comm (not required for most people), set the "SERVER_ADDRESS" environment variable to the IP address of the machine that the Doug manager runs on, e.g.

$ setenv SERVER_ADDRESS 192.168.0.3
 $ ./S_main_Linux_3.4_234_x86_64.exe RUN_test/input

NOTE: Direct comm also uses the SERVER_PORT environment variable. A default value is set in the .doug_cshrc, which is normally sourced before running the simulation. If there is a need to set it, it must be set to the same value as $TCP_PORT.

6.3  Using Direct Comm With A Doug Client

NOTE: For EDGE versions 2.3 and above, this is now easier. Follow the steps outlined in the article "Connecting Clients To Manager Without Multicast".

For versions of prior to EDGE v2.3, to instruct Doug clients launched by the "run_client" script to use direct comm (again, not required for most people), add/merge the following block settings at the very bottom of your ${USERDATA}/user.cfg:

SOCKET_COMM
{
    CONFIGS
    {
        server_address      <doug manager ip address: e.g. 192.168.2.252>
        server_port         ${TCP_PORT}
    }
}

NOTE: If "server_address" is set while using multicast, the manager will broadcast it instead of its internal default. Clients, on the other hand, use the address for direct connection to the manager. When manager and client share the same config file, it is instructive to understand that when you "configure the client to run direct comm", you are simultaneously overriding the manager's internal default broadcast address. Read below about the Broadcast address override for more info.

6.4  Deactivating Multicast

To stop the manager from broadcasting the connection info, add/merge the following to the very bottom of userdata/user.cfg:

SOCKET_COMM
{
    CONFIGS
    {
        server_multicast    0
    }
}

Note: There is no need to turn off multicast to enable direct comm mode from the clients. You would only need to disable multicast from the manager if it was causing some sort of error on your system or violating some sort of policy.

6.5  DCF_NumClients(): Accessing The Number Of Clients

A new function, DCF_NumClients(), has been added to the DCOMM library. This function will return the current number of clients that the server is servicing. This function may be called from the server or from a client.

For example:

int num_clients ;

        num_clients = DCF_NumClients() ;
        printf("There are %d clients\n",num_clients);

6.6  DCF_SetPosD(): A double precision compliment to DCF_SetPos()

A new function, DCF_SetPosD(int node , double pos3), has been added to the DCOMM library. This function will set the position of the specified node to the specified position, where the position is a 3 element array of doubles (x,y,z). This function acts as a double precision compliment to the DCF_SetPos function.

6.7  Overriding The Manager Broadcast Address

In some cases, the manager may broadcast the wrong address. A common reason is when the machine resolves it's own address to the loopback address (such as 127.0.0.1 or something similar).

The real solution to this problem is to edit your host table (/etc/hosts) and make an entry that has the machine name mapped to the real network IP.

If for some reason this is not a possibility (no root access to edit the file, for example), then you can override the address that the server broadcasts. Add/merge the following to the very bottom of userdata/user.cfg

SOCKET_COMM
{
    CONFIGS
    {
        server_address      192.168.2.252
        server_port         ${TCP_PORT}
    }
}