| 1 | = P-HAL User Guide = |
| 2 | |
| 3 | This section describes first steps on launching and running a waveform in P-HAL. |
| 4 | If you plan to develop applications or you just want to learn more about P-HAL, you should read the [wiki:PhalDeveloperGuide P-HAL Developer Guide] and the [wiki:PhalManual P-HAL Manual]. |
| 5 | |
| 6 | 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. |
| 7 | |
| 8 | At this point we assume that you have downloaded and installed P-HAL on your computer (see [wiki:PhalInstallGuide Install Guide]) and that your are familiar with Linux at user level. |
| 9 | |
| 10 | == Launching P-HAL == |
| 11 | |
| 12 | 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: |
| 13 | |
| 14 | {{{ |
| 15 | svn checkout http://147.83.118.229/svn/phal-apps/trunk/phal-repositories |
| 16 | }}} |
| 17 | |
| 18 | You will see that this directory as, among others, the following '''mandatory''' subdirectories: |
| 19 | * logs: Here waveform's modules will store their logs |
| 20 | * swman_execs: Here modules' binaries can be reached (can contain symbolic links) |
| 21 | * linux: Path for Linux modules' binaries |
| 22 | * swman_apps: Path for application definitions (e.g.: wimax.app) |
| 23 | * statsman: Initialization parameter definitions, separated by application |
| 24 | * app_x: Parameters for app_x |
| 25 | |
| 26 | If you follow this guide and plan to launch Wimax waveform (see next), you won't need to modify any of this files. |
| 27 | |
| 28 | Now you can launch P-HAL console passing the phal-repositories path (just downloaded) as an argument: |
| 29 | {{{ |
| 30 | runph phal-repositories |
| 31 | }}} |
| 32 | |
| 33 | 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. |
| 34 | |
| 35 | == Downloading a waveform: Wimax == |
| 36 | |
| 37 | You can download the latest version of the Wimax waveform from our repository: |
| 38 | |
| 39 | {{{ |
| 40 | svn checkout http://147.83.118.229/svn/phal-apps/trunk/wimax |
| 41 | }}} |
| 42 | |
| 43 | 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). |
| 44 | |
| 45 | Remember that you can commit your changes in the application using the Subversion service, just get into the wimax directory and type: |
| 46 | {{{ |
| 47 | svn commit |
| 48 | }}} |
| 49 | |
| 50 | To download the latest version in the server type (again, from the downloaded directory): |
| 51 | {{{ |
| 52 | svn update |
| 53 | }}} |
| 54 | |
| 55 | These commands, however, can create conflicts if other users are working with the same files, we recommend to read [http://svnbook.red-bean.com/nightly/en/svn-book.html Subversion Manual] to learn more about this powerful tool. |
| 56 | |
| 57 | == Running a waveform: Basic P-HAL commands == |
| 58 | |
| 59 | {{{ |
| 60 | runph phal-repositories |
| 61 | phload wimax |
| 62 | phinit wimax |
| 63 | phrun wimax |
| 64 | hwcmd info |
| 65 | hwcmd ps |
| 66 | }}} |
| 67 | ... |
| 68 | ... |