Simple Example of Live-Net Emulator for UDP Message Pass-through

This is a simple example package demonstrating how UDP packets can be passed from real applications, through a simulated network, and back out to other real applications. It models a very simplified wireless network, although it can also be attached to more advanced models of wired networks and mixed wireless network models. It is an example of Simulator-In-The-Loop emulation which integrates models with real applications or systems.

The simple wireless network model in this example does not posses detailed terrain and propagation models, or network interference and queuing models. However, the underlying layers are similar to what is used in complex projects.

This example has 48 mobile radio nodes. It includes an example message generator application, called upclient, and an example application for receiving the messages after passing through the simulated network. The receiving application is called receive_server. When a real message is generated and sent through the simulation it enters a radio model and simulates the message passing through the network to the destination node. When/if the destination node receives the message, it outputs the message to the receive_server application via socket communications. The socket ports are configured in the comm_setup.txt file.

There is also background messaging being simulated and displayed as Black lines. The actual live UDP messages are displayed in Red.

The example manual message generator (upclient) is included, to send messages into the model, as well as a receiver (receive_server) that receives the output messages from the model. These two programs also read the comm_setup.txt file to get the respective in/out port numbers. You can change the port numbers by editing the comm_setup.txt file, and when you restart all three programs, they will use the new port numbers.

Usage:

  1. In one window, start the Receive-Server first:
            receive_server.exe &
    It will begin waiting for messages.

  2. In another window, start the network model simulation by typing:
            sim.exe -batch &

  3. Now you can upload messages into the model by typing:
            upclient.exe {sim-host} 0 {text message}
    Example:
            upclient.exe localhost 0 Hello World Test
You will see the message progress as Red links in the SimView GUI, and appear at the receive_server. Temporary Black links continuously show simulated background traffic. All successfully transferred messages, are logged in the received_message_log.txt file.

You can, of course, feed this model from any UDP source, and/or feed the model's output to any server.

To kill the "receive_server", send the message "terminate-session", or type "killall receive_server.exe".

(This example has not been optimized for communication speed.)

Compiling:

This package comes with executables pre-compiled for Linux.
To re-build:
        Source the csim/setup file.

  1. Build the simulator:
            csim radio2_udp.sim
  2. Compile the packet generator and receiver applications:
            make

Support: