You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

Subtitle: How to use the SDK Channel Map Editor

Overview
There has been some confusion about how to use the SDK Channel Map editor, and, in particular, how to test/validate that it works correctly. This wiki entry hopes to clear up the confusion and provide detailed information on using Tunetest to test/validate the channel map editor.

Setup

Create/Import Tunetest
There are multiple ways to create and populate a "tunetest" project. I'll describe one based on importing from a checked out version of the RI.

  • In the SDK, create an empty OCAP project (the name isn't important, but I'll call it "Tunetest").
    Spash screen: Click on the "Workbench" icon...

    Workbench view: Click on "File->New->Project... and expand the OCAP selection."

    The "New OCAP Project" wizard will appear. Type in a name, and select "None" for the Xlet Template.

    This is an empty OCAP project:
  • Import the necessary files from the file system.
    The resulting (empty) project will have a src directory.
    Select it (click on it) and then File->Import. A dialog will open.
    Expand the "General" category, and select "File System". Then click on "Next".

    Browse to where you have checked out the RI and into the ri/RI_Stack/apps/qa subdirectory.
    Select the qa subdirectory and click "Ok".
    The Import dialog window will be populated with the qa subdirectory in the left hand pane and files listed in the right hand pane.
    Expand the qa subdirectory.
    I find it easier to manage if I import a selected set of source files:
    - org/apache
    - org/cablelabs/lib
    - org/cablelabs/xlet/Tunetest
    Click "Finish". Now we need to import the AutoXlet source...
    File->Import. A dialog will open. Browse to where you have checked out the RI and into the ri/RI_Stack/apps/qa/AutoXlet. 
    Expand AutoXlet, check org, click on Finish.
    If you try and import the AutoXlet source with the Tunetest, etc. source, eclipse puts the AutoXlet source inside a "AutoXlet.org..." package, which is incorrect (and won't compile).

    At this point, TuneTestXlet should compile (the only class that doesn't is org.cablelabs.test.autoxlet.XletDriver - if it bothers you, delete it. We don't need if for this exercise...)
  • Create a tunetest service configuration.
  • Create a run/debug configuration.

At this point you should be able to launch the RI and have tunetest run, with all four channels available.
With this configuration, the (SDK generated) channel map is ignored.

To enable the SDK generated channel map, two things have to happen (one expected, one is a bug):

  1. Modify config.properties.tune, adding the following line:
    use_javatv_channel_map=true
    Once you do this, Tunetest will fail to select any channel. This is expected.
  2. Copy $RICOMMONROOT/resources/fdcdata/fdc-files.txt to $RICOMMONROOT/resources/fdcdata (overwriting the file that is there).
    NOTE: $RICOMMONROOT is something like ../trunk/common for development environments, and 
    <install directory>/ocap-ri/ricommon for binary installs.
    This is a bug - the SDK should write/modify this file.

After making the above changes if you launch/debug the RI a single channel will be available (at the moment I don't know why, since the default channel map is empty).
Using the SDK (and information contained in config.properties.tune) we will create a non-default channel map and demonstrate inclusion/exclusion of channels.

  • No labels