Version 1 (modified by ismael, 16 years ago)

--

P-HAL User Guide

This section describes first steps on launching and running a waveform in P-HAL. If you plan to develop applications or you just want to learn more about P-HAL, you should read the P-HAL Developer Guide? and the P-HAL Manual?.

Here you will learn how to download a waveform from our repository (you will need a user/pwd to access) and launch it. You will also get familiar with most of P-HAL commands.

At this point we assume that you have downloaded and installed P-HAL on your computer (see Install Guide?) and that your are familiar with Linux at user level.

Launching P-HAL

Before starting P-HAL, you must create a directory where Manager Daemons will look for configuration files, application definitions and executables (PhalManual?). This path will be passed as the first parameter to the P-HAL launcher. You can download a sample directory from our repository:

svn checkout http://147.83.118.229/svn/phal-apps/trunk/phal-repositories

You will see that this directory as, among others, the following mandatory subdirectories:

  • logs: Here waveform's modules will store their logs
  • swman_execs: Here modules' binaries can be reached (can contain symbolic links)
    • linux: Path for Linux modules' binaries
  • swman_apps: Path for application definitions (e.g.: wimax.app)
  • statsman: Initialization parameter definitions, separated by application
    • app_x: Parameters for app_x

If you follow this guide and plan to launch Wimax waveform (see next), you won't need to modify any of this files.

Now you can launch P-HAL console passing the phal-repositories path (just downloaded) as an argument:

runph phal-repositories

You just got into the P-HAL environment! By the moment, you can't do anything because you need to download an application first. This will be explained in the following section. After that, we will see how it can be loaded and runned.

Downloading a waveform: Wimax

You can download the latest version of the Wimax waveform from our repository:

svn checkout http://147.83.118.229/svn/phal-apps/trunk/wimax

This will download all the files to a directory called wimax. You can enter there and compile your files as usually, paying attention on linking them to the P-HAL SW API Library (see DeveloperGuide?).

Remember that you can commit your changes in the application using the Subversion service, just get into the wimax directory and type:

svn commit 

To download the latest version in the server type (again, from the downloaded directory):

svn update

These commands, however, can create conflicts if other users are working with the same files, we recommend to read Subversion Manual to learn more about this powerful tool.

Running a waveform: Basic P-HAL commands

runph phal-repositories
phload wimax
phinit wimax
phrun wimax
hwcmd info
hwcmd ps

... ...