Commit 5522ff7d authored by Kevin Kershaw's avatar Kevin Kershaw

Initial commit

parents
The TTT is licensed by CableLabs for use by MSOs under the terms and
conditions of the OCAP Implementers License Agreement.
See https://www.cablelabs.com/doczone/opencable/ocap_resources_license_agreeme/
and check "Code" to license the TTT and other materials. A DocZone account is
required. Contact DocZoneAdmin@cablelabs.com or register on the DocZone website
at http://www.cablelabs.com/dz if you do not have a DocZone account.
# File: Makefile
# Author: Nick Nielsen <n.nielsen@cablelabs.com>
# Date: Wed Mar 03 10:49:55 2010
# Description: Makefile
MAJOR_VERSION=1
MINOR_VERSION=5.2
VERSION=$(MAJOR_VERSION).$(MINOR_VERSION)
TTTPACKAGE=TTT-$(VERSION)
package: clean
# Check out fresh version of everything that is checked into SVN
svn co https://devzone.cablelabs.com/svn/oc/ttt $(TTTPACKAGE)
#
# Remove .svn directories.
rm -rf `find $(TTTPACKAGE) -name '.svn'`
#
# Remove unneeded files
-rm -f $(TTTPACKAGE)/Makefile
#
# Build certain packages
#
cd $(TTTPACKAGE)/certparser && make dist
#
cd $(TTTPACKAGE)/hashfile_parser && make dist
#
cd $(TTTPACKAGE)/helloworld && ant
#
cd $(TTTPACKAGE)/ocapperm && ant
#
cd $(TTTPACKAGE)/parse-si && make dist
#
# Now, zip up the whole thing.
zip -r $(TTTPACKAGE).zip $(TTTPACKAGE)
clean:
-rm -rf $(TTTPACKAGE)
-rm -f $(TTTPACKAGE).zip
-rm -f *~
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.0
Created-By: 1.3.1_09-b03 (Sun Microsystems Inc.)
<?xml version="1.0"?>
<!DOCTYPE permissionrequestfile PUBLIC
"-//OCAP//DTD Permission Request File 1.0//EN"
"http://www.cablelabs.com/ocap/dtd/permissionrequestfile-1-0.dtd">
<permissionrequestfile orgid="0x56789abc" appid="0x5001">
<!-- Permission to add or remove applications from the Application Database
<ocap:monitorapplication ocap:name="registrar" ocap:value="true"/>
-->
<!-- Permission to create and manage their own service contexts and the services running in those service contexts -->
<ocap:monitorapplication ocap:name="service" ocap:value="true"/>
<!-- Permission to create their own service contexts and manage BOTH their own and other service contexts and services
<ocap:monitorapplication ocap:name="servicemanager" ocap:value="true"/>
-->
<!-- Permission to request a system reboot
<ocap:monitorapplication ocap:name="reboot" ocap:value="true"/>
-->
<!-- Permission to signal implementation to resume boot processing after handlers have been set
<ocap:monitorapplication ocap:name="signal.configured" ocap:value="true"/>
-->
<!-- Permission to access ocap system properties
<ocap:monitorapplication ocap:name="properties" ocap:value="true"/>
-->
<!-- Permissions to present services belonging to specific service types in a service context -->
<ocap:servicetypepermission type="broadcast" actions="*" value="true"></ocap:servicetypepermission>
<ocap:servicetypepermission type="abstract.mso" actions="*" value="true"></ocap:servicetypepermission>
<ocap:servicetypepermission type="abstract.manufacturer" actions="*" value="true"></ocap:servicetypepermission>
<!-- Permission to use the tuning API -->
<tuning value="true"/>
<!-- Permission to use network resources (currently any) -->
<network>
<host action="connect,accept,listen,resolve">*</host>
</network>
</permissionrequestfile>
# Default appender is UDP socket (only)
#log4j.rootCategory=INFO, udp1
# Uncomment to add a local file appender also
#log4j.rootCategory=INFO, udp1, file1
#log4j.debug=true
log4j.appender.udp1=org.cablelabs.log.UDPAppender
#IP:port for dev HE, OFA server logger
log4j.appender.udp1.Host=172.6.5.15
log4j.appender.udp1.Port=12400
log4j.appender.udp1.layout=org.apache.log4j.PatternLayout
log4j.appender.udp1.layout.ConversionPattern=%-8r %-5.5c{1} [%-5.5t] %-5.5p %m%n
log4j.appender.file1=org.apache.log4j.FileAppender
log4j.appender.file1.layout=org.apache.log4j.PatternLayout
# %r=ms since app start;%c=logger name;%t=thread name;%p=log level;%m=app msg itself
log4j.appender.file1.layout.ConversionPattern=%-8r %-5.5c{1} [%-5.5t] %-5.5p %m%n
log4j.appender.file1.File=LocalFileLog.txt
log4j.appender.file1.Append=false
# When true, create a console appender on the fly;
# this is primarily for STB environment when no socket or file appender is available
createConsoleAppender=true
#createConsoleAppender=false
# When true, unique STB ID is printed in each message
printStbId=true
#printStbId=false
# When true current time of day is printed in each message
printTimeOfDay=true
#printTimeOfDay=false
# File: deployAtxToRi.sh
# Author: Nick Nielsen <n.nielsen@cablelabs.com>
# Date: Fri Jul 17 16:27:13 2009
# Description:
# This is a batch script that can be used to easily install the ATX
# application in the OpenCable tru2way Reference Implementation (RI) stack
# simulator's execution environment.
if [ -z "$1" ] ; then
echo "Usage: ./deployAtxToRi.sh [DIR]"
echo " where [DIR] is the base directory of the RI to which the ATX"
echo " should be deployed (the directory containing the runRI.bat script)."
exit -1
fi
if [ ! -d "$1" ] ; then
echo "ERROR: $1 is an invalid directory."
exit -1
fi
if [ ! -f "$1/runRI.bat" ] ; then
echo "ERROR: $1 does not contain a valid RI installation (must contain "
echo " the \"runRI.bat\" script."
exit -1
fi
XLET="ATX20/org/cablelabs/ocap/ofa/tests/Host20AppTest.class"
if [ ! -f "$XLET" ] ; then
echo "INTERNAL ERROR: the $XLET does not exist!!"
exit -1
fi
DIR="$1/ocap/bin/CableLabs/simulator/Win32/debug/env/ATX20"
rm -rf "$DIR"
mkdir -p "$DIR"
cp -r ./ATX20/* $DIR/
echo "ATX successfully deployed to: $DIR"
echo
echo "To execute this application in the RI, you must add an entry to the"
echo "ocap-ri\ocap\bin\CableLabs\simulator\Win32\debug\env\hostapp.properties file."
echo
echo "Here is an example of such an entry:"
echo
echo app.0.application_name=ATX
echo app.0.initial_class_name=org.cablelabs.ocap.ofa.tests.Host20AppTest
echo app.0.application_identifier=0x000000015207
echo app.0.application_control_code=AUTOSTART
echo app.0.visibility=VISIBLE
echo app.0.base_directory=/syscwd/ATX20
File: readme.txt
Author: Nick Nielsen <n.nielsen@cablelabs.com>
Date: Wed Jul 08 17:02:47 2009
Description: readme.txt for the ATX
==============================================================================
The ATX is a tru2way application that demonstrates basic Xlet capabilities
on a settop platform. It can be used as a well-known application with which
to verify basic application distribution and signalling functionality within
the headend.
The ATX allows for basic tuning functionality and it displays remote control
keycodes on the screen based on remote control activity. It can be loaded on
a tru2way host to test basic capabilities.
The ATX can also be loaded as an application in the CableLabs tru2way Reference
Implementation (RI), by using the deployAtxToRi.sh script (in Cygwin or Linux).
File: readme.txt
Author: Nick Nielsen <n.nielsen@cablelabs.com>
Date: Tue Jul 14 11:22:12 2009
Description: readme.txt
The projects in the "beta" directory are not considered completely
functional (errors may occur. However, they may still be useful in
troubleshooting and so are included in the TTT.
java -jar XaitGenerator.jar xml=SampleXait.xml
pause
\ No newline at end of file
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<!-- Preferrred version refers to schema, but currently parsing and processing fail with
validation on, so suppress this for now..
<XaitDefinition xmlns ="http://www.cablelabs.org/oaf/xaitgen" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.cablelabs.org/oaf/xaitgen XaitDefinition.xsd">
-->
<XaitDefinition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.cablelabs.org/oaf/xaitgen XaitDefinition.xsd">
<!-- <XaitDefinition> -->
<Xait name="Sample Xait" version="1" testApp="false">
<certificate>
<hash>1234 5678 9012 3456 7890</hash>
<hash>9876 5432 1098 7654 3210</hash>
</certificate>
<!--
<certificate/>
-->
<ocTransport label="1" sourceId="10871" componentTag="43" />
<icTransport label="2" url = "http:testhost.cablelabs.org/sample1" />
<!-- Note serviceID's defined by the manufacturer (e.g., internal) are 0x010000 - 0x01FFFF (24 bit) and those
defined by MSO in the range 0x020000 - 0xFFFFFF (24 bit) -->
<service serviceId="123456" name="Sample Apps" autoSelect="true" />
<!--Define all applications NOTE the spec ranges for appId must be honored.
0x0000…0x3fff Application_ids for unsigned applications
0x4000…0x5fff Application_ids for signed applications without monitor permission
0x6000…0x7fff Application_ids for dual signed applications that use monitor permission
-->
<application orgId="1000" appId="6001" controlCode="AUTOSTART" visibility="ALL"
priority="200" version="23" serviceId="123456" >
<name lang="ENG" >SampleApp1</name>
<parameter>url=10.12.1.14</parameter>
<parameter>port=13219</parameter>
<transportLabels>1</transportLabels>
<baseDir>OAF/test/</baseDir>
<classPath>/classes/test/;</classPath>
<initialClass>org.cablelabs.oaf.test.testapps.sampleAutostartApp</initialClass>
</application>
<application orgId="1000" appId="1001" controlCode="PRESENT" visibility="ALL"
priority="100" version="7" serviceId="00123456" >
<name lang="ENG" >SampleApp2</name>
<parameter></parameter>
<transportLabels>1,2</transportLabels>
<baseDir>OAF/test/</baseDir>
<classPath>/classes/test/;</classPath>
<initialClass>org.cablelabs.oaf.test.testapps.samplePresentApp</initialClass>
</application>
</Xait>
</XaitDefinition>
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!-- Define schema namespace, also dds namespace as both target and default -->
<xsd:schema xmlns:xsd='http://www.w3.org/2001/XMLSchema'
xmlns="http://www.cablelabs.org/oaf/xaitgen"
targetNamespace="http://www.cablelabs.org/oaf/xaitgen"
elementFormDefault="qualified">
<xsd:annotation>
<xsd:documentation xml:lang="en">
File oaf-xait.xsd
Cablelabs Advanced Project Group, OCAP XAIT Generator Schema
Schema Revision 1.0, July 20, 2006
Implements XAIT XML Specification 1.0, July 20, 2006
Copyright 2006 CableLabs Inc., All rights reserved.
Reference as:
<!--
<XaitDefinition
xmlns ="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/2001/XMLSchema
XaitDefinition.xsd">
...
</XaitDefinition>
-->
This is the schema for the Cablelabs OCAP Xait Generator's input XML documents.
This schema defines data elements that will generate XAIT sections containing:
OCAP Applications
Abstract Service Descriptors
Application Descriptors
Application Name Descriptors
DVBJ Application Location Descriptors
DVBJ Application Parameter Descriptors
Privileged Certificate Descriptor
Transport Procol Descriptors (carousel and interactive channel)
Unbound Application Descriptors
This is all valid XAIT components except for:
Application DII Location Descriptors
Application Icon Descriptors
Application Prefetch Descriptors
Application Storage Descriptors
External Application Descriptors
Registered API Descriptors
(Note this set can be generated directly from the internal API, but is not currently
implemented in the XML schema or interpreter.)
</xsd:documentation>
</xsd:annotation>
<!-- Doc root -->
<xsd:element name="XaitDefinition">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="Xait" maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="Xait">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="certificate" />
<xsd:element ref="ocTransport" minOccurs="0" maxOccurs="unbounded" />
<xsd:element ref="icTransport" minOccurs="0" maxOccurs="unbounded" />
<xsd:element ref="service" maxOccurs="unbounded" />
<xsd:element ref="application" maxOccurs="unbounded" />
</xsd:sequence>
<xsd:attribute name="version" type="xsd:unsignedInt" use="required" />
<xsd:attribute name="name" type="xsd:string" use="required" />
<xsd:attribute name="testApp" type="xsd:boolean" default="false" />
</xsd:complexType>
</xsd:element>
<xsd:element name="certificate">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="hash" minOccurs="0" maxOccurs="16"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="hash" type="xsd:string"/>
<xsd:element name="icTransport">
<xsd:complexType>
<xsd:attribute name="url" type="xsd:string" use="required" />