TSN.1 Compiler Installation Guide for Windows


This guide gives you step-by-step instructions for installing the TSN.1 Compiler and running the example program on Windows. Please refer to the Tutorial and the User's Manual for further information on using the Compiler.

1. Install the Compiler

The Windows installer is a self-extracting executable. Run the executable and follow the instructions on screen to complete the setup. This guide assumes that you install the Compiler under C:\Program Files\Protomatics\TSN.1 Compiler v5.8.

After the installation is successful, the installation directory contains the following set of directories.

File Name Description
- bin The TSN.1 Compiler Executables
- doc Compiler Documentation
- examples Example Program Sources
- lib Pre-built Compiler Runtime Library for popular development platforms such as Windows, Linux, and Mac OS.
- src Compiler Runtime Library Sources (header files only if Standard Edition)

2. Activate the Compiler

Change your current directory to C:\Program Files\Protomatics\TSN.1 Compiler v5.8\bin and type "tsnc" at the command prompt. Follow the on screen instructions to obtain a license file.

After you have received the license file, type the following command to activate the software:

> tsnc -license path/to/license.txt
TSN.1 Compiler v5.7 (Professional Edition) - Patent No. 7,818,732
Copyright (c) 2005-2017 Protomatics, Inc. All Rights Reserved.

If you see the message above, your TSN.1 Compiler is ready to use. You may want to add /usr/local/tsnc-v5.7/bin to your environment variable "PATH" so that you can run "tsnc" from any directory.

3. Compile the Example TSN.1 File

If you are using Cygwin with gcc/g++, change your working directory to /cygdrive/c/Program Files/Protomatics/TSN.1 Compiler v5.8 and follow the instructions in step 3 of the Installation Guide for UNIX to compile and run the example programs.

Your installed package includes an example TSN.1 file and example C and C++ programs. Change your working directory to C:\Program Files\Protomatics\TSN.1 Compiler v5.8\examples. If you don't have write permission in this directory, then copy this directory to another location. Now at the command prompt, type:

> tsnc -c++ -all wimax_mac.tsn

This generates two files wimax_mac.h and wimax_mac.cxx in the current directory.

4. Build and Run the Example Program

The instructions given below are generic and does not assume a particular version of the Microsoft Visual C++.

  1. Create a new project for a Win32 Console Application. Please make sure it's a Win32 Console Application, not a CLR Console Application. Also make sure to uncheck "Precompiled Headers" when you create the project.
  2. Add the ".cxx" files in C:\Program Files\Protomatics\TSN.1 Compiler v5.8\examples to your project. There should be two files: demo.cxx and wimax_mac.cxx.
  3. Add the pre-built TSN.1 Compiler Runtime Library in C:\Program Files\Protomatics\TSN.1 Compiler v5.8\lib\tsnc.lib to your project as "Resource Flies".
  4. Add the C:\Program Files\Protomatics\TSN.1 Compiler v5.8\src directory to your project's "Additional Include Directory". In your Visual C++, go to the "Project" menu and select "Properties...". In the dialog box, select "Configuraton Properties" on the left-hand side panel. Click on "C/C++" and then "General". Enter "C:\Program Files\Protomatics\TSN.1 Compiler v5.8\src" into the input field (See the screenshot). Click the "OK" button.
  5. Build and run the project and you will observe the following output:
wimax_mac_DLMAP
{
   MessageType = 2
   FrameDurationCode = 3
   FrameNumber = 256
   DCDCount = 1
   BaseStationID = 0x123456789abc
   IES[0] = wimax_mac_DLMAP_IE
   {
      DIUC = 15
      ExtendedDIUC = 0
      Length = 4
      Channel_Measurement_IE = wimax_mac_DLMAP_IE_Channel_Measurement_IE
      {
         ChannelNr = 3
         OFDMASymbolOffset = 4
         CID = 5
      }
   }
   IES[1] = wimax_mac_DLMAP_IE
   {
      DIUC = 15
      ExtendedDIUC = 2
      Length = 2
      AAS_DL_IE = wimax_mac_DLMAP_IE_AAS_DL_IE
      {
         Permutation = 1
         PreambleIndication = 3
         FirstBinIndex = 5
         LastBinIndex = 7
      }
   }
}

wimax_mac_DLMAP
{
   MessageType = 2
   FrameDurationCode = 3
   FrameNumber = 256
   DCDCount = 1
   BaseStationID = 0x123456789abc
   IES[0] = wimax_mac_DLMAP_IE
   {
      DIUC = 15
      ExtendedDIUC = 0
      Length = 4
      Channel_Measurement_IE = wimax_mac_DLMAP_IE_Channel_Measurement_IE
      {
         ChannelNr = 3
         OFDMASymbolOffset = 4
         CID = 5
      }
   }
   IES[1] = wimax_mac_DLMAP_IE
   {
      DIUC = 15
      ExtendedDIUC = 2
      Length = 2
      AAS_DL_IE = wimax_mac_DLMAP_IE_AAS_DL_IE
      {
         Permutation = 1
         PreambleIndication = 3
         FirstBinIndex = 5
         LastBinIndex = 7
      }
   }
}

Press enter to exit ...

Congratulations! You have successfully installed the TSN.1 Compiler.