TSN.1 Compiler Installation Guide for UNIX
This guide gives you step-by-step instructions for installing the TSN.1 Compiler and running the example program on UNIX machines. Please refer to the Tutorial and the User's Manual for further information on using the Compiler.
1. Install the Compiler
To install the TSN.1 Compiler on a UNIX machine (Linux, Mac OS X, Solaris, HP-UX, etc), use the generic Unix package. The generic UNIX package is a gzip'ed tar file. The standard GNU utilities tar and gzip are required. To install the Compiler under /usr/local, for example, type the following commands at the prompt:
> cd /usr/local > gzip -cd tsnc-v5.7-std-unix.tar.gz | tar xvf -
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
To use the TSN.1 Compiler, you must have Java Runtime Environment (JRE 1.6.0 or above) installed on your system. You can verify it by typing "java -version" at the prompt. If you are on Linux, it is recommended that you use OpenJDK instead of gcj.
Change your current directory to /usr/local/tsnc-v5.7/bin and type "tsnc" at the command prompt. Follow the instructions on the screen 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. Build and Run the Example Program
To build the example program, change your directory to /usr/local/tsnc-v5.7/examples. There are three makefiles. Makefile_c is the makefile to build the C example program and Makefile_cxx to build the C++ program. These two makefiles are invoked from the main makefile Makefile. If you don't have write permission in the "examples" directory, copy it to another location. Make sure you modify the "TSNC_INSTALL_DIR" variable in Makefile to point to /usr/local/tsnc-v5.7 or wherever "tsnc" is installed on your system.
To build the C demo program, type:
> make c
To build the C++ demo program, type:
> make cxx
If the build is successful, it creates the executable 'demo' in the current directory. To run it, type:
> ./demo
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.