This document describes the Smart Templates recognized by personal universal controllers (PUCs). Smart Templates are used in the specification of appliances for the PUC as a way of indicating where higher-level relationships exist beyond those that are describable in the current specification language.
As a general rule, interface generators are not required to understand any of the Smart Templates described in this document. This is why state and command information is an integral part of the Smart Templates description. If an interface generator does not know about a given template, then it can easily fallback to the states and commands that make up the template.
The states and commands also allow Smart Templates to be flexible. One template can be made up of a number of different combinations of states and commands, which reflects the different ways that an appliance might implement the functionality of a Smart Template. For example, a media playback control on a tape player will have play, stop, pause, fast-forward, and rewind modes. On a CD player, the same control would have play, stop, and pause, but have next track and previous track instead of fast-forward and rewind. The states and commands underlying a Smart Template allow such differentiation without requiring a number of different templates for playback controls. The interface generator that handles such a template must examine the states and commands that make up the template in order to create a control that matches the appliance and yet matches other instances of the same template.
The next section of this document shows how Smart Templates are specified within the existing specification language. A list of proposed templates is presented, and then detailed descriptions of those Smart Templates are shown.
Smart Templates may be assigned by specifying the name of the
template in the group
's is-a
attribute. To help interface generators recognize the
components of the template, each state and command within a
Smart Template is labeled with a particular name that is defined
in advance for that template. Here are three examples of Smart
Templates in a PUC specification:
<group name="CountdownTimer" is-a="time-duration">
<state name="Time">
<type>
<integer/>
</type>
<labels>
<label>Countdown Timer</labels>
<label>Timer</labels>
</labels>
</state>
</group>
<state name="Time" is-a="time-duration">
<type>
<string/>
</type>
<labels>
<label>Countdown Timer</labels>
<label>Timer</labels>
</labels>
</state>
<group name="CountdownTimer" is-a="time-duration">
<labels>
<label>Countdown Timer</label>
<label>Timer</label>
</labels>
<state name="Minutes">
<type>
<integer/>
</type>
<labels>
<label>Minutes</labels>
<label>Mins</labels>
</labels>
</state>
<state name="Seconds">
<type>
<integer>
<min>0</min>
<max>60</max>
</integer>
</type>
<labels>
<label>Seconds</label>
<label>Secs</label>
</labels>
</state>
</group>
These examples are based on the time-duration
Smart
Template. Note that in the first and third examples the
group
is labeled with the Smart Template being
applied. In the second case, a state is labeled with a Smart
Template directly (thus eliminating the need for an extra
group). In the first and third examples, the state variables
have particular names that are defined in advance by the detailed Smart Template
description.
If a state is defined with a Smart Template group that an interface generator does not recognize (for example, perhaps the Smart Template was updated since the interface generator was built), then the interface generator is expected to render that state as it would normally.
The following list of templates are those considered for inclusion in a PUC. Those that are linked have been defined in more detail, and may have been implemented in some interface generators.
address
date
date-time
four-way-dpad
four-way-dpad-with-enter
image
image-list
list-commands
media-controls
mute-mic
mute-speaker
power
telephone-dialpad
time-absolute
time-duration
volume
zoom-controls
These templates are currently defined:
address
date
date-time
four-way-dpad
four-way-dpad-with-enter
image
image-list
list-commands
media-controls
time-absolute
time-duration
zoom-controls
See the implementation notes for a particular type to check if it has been implemented in any interface generators.
Represents an address, like might be entered into a navigation system.
Date | Name | Comments |
---|---|---|
01-10-2005 | Jeff Nichols | First description of the address Smart Template. |
This template only supports the Multi-State form. In the future, it might make sense to support a single state string form that contains a parsable address, but this is not required now.
There are no required states in this template. This allows the template to be used in a number of situations where a partial piece of an address is needed, such as zip code by itself. The different states in this template are:
StreetName
ApartmentNumber
StreetNumber
City
State
ZipCode
Country
PocketPC
This template describes data that stores a date. This might be used by an appliance to store and display the current date, or to record a date in the future when some pre-defined action will be taken. This template currently supports both single state and multiple state instantiations.
Date | Name | Comments |
---|---|---|
06-29-2005 | Jeff Nichols | First description of the date Smart Template. |
The contents of this Smart templkate may be represented in several different ways. One state with the string type may be used, or multiple states may be used. For the single state variable case there are the following type restrictions:
If multiple states are used to represent the date
,
they must have the following form:
Month
Day
Year
In progress on PocketPC.
This template combines a date template with a time-absolute template to form a complete representation for dates and times together.
Date | Name | Comments |
---|---|---|
06-29-2005 | Jeff Nichols | First description of the date-time Smart
Template. |
The contents of this Smart template may be represented in
several different ways. One state with the string type may be
used, or the template may contain two groups that separately
instantiate the date
and time-aboslute
smart templates. If one state variable is used, it has the
following restrictions:
If two groups are used, then one of those groups must be tagged
with date
and the other must be tagged with
time-absolute
. These groups must conform to the
restictions for these other Smart Templates.
In progress on PocketPC.
This template represents a four-way directional control.
Date | Name | Comments |
---|---|---|
02-09-2005 | Jeff Nichols | First description of the four-way-dpad Smart Template. |
This template may only be applied to a group that includes four commands. The commands must be:
Left
Right
Top
Bottom
PocketPC.
This template represents a four-way directional pad with an enter function.
Date | Name | Comments |
---|---|---|
02-09-2005 | Jeff Nichols | First description of the four-way-dpad-with-enter Smart Template. |
This template must include the four-way-dpad
smart
template and one extra command:
Enter
PocketPC.
This Smart Template represents any kind of image data, regardless of the underlying format.
Date | Name | Comments |
---|---|---|
12-23-2003 | Jeff Nichols | First description of the image Smart Template. |
This Smart Template may be applied to a state or a group. If
the template is applied to a group, then that group must contain
one state with the name Image
. The state must have
the binary primitive type. This template should support the
following parameters for the binary type:
arbitrary-scaling
fixed-height
fixed-width
minimum-height
minimum-width
Complete for PocketPC and Smartphone.
This Smart Template represents a one-dimensional list of images, regardless of the underlying format of the images or the other variables in the list. It is expected that this template will use a conventional layout for showing a list of images (e.g. thumbnails) and pass any remaining variables in the list to interface generator for normal rendering.
Date | Name | Comments |
---|---|---|
12-23-2003 | Jeff Nichols | First description of the image-list Smart Template. |
This Smart Template must be applied to a list group. That list
group may contain any number of variables and commands, but one
state variable must have a binary type and be named
Image
.
Complete for PocketPC and Desktop.
This template is for commands that manipulate list data, such as
adding, deleting, or moving list items. This is the first
example of a nested template, which means that the
template must contains other templates. In this case, there is
a list-commands
template which may only contain
list-add
, list-remove
,
list-clear
, list-move-after
, or
list-move-before
templates.
One tricky aspect of the list-commands
template is
linking each template instance to the list that it manipulates.
This is done by requiring that the template be at the same level
and immediately precede the list group that it manipulates. We
suggest that each pair of commands and list group be placed in
their own group, but this is not required.
Date | Name | Comments |
---|---|---|
02-05-2005 | Jeff Nichols | First description of the list-commands Smart Template. |
The list-commands
template only supports the
multi-state form. The constituent templates
list-add
, list-remove
,
list-clear
, list-move-after
, and
list-move-before
must be single commands.
Constituent templates may be used outside of the
list-commands
template.
As mentioned above, any instance of the
list-commands
template must be placed at the same
level of the specification tree immediately preceding the
list-group that the command modify. This requirement is also
true of any of the consituent templates when used outside of the
list-commands
template.
The following are descriptions of the constituent templates:
list-add
list-remove
list-clear
list-move-after
list-move-before
PocketPC
This template represents the interactions that control the playback of any audio/visual media, such as a CD, MP3, or VHS tape. This template supports either state- or command-based representations of the controls, and also handles related functions such as Next Track and Previous Track.
Date | Name | Comments |
---|---|---|
6-17-2003 | Jeff Nichols | First description of the media-controls
type. |
6-18-2003 | Jeff Nichols | Updated to match new group type concept and rules. |
12-22-2003 | Jeff Nichols | Updated to use "Smart Templates" lingo and rules. |
This Smart Template may represent the controls as a single state
variable and/or several commands. The state-based
representation must have an enumerated type with standardized
labels mapped to each value in the type in the
valueLabels
section. The state must have the name
Mode
. The labels are described below. Other
labels may be included in addition to the standardized ones for
the benefit of interface generators that don't recognize this
Smart Template.
Stop
Play
Pause
Rewind
Fast-Forward
Record
If no state information is available from the appliance, a
command-based description may be used instead. Such a
representation must include one or more of the following
commands. These commands should not be included if the
Mode
state is included in the description.
Allowable commands are:
Play
Stop
Pause
Rewind
FastFwd
Record
In addition to having either the state or a set of commands, additional states and commands may be specified that will be integrated with the rest of the playback controls.
NextTrack
PrevTrack
NOTE: Other playback modes may be possible and should probably be considered. These include:
Complete for PocketPC, Smartphone and Desktop. Smartphone implementation is limited and should probably be re-visited.
This template specifies absolute time, i.e. time-of-day. This includes the time value along with parameters of the time such as the time zone, 12/24 hour mode, etc.
Date | Name | Comments |
---|---|---|
02-09-2005 | Jeff Nichols | First description of the time-absolute Smart Template. |
This template supports both the single and multi-state specification methods. The single state method may only represent an absolute time value in 24-hour units. This value may be rendered as a 12-hour time value with AM/PM depending on the configuration of the user's device. The multi-state method may also include parameters for the time value, as described below.
The single state form may have one of four primitive types:
hh:mm:ss
or hh:mm
, where h = hours, m
= minutes, and s = seconds. Note
that unlike the time-duration
template, digits may
be omitted if they are not significant. In other words,
1:45:56
has the same meaning as
01:45:56
. An arbitrary number of digits may be
used for representing the fractions of a second.
If multiple states are used to represent the
time-absolute
template, then they must have the
following form:
Time
Hours
Time
state is not specified, and may not be
included if the Time
state is defined.Minutes
Time
state is specified, and may not be included if the
Time
state is defined.Seconds
Time
state, but is otherwise optional.TimeZone
DaylightSavings
HourMode
Increments may be specified only for the least significant unit. For example, if a particular template defines an hours state and a minutes state then an increment may be specified only for the minutes state. Another template that defines all four of the possible states may only have an increment specified for the fraction state.
PocketPC
This template describes data that stores a duration of time. This could be used by media player devices to describe the length of a song or the current playback point in a song, or by microwaves to display the amount of cooking time that remains. This template supports resolutions in the fractions of a second, seconds, minutes and hours. The fractions of a second resolution is purposely left ambiguous and may be defined by the specification designer by defining a range for the state. Milliseconds might be the fraction used for a timer application, whereas frame number might be used by a VCR or other video application.
Date | Name | Comments |
---|---|---|
6-13-2003 | Jeff Nichols | First description of the time-duration type. |
6-15-2003 | Jeff Nichols | Created test specification and added link. |
6-18-2003 | Jeff Nichols | Updated to match new group type concept and rules. |
12-23-2003 | Jeff Nichols | Updated to use "Smart Templates" lingo and rules. |
The contents of this Smart Template may be represented in several different ways. One state with one of four primitive types may be used, or multiple states with an integer type may be used. If one state is used, the Smart Template must be applied directly to that state (see Example #2 above). The allowable types are:
hh:mm:ss:fff
, mm:ss:fff
,
hh:mm:ss
, or mm:ss
, where h = hours, m
= minutes, s = seconds, and f = fractions of a second. Note
that it is not optional to omit digits if they are not
significant. In other words, 1:45:56
is not valid,
but both 01:45:56
and 01:45:560
are.
Also note that three digits are required for fractions of second
component, if it is used.
If multiple states are used to represent the
time-duration
, they must have the following form:
Hours
Minutes
Hours
state is specified. Minimum and
maximum are optional if Hours
is not specified. This
state must be included if both the Hours
and
Seconds
states are specified.Seconds
Minutes
state is specified. Minimum and
maximum are optional if Minutes
is not
specified. This state must be included if both the
Minutes
and Fraction
states are
specified.Fraction
Increments may be specified only for the least significant unit. For example, if a particular template defines an hours state and a minutes state then an increment may be specified only for the minutes state. Another template that defines all four of the possible states may only have an increment specified for the fraction state.
Complete for PocketPC, Desktop and Smartphone.
A specification for testing time-duration
Smart Template handlers is available in the repository at
specs/time-duration.xml
.
This template represents controls for zooming something on the appliance.
Date | Name | Comments |
---|---|---|
02-09-2005 | Jeff Nichols | First description of the zoom-controls Smart Template. |
This template may include two commands, only one of which must be included:
In
Out
PocketPC