Getting started

Install the TSOP SDK

The following sections explain how to install the SDK on Windows and Linux.

Windows installation

To install on a Windows workstation, follow these steps:

  1. Ensure you have uninstalled any previously installed version of the SDK.

  2. Insert the SDK disk (named TSOP-SDK-x.xx.xx, where x.xx.xx represents the disk’s version number) into your CD/DVD drive.

  3. Run the executable file win\setup.msi, and follow the onscreen instructions.

Linux installation

The SDK is distributed as two compressed .tar files. To install on a Linux workstation, follow these steps:

  1. Ensure you have uninstalled any previously installed version of the SDK.

  2. Unpack the files from the root directory using the following commands:

    • For C:

      tar -xvf TSOP-SDK-x.xx.xx/linux/c/devel.tar
    • For Java:

      tar -xvf TSOP-SDK-x.xx.xx/linux/java/devel.tar

In these commands, x.xx.xx represents the disk’s version number.

Locations of the installed software and examples

On Windows, the Java and C versions of the SDK software are installed, respectively, in:

  • %NFAST_HOME%\java\dsesdk

  • %NFAST_HOME%\c\dsesdk

On Linux, the Java and C versions of the SDK software are installed, respectively, in:

  • /opt/nfast/java/dsesdk

  • /opt/nfast/c/dsesdk

Java examples

The following example Java applications are supplied on each operating system:

Example applications Use

TtiTest.java

HttpTest.java

These applications get a time-stamp from a server and print information from the time-stamp to the screen.

TtiTest.java uses the TCP/318 socket-based protocol to get the time-stamp from the server.

HttpTest.java uses the HTTP protocol to get the time-stamp from the server.

TtiStress.java

HttpStress.java

These applications provide information on:

  • Total running time in milliseconds.

  • Total count of successful time-stamps received.

  • The count of time-stamps received during this second.

  • Average time-stamps per second since program start-up.

  • Total count of network retries followed by the count of double, triple, and quadruple retries.

  • Total number of ignored exceptions.

The contents of the java/dsesdk/ directory tree is the same for all operating systems (the path descriptions here use Unix-style directory separators, but you can substitute Windows-style directory separators as appropriate).

File / directory Description

classes/tti.jar

This file is the .jar file that contains all the public classes from the Java version of the SDK.

docs/

This directory contains the Javadoc documentation for the SDK Java classes.

examples/sample/

This directory contains example applications:

  • TtiTest.java

  • HttpTest.java

  • TtiStress.java

  • HttpStress.java.

examples/util/

This directory does not contain example applications but rather a collection of example classes, in the form of sample code that you can use and modify.

docs-util/

This directory contains Javadoc documentation generated from the source example classes in the examples/util/ directory.

classes/util/util.jar

This file is the compiled .jar file from the sample class files in the examples/util/ directory.

See the example help message for details of parameters that can be varied.

C examples

The following sections discuss the C application examples available for Windows and Linux.

See the example help message for details of parameters that can be varied.

C examples for Windows

The contents of %NFAST_HOME%\c\dsesdk\ provide the source and compiled binaries for two sample applications:

Example applications Use

ttitest

This application uses the TCP/318 socket-based protocol to get the time-stamp from the server and then prints the information from the time-stamp to the screen.

iptsdemo

This application (IP Time-Stamp Demo), is a Windows GUI time-stamp application. There is no version of IP Time-Stamp Demo for Linux.

In %NFAST_HOME%\c\dsesdk\ you will find:

File / directory Description

vs2017-32\lib\

vs2017-64\lib\

These directories contain the DLL, LIB, and PDB files for the SDK, for 32-bit and 64-bit respectively.

vs2017-32\include\

vs2017-64\include\

These directories contain the header files for the SDK, for 32-bit and 64-bit respectively.

prebuilt\

This directory includes prebuilt versions of the example applications ttitest.exe and iptsdemo.exe.

bin\

This is the output directory for the example projects that Visual Studio builds. It also contains prebuilt versions.

ttitest\

This directory contains the source for the ttitest application.

iptsdemo\

This directory contains the source for IP Time-Stamp Demo, iptsdemo.

C examples for Linux

Linux installations provide the source, compiled binaries, and Makefiles for the example C application ttitest.

Example application Use

ttitest

This application uses the TCP/318 socket-based protocol to get the time-stamp from the server and then prints the information from the time-stamp to the screen.

On Linux, the /opt/nfast/c/dsesdk directory contains:

File / directory Description

gcc/include/

This directory contains header files for the SDK.

gcc/lib/libtti.a

This is the library file for the SDK.

gcc/examples/

This directory contains the compiled binary executables, source code, and Makefiles for the ttitest application.