ptp-sim.github.io

Overview

This page describes the installation of the following components:

After completing this install guide, you should be able to run PTP simulations with LibPTP.

Install OMNeT++ 4.6

Installation

The installation of OMNeT++ is described in detail in the official Install Guide. When running OMNeT++ for the first time, you are asked whether you would like to install example projects or the INET framework. We recommend not to install these projects.

Your OMNeT++ installation should look similar as shown in the following image. The (empty) Project Explorer of OMNeT++ is highlighted in the image.

Pic

Platform recommendations

LibPTP with OMNeT++ 4.6 is known to run well on Ubuntu 16.04. With Ubuntu 18.04 and newer we have experienced problems. Windows 10 might work, but is not fully tested/supported.

As a result, the recommended platform is still Ubuntu 16.04. If you would like to help with testing/porting on your favorite platform please contact us in the discussion forum.

Getting startet with OMNeT++

Knowledge about OMNeT++ is of great importance when working with LibPTP. We recommend to read the OMNeT++ User Guide before diving into LibPTP. OMNeT++ also comes with a tutorial for beginners, called TicToc, which can be found in the directory ./doc/tictoc-tutorial/index.html of the OMNeT++ sources. Completing is tutorial is also highly recommended.

INET 2.6

Step 1: Getting the sources

Download the sources for INET 2.6 from the INET project. Extract the archive to a local folder.

Step 2: Adding the project to OMNeT++

Right-click in the Project Explorer area, and select Import….

Pic

Select General/Existing Projects into Workspace.

Pic

You should see the Import Projects popup as shown below.

Pic

Select the root directoy by clicking Browse and choose the directory where you have extracted the INET source code. Click Finish

Pic

The INET project should now be shown in your project explorer.

Pic

Step 3: Building the project

In the project explorer, right-click on the INET project and select Build Project. This will take some time, and as a result you should have a newly compiled library in the folder out/gcc-debug/src within the INET project (assuming you have not changed any default settings).

Pic

OMNeT_Utils

Step 1: Getting the sources

Get the sources from Github.

Step 2: Adding the project to OMNeT++

As for the previous projct, add the project to OMNeT++ via Import - Existing Projects info Workspace.

Step 3: Building the project

As for the previous projct, build the project via right-click and selecting Build Project. The result of the build process is again a compiled library.

LibPTP

Step 1: Getting the sources

Get the sources from Github.

Step 2: Adding the project to OMNeT++

As for the previous projct, add the project to OMNeT++ via Import - Existing Projects info Workspace.

Step 3: Dependencies

LibPTP depends on the circular_buffer module of the boot library. The circular_buffer module is a header-only module, which means consists only of header files and no additional library files need to be linked.

Installation depends on your operating system. Following are instructions for Ubuntu-based Linux systems and Windows.

Ubuntu:

On Ubuntu, you can install the complete Boost development files with the following command: sudo apt install libboost-dev

Windows:

On Windows, we recommend carrying out the following steps:

Additionally, LibPTP has dependencies on the two previous projects (INET and OMNeT_Utils). You can check that the project references are correctly configured by right-clicking on the LibPTP project and selecting Properties. The projects INET and OMNeT_Utils should be selected in the Project References tab.

Pic

Step 4: Building the project

As with the previous projct, build the project via right-click and selecting Build Project. The result of the build process is again a compiled library.

PTP_Simulations

Step 1: Getting the sources

Get the sources from Github.

Step 2: Adding the project to OMNeT++

As for the previous projct, add the project to OMNeT++ via Import - Existing Projects info Workspace.

Step 3: Building the project

The PTP_Simulations project has a dependency on the libPTP project. You can check that the project references are correctly configured again in the Project References tab of the projects properties. The project libPTP should be selected.

Pic

As for the previous projct, build the project via right-click and selecting Build Project. The result of the build process is an executable. This is the executable that will carry out your simulations.

Step 3: Runnig simulations

When the PTP_Simulations has been built successfully, you should be able to carry out simulations. The PTP_Simulations contains example simulations. As an example, open simulations/PTP/Mixed_Test_2 in the project explorer. Right-click on the file Mixed_Test_2.ned and select Run as - OMNeT++ Simulation.

Pic

OMNeT++ might show a popup informing you that a run configuration is created for this simulation. Select Do not show this message again and click OK.

Pic

Concratulations!

You should now see your first PTP simulation! Have fun exploring PTP!

Pic

LibPLN

Step 1: Getting the sources

Get the sources from Github.

Step 2: Building the project

Please follow the Install Guide provided by libPLN. After completing this step, you should have two static libraries:

Step 3: Building libPTP with support for libPLN

Step 4: Building PTP_Simulations with support for libPLN

Your PTP_Simulations project should now be able to carry out simulations where the clock noise is produced by libPLN.