skip navigation
URC Consortium Logo

You are here: MyURC.org > TR > ir-serial-codes-file1.0-20091105 > Draft

IR/Serial Codes File Format 1.0 (DRAFT)

Draft Technical Report 2009-11-05

This version: http://myurc.org/TR/ir-serial-codes-file1.0-20091105/
Latest version: http://myurc.org/TR/ir-serial-codes-file1.0/
Previous draft version: (none)
Latest approved version: (none)
Editor: Parikshit Thakur

Copyright © 2009, Universal Remote Console Consortium (URCC)

Abstract

This document describes the format of IR or serial codes files, as used by Generic Target Adapters connecting to IR or serial-controlled legacy devices.

"IR code file" resource has property http://myurc.org/ns/res#type = http://myurc.org/TR/uch/#irconfig

"Serial code file" resource has property http://myurc.org/ns/res#type = http://myurc.org/TR/uch/#serialconfig

Status of this Document

This is a public Draft Technical Report, developed by the editor, hereby made available for review by URCC members and the public.

Comments on this document should be sent to the editor.

Publication as a Draft Technical Report does not imply endorsement by the URCC membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.

Open Issues / To Dos [to be removed before release]

  1. In case of a UIS variable, we want to specify the exact value to set for that variable. Current XML spec only has command name, whereas we should have command/variable name and value to be set.
  2. Provide an XSD.

Change Log [to be removed before final release]

NOTE: The change log is in reverse chronological order.

2009-08-13 Plenar Technologies:


Table of Contents:


1. Introduction

2. IR Codes File Format

IR code XML file includes details of the device, command names and Pronto Hex codes for each command. Mapping of UI Socket commands to actual IR codes is included here. Provided such a file, a Generic IR Target Adapter can control any IR device.

A sample example of IR code file(Pronto code file) is prontocode-denonrc-1017.config.

<prontoCodes>
	<manufacturer>Manufacturer</manufacturer>
	<modelNumber>[Model Number]</modelNumber>
	<command>
		<name>[Command Name]</name>
		<code>[Pronto Code]</code>
	</command>
</prontoCodes>

Whereby:

 Element Name   Occurrence   Parent Element   Child Element(s)   Description 
prontoCodes 1 - manufacturer, modelNumber, command Contains all necessary information in XML 1.0 format.
manufacturer 1 prontoCodes Text Node Specify the manufacturer name.
modelNumber 1 prontoCodes Text Node Specify the model number.
command 1 or more prontoCodes name, code Contains information about IR Command.
name 1 command Text Node Specify the name of the command.
The name text should coincide with the command ID in the UI Socket.
code 1 command Text Node Specify the Pronto Hex IR code for the relevant command.

3. Serial Codes File Format

There is currently no generic Target Adapter for serial devices. Initial implementations include a Target Adapter for serial control of the DENON 1940CI DVD player. The file formats specified in this section apply to this DVD player only, and might be replaced by a more generic format in future versions of this specification. A sample example of Serial code file is serialcode-denonrc-1017.config.

<!-- Serial codes file for DVD player DENON 1940CI -->
<serialCodes>
   <manufacturer>[Manufacturer]</manufacturer>
   <modelName>[Model Name]</modelName>
   <modelNumber>[Model Number]</modelNumber>
   <commands>
      <command>
         <name>[Command Name]</name>
         <requestCode>[Request Code]</requestCode>
         <successResp>
            <code length=[Length]>
               <value type="header"></value>
               <value type="value" position="[Position]" length="[Length]" > 
                  <uisElement name="[Element Name]"> 
                     <valueFormat>[Value Format]</valueFormat>
                     <valueMapping forPosition="[For Position]">[Value Map Name]</valueMapping> 
               </value>
            </code>
         </successResp> 
         <failureResp> 
            <code length=[Length]>  
               <value type="header"></value> 
               <value type="value" position="[Position]" length="[Length]" > 
                  <uisElement name="[Element Name]"> 
                     <valueFormat>[Value Format]</valueFormat> 
                     <valueMapping forPosition="[For Position]">[Value Map Name]</valueMapping> 
               </value>
            </code>
         </failureResp>
      </command>
   </commands>
   <updates> 
      <update> 
         <code length=[Length]> 
            <value type="header">[Value]</value> 
            <value type="value" position="[Position]" length="[Length]" >
               <uisElement name="[Element Name]">
                  <valueFormat>[Value Format]</valueFormat>
                  <valueMapping forPosition="[For Position]">[Value Map Name]</valueMapping>
            </value>
         </code>
      </update>
   </updates>
   <valueMaps> 
      <valueMap> 
         <pair>
            <hexValue>[HEX Byte]</hexValue>
            <value>[Value]</value>
         </pair>
      </valueMap>
   </valueMaps>
</serialCodes>

Whereby:

 Element Name   Occurrence   Parent Element   Child Element(s)   Description 
serialCodes 1 - manufacturer, modelName, modelNumber,
commands, updates, valueMaps
contain all necessary information in XML 1.0 format.
manufacturer 1 serialCodes Text Node Specify the manufacturer name.
modelName 1 serialCodes Text Node Specify the model name.
modelNumber 1 serialCodes Text Node Specify the model number.
commands 0 or more serialCodes command Contains information about Serial Commands.
command 1 or more commands name, requestCode, successResp, failureResp Contains information about commands like
Command Name, Request Code, Success Response Code(s), Failure Response Code(s).
name 1 command Text Node Specify the name of command.
The name text should coincide with the command ID in the UI Socket.
requestCode 1 command Text Node Specify the Serial request code for the relevant command.
successResp 0 or more command code Specify the response format, if command is invoked successfully.
code 1 or more successResp value Specify details about success code.
value 1 or more code Text Node/uisElement If <value> element has 'type' attribute value equal to 'header', then its text value represents the prefix of serial response.
If <value> element has 'type' attribute value equal to 'value', then it must contain the attributes 'position' and 'length'.
'position' and 'length' represent a sub-part of response which has meaningful value of relevant UI Socket Element ('uisElement').
uisElement 1 value valueFormat, valueMapping Specify relevant UI Socket Element and its format.
valueFormat 1 uisElement Text Node Specify the Socket Element value format.Its value contains comma separated string.
String may contain dynamic value which is represented between square brackets([ and ]).
Value between the square brackets([ and ]) specifies a location in response and its value mapped in <valueMapping> element.
valueMapping 0 or more uisElement Text Node Contains an attribute 'forPosition' which specifies a location in response code. Its value is mapped with the valueMap specified by Value Map Name.
failureResp 0 or more command code Specify the response format, if command not invoked successfully.
It shall contain one or more <code> elements which represents same information as that of <successResp>.
updates 0 or more serialCodes update Specify serial updates.
update 1 or more updates code Contains one or more <code> elements.
<code> element represents same information as that of <successResp> element.
valueMaps 0 or more serialCodes valueMap Contains number of Value Maps.
valueMap 1 or more valueMaps pair Specify meaningful value of hex bytes. It contains a name attribute which is mapped with the text value of <valueMapping> node.
pair 1 or more valueMap hexValue Contains pairs of hex byte and value.
hexValue 1 pair Text Node Specify a hex byte.
value 1 pair Text Node Specify meaningful value of the relevant hex byte.

4. References

For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.

[RES-PROP-VOCAB]
URC Consortium: Resource Property Vocabulary. Latest specification available at: http://myurc.org/TR/res-prop-vocab/

This site is maintained by the University of Wisconsin Trace Center, a member of the Universal Remote Console Consortium.