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 v4.0 , which is the default installation directory.

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

File Name Description
- doc Compiler Documentation
- src Compiler Runtime Library Sources (obfuscated if standard edition)
- examples Example Program Sources
* tsnc.exe The TSN.1 Compiler Executable

- directory   * file

2. Activate the Compiler

Add C:\Program Files\Protomatics\TSN.1 Compiler v4.0 to your PATH so that you can run the Compiler from any directory. To activate the Compiler, double click on the TSN.1 Compiler icon on your Desktop or go to "Start Menu", "All Programs", "Protomatics TSN.1 Compiler v4.0", and select "TSN.1 Compiler".

License Dialog

The first time you run the Compiler, it will prompt you for a license file. To obtain the license file, register your software using the Product Registration Page. Store the license file on your system where you can access it. After you entered a valid license file path, press "OK". You are now ready to use the Compiler.

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 v4.0 and follow the instructions in step 3 and 4 of the Installation Guide for UNIX to compile and run the example programs.

Your installed package includes example TSN.1 files and example C and C++ programs. Change your working directory to C:\Program Files\Protomatics\TSN.1 Compiler v4.0\examples\wimax, which contains the source files for the WiMAX example.

Now at the command prompt, type:

> tsnc -c++ -all wimax_mac.tsn
     

The Compiler 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 IDE such as Microsoft Visual C++ 6.0. For detailed instructions, please refer to your IDE User's Guide.

  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 select "Not Using Precompiled Headers" under "Configuration Properties"->"C/C++"->"Precompiled Headers". Otherwise you will get compile errors.
  2. Add the ".cxx" files in C:\Program Files\Protomatics\TSN.1 Compiler v4.0\examples\wimax to your project. There should be two files: demo.cxx and wimax_mac.cxx.
  3. Add the ".c" files in C:\Program Files\Protomatics\TSN.1 Compiler v4.0\src to your project: tsnc_msg.c, tsnc_buf.c, tsnc_msg_pack.c, and etc. These are the source files for the Compiler Runtime Library.
  4. Add the directory C:\Program Files\Protomatics\TSN.1 Compiler v4.0\examples\wimax and C:\Program Files\Protomatics\TSN.1 Compiler v4.0\src to the project's include path.
  5. Build the project.
  6. Run the program 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 ...