| 1 | % ------------------------------------------------------------------ |
|---|
| 2 | % |
|---|
| 3 | % TITLE: wavecli |
|---|
| 4 | % AUTHORS: J. Snyder |
|---|
| 5 | % CREATED: |
|---|
| 6 | % REVISED: |
|---|
| 7 | % URL: |
|---|
| 8 | % |
|---|
| 9 | % ------------------------------------------------------------------ |
|---|
| 10 | |
|---|
| 11 | \section{wavecli.py} |
|---|
| 12 | \label{section:wavecli.py} |
|---|
| 13 | wavecli.py is a command line utility with the same capabilities as Wavedash. It can be used to install, start, query, configure, stop, and uninstall waveforms. It can also be used to list available waveforms on the system or currently running instances of waveforms. Finally, it can be used in an interactive mode that works like c\_wavloader. |
|---|
| 14 | |
|---|
| 15 | \subsection{Installation and Usage} |
|---|
| 16 | \label{section:wavecli.py_installation_and_usage} |
|---|
| 17 | wavecli.py is installed to /usr/local/lib/python2.6/dist-packages/wavedash/src by default when OSSIE is installed. It can be used from there or copied anywhere else in the filesystem. To run wavecli.py, invoke it from the command line using python like so: |
|---|
| 18 | \begin{lstlisting}[] |
|---|
| 19 | $ python wavecli.py <any flags> |
|---|
| 20 | \end{lstlisting} |
|---|
| 21 | |
|---|
| 22 | \subsection{Non-interactive mode} |
|---|
| 23 | \label{subsection:wavecli.py_non_interactive_mode} |
|---|
| 24 | To get a listing of available waveforms, use the --listSystemWaveforms flag: |
|---|
| 25 | \begin{lstlisting}[] |
|---|
| 26 | $ python wavecli.py --listSystemWaveforms |
|---|
| 27 | Lab5Example |
|---|
| 28 | pass_data_waveform |
|---|
| 29 | wave |
|---|
| 30 | OSSIETalkUSRP |
|---|
| 31 | ossie_demo |
|---|
| 32 | ml403_ossie_demo |
|---|
| 33 | OSSIETalkLoopBack |
|---|
| 34 | \end{lstlisting} |
|---|
| 35 | Once you know which waveform you wish to run, you need to install it. The --install flag takes the name of the waveform you wish to install and reports back the instance name of the running waveform if successful. |
|---|
| 36 | \begin{lstlisting}[] |
|---|
| 37 | $ python wavecli.py --install ossie_demo |
|---|
| 38 | Successfully installed ossie_demo_1 |
|---|
| 39 | \end{lstlisting} |
|---|
| 40 | Once the waveform has been installed, it can be started using the --start flag and the name of the waveform instance. |
|---|
| 41 | \begin{lstlisting}[] |
|---|
| 42 | $ python wavecli.py --start ossie_demo_1 |
|---|
| 43 | \end{lstlisting} |
|---|
| 44 | Now that the waveform is running, you can use wavecli.py to query or configure it. In this case, we will query the TxDemo component on the ossie\_demo waveform to find out how much of delay is being placed between sending packets. Then we will configure the waveform to send them faster. |
|---|
| 45 | \begin{lstlisting}[] |
|---|
| 46 | $ python wavecli.py --query ossie_demo_1 TxDemo1 |
|---|
| 47 | name: packet_delay_ms |
|---|
| 48 | id: DCE:1b9ca208-8242-11dc-9ba3-00123f63025f |
|---|
| 49 | type: short |
|---|
| 50 | value: 500 |
|---|
| 51 | |
|---|
| 52 | $ wavecli.py --configure ossie_demo_1 TxDemo1 packet_delay_ms 100 |
|---|
| 53 | \end{lstlisting} |
|---|
| 54 | Finally, the waveform should be stopped and uninstalled. These work the same way as starting a waveform: use the --stop or --uninstall flag and supply an instance name. |
|---|
| 55 | \begin{lstlisting}[] |
|---|
| 56 | $ python wavecli.py --stop ossie_demo_1 |
|---|
| 57 | $ python wavecli.py --uninstall ossie_demo_1 |
|---|
| 58 | \end{lstlisting} |
|---|
| 59 | |
|---|
| 60 | \subsection{Interactive Mode} |
|---|
| 61 | \label{subsection:wavecli.py_interactive_mode} |
|---|
| 62 | Wavecli.py also has an interactive mode that can be used to install, start, stop, and uninstall waveforms just like c\_wavLoader. To start wavecli.py in interactive mode, use the -i or --interactive flag. |
|---|
| 63 | \begin{lstlisting}[] |
|---|
| 64 | $ python wavecli.py --interactive |
|---|
| 65 | Found 7 available applications |
|---|
| 66 | |
|---|
| 67 | 1. Lab5Example |
|---|
| 68 | 2. pass_data_waveform |
|---|
| 69 | 3. wave |
|---|
| 70 | 4. OSSIETalkUSRP |
|---|
| 71 | 5. ossie_demo |
|---|
| 72 | 6. ml403_ossie_demo |
|---|
| 73 | 7. OSSIETalkLoopBack |
|---|
| 74 | |
|---|
| 75 | n - Install application number n |
|---|
| 76 | x - exit |
|---|
| 77 | Selection: |
|---|
| 78 | \end{lstlisting} |
|---|
| 79 | From the main menu, enter the number of the waveform you wish to run. This will install the application. Once the installation is complete, press s to start the waveform or u to uninstall it. When a waveform is running, the user can press t to stop it. |
|---|