The whole template is enclosed in an template tag, with a name attribute:
- object: reference to another object
- data: custom data
Each tag must have a name attribute. For commands and channels, the uri and type shouldn't be specified in arguments; the user will be able to edit them anyway, since they are mandatory. Other parameters are automatically added, eg. the "call" attribute for TACO commands.
Each tag can have arguments, described in child 'arg' tags, with the following syntax: <arg name="some_name" type="some_type"/>
The name attribute is mandatory.Available types are:
The widget used for data entry depends on the type (text editing widget, spinbox or combobox. Depending on the type, some additional attributes are
- int and float: min and max, the minimum and maximum acceptable values for the widget
- combo: values, which is a string of acceptable values separated by pipes ('|').
Example: Define a device with 1 command, 1 channel and some custom data
<template name="my_device"> <command name="my_command"/> <channel name="my_channel"/> <data name="my_custom_data"> <arg name="somearg" type="combo" values="val|val2|val3"/> </data> </template>