• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Presentation API Demo
2
3This directory contains a demo of a Presentation API controller and receiver.
4The demo supports flinging a URL to start a presentation and stopping the
5presentation.
6
7## Command line options
8
9The same executable is run for the controller and receiver; only the command
10line options affect the behavior.  The command line options are:
11
12``` bash
13    $ osp_demo [-v] [friendly_name]
14```
15
16 - `-v` enables verbose logging.
17 - Specifying `friendly_name` puts the demo in receiver mode and sets its name
18   to `friendly_name`.  Currently, `friendly_name` won't appear in any of the
19   controller-side output related to this screen though.  If no friendly name is
20   given, the demo runs as a controller.
21
22## Log output
23
24Because the demo acts like a shell and accepts commands on `stdin`, the logging
25output is redirected to a separate file so it doesn't flood the same display.
26You have to create these files on your machine before running the demo.  For the
27controller, this file should be named `_cntl_fifo` and for the receiver, it
28should be named `_recv_fifo`.  The simplest way to do this is so you can see the
29output while the demo is running is to make these named pipes like so:
30
31``` bash
32    $ mkfifo _cntl_fifo _recv_fifo
33```
34
35Then `cat` them in separate terminals while the demo is running.
36
37## Listener commands
38
39 - `avail <url>`: Begin listening for receivers that support the presentation of
40   `url`.
41 - `start <url> <service_id>`: Start a presentation of `url` on the receiver
42   specified by the ID `service_id`.  `service_id` will be printed in the output
43   log once `avail` has been run.  The demo only supports starting one
44   presentation at a time.
45 - `msg <string>`: Sends a string message on the open presentation connection.
46 - `close`: Close the open presentation connection without terminating the
47   presentation.
48 - `reconnect`: Reconnect the previously-connected presentation connection.
49   This allows using the `msg` command again.
50 - `term`: Terminate the previously started presentation.
51
52## Publisher commands
53
54 - `avail`: Toggle whether the receiver is publishing itself as an available
55   screen.  The receiver starts in the publishing state.
56 - `close`: Close the open presentation connection without terminating the
57   presentation.
58 - `msg <string>`: Sends a string message on the open presentation connection.
59 - `term`: Terminate the running presentation.
60