
You are here: MyURC.org > Tools & Prototypes > GC100jTargets > tutorial > Tutorial
GC100 Tutorial
Page Content:
Configure GC100 TDM as a UCH local resource
Add a new local resource with the following properties in .ucf file and a directory called 'gctdm'.
'gctdm' directory contains gctdm.jar and HTML files for Autoconfiguration of GC100 devices.
<?xml version="1.0" encoding="UTF-8"?>
<props>
<prop>
<name>http://myurc.org/ns/res#name</name>
<value>http://res.myurc.org/gc100/tdm/java</value>
</prop>
<prop>
<name>http://myurc.org/ns/res#dynamicLibClass</name>
<value>edu.wisc.trace.uch.tdm.gc100.GCTDM</value>
</prop>
<prop>
<name>http://myurc.org/ns/res#type</name>
<value>http://myurc.org/restypes#tdm</value>
</prop>
<prop>
<name>http://myurc.org/ns/res#platform</name>
<value>java</value>
</prop>
<prop>
<name>http://myurc.org/ns/res#devicePlatform</name>
<value>GC100</value>
</prop>
<prop>
<name>http://myurc.org/ns/res#indexFile</name>
<value>gc100/config/index.html</value>
</prop>
<prop>
<name>http://purl.org/dc/terms/conformsTo</name>
<value>http://myurc.org/TR/uch1.0-20091103/</value>
</prop>
<prop>
<name>http://myurc.org/ns/res#mimeType</name>
<value>application/zip</value>
</prop>
<prop>
<name>http://myurc.org/ns/res#resourceUri</name>
<value>gctdm</value>
</prop>
</props>
By default UCH find all TDM's in the local resource directory and instantiates them on startup, so above TDM will be initiated thereby.
Configure GC100 based TA as a UCH local resource
Add a new local resource with the following properties in .ucf file and TA jar file.
<?xml version="1.0" encoding="UTF-8"?>
<props>
<prop>
<name>http://myurc.org/ns/res#name</name>
<value>http://res.myurc.org/gc100/ta/generic/ir/java</value>
</prop>
<prop>
<name>http://myurc.org/ns/res#dynamicLibClass</name>
<value>edu.wisc.trace.uch.ta.gc100.ir.generic.IRTAFacade</value>
</prop>
<prop>
<name>http://myurc.org/ns/res#type</name>
<value>http://myurc.org/restypes#ta</value>
</prop>
<prop>
<name>http://myurc.org/ns/res#platform</name>
<value>java</value>
</prop>
<prop>
<name>http://myurc.org/ns/res#devicePlatform</name>
<value>IR</value>
</prop>
<prop>
<name>http://myurc.org/ns/res#deviceType</name>
<value>*</value>
</prop>
<prop>
<name>http://purl.org/dc/terms/conformsTo</name>
<value>http://myurc.org/TR/uch1.0-20091103/</value>
</prop>
<prop>
<name>http://myurc.org/ns/res#mimeType</name>
<value>application/java-archive</value>
</prop>
<prop>
<name>http://myurc.org/ns/res#resourceUri</name>
<value>gcirta.jar</value>
</prop>
</props>
Set the values of following properties as per TA for respective device platform:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Configure IR Code File for Generic GC100 IR Target Adapter
Please refer to How to write IR code File.
Write a GC100 Target Adapter
- GC100 TA can use a GC100ControlPoint available from the UCHLocalStore. The key is: "edu.wisc.trace.uch.tdm.gc100.lib.IGC100ControlPoint" and class name is the same as the key name. Please refer to method's available in IGC100ControlPoint documentation.
- Method IGC100ControlPoint.doAction is mainly used to execute IR, Serial or Relay commands.
- If TA is developed for serial devices then TA should implement the interface IGCUpdateListener to have latest state of Serial Device. For that TA should also register itself as a IGCUpdateListener using the method IGC100ControlPoint.addGCUpdateListener.
For other general instructions for writing a TA click here.
Last update: Parikshit Thakur & Team, 2010-04-29