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.
To install the TSN.1 Compiler on a UNIX machine (Linux, Solaris, Mac OS X, 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-v4.0-unix-std.tar.gz | tar xvf -
The generic UNIX package assumes that you already have a Java Runtime Environment (J2RE 1.5.0 or above). If not, follow the instructions below to download one from SUN website or obtain one from your system vendor.
After you install the Java Runtime Environment, add the Java installation directory (for example, /usr/local/jre1.5.0_x/bin) to the front of your PATH so that you can run the "java" command from any directory.
Upon successful finish, 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) |
| - lib | Compiler Runtime Library Binary |
| - examples | Example Programs |
| * tsnc | Bash Shell Script to Launch the Compiler |
| * tsnc.jar | The Compiler Java Class Library |
- directory * file
Add the installation directory to your PATH so that you can run the Compiler from any directory. Now you are ready to run the TSN.1 Compiler. The Compiler is invoked through a supplied bash shell script. If your system does not have bash shell, modify the script to your environment by setting the INSTALL_DIR variable to point to the installation directory.
Now at the prompt, type:
> tsnc
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.
The Compiler Runtime Library sources are located under src. Modify the supplied makefile to adapt it to your environment if required. The example makefile uses gcc for the C compiler. At the prompt type:
> make
The Runtime Library libtsnc.a will be built in a few seconds and it is stored under lib.
The WiMAX example program sources are located in the examples/wimax directory. Go into that directory and again modify the makefile as necessary. 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.
To build the C demo program, type:
> make c
To build the C++ demo program, type:
> make cxx
This creates the demo executable 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 ...