Eclipse.org Eclipse.org command Device Kit

XML Element 

<command> element

Device Kit Attributes Elements XML Reference
The command tag denotes an action that can be performed by the hardware device. Usually, a message must be sent to the hardware device to cause the action to be performed. When an application requests a command to be executed, the software device requests the transport to send the command message to the hardware device. For example, you might use the command tag to send a message to a radio to ""turn volume up"" or ""turn on power"". The commands that the device should define are hardware specific. As such, the command set for a radio differs from the command set for a car bus. Also, the command set might vary based on the company that built the device. To send effective commands to hardware, be sure to use the hardware specifications from the manufacturer. Some commands can be executed with a parameter that will be encoded into the message before it is sent to the hardware device. The message that represent the command are defined in a message tag.

Examples: command examples


NameTypeDescriptionUse
Element <command> attributes
idIDSpecifies an unique identifier for this element. After defining an element with the id attribute, other elements can reference this element by using the idref attribute. Since the id attribute value is used by the code generator to generate field and method names, no spaces, periods or commas should be used.optional
implementationNameSpecifies the implementation class name.optional
idrefIDREFSpecifies a reference to the element with the matching id attribute. The matching id attribute must be specified before the idref attribute can be used.optional
type "Boolean" "Integer" "List" "Long" "Map" "Number" "Object" "String" Specifies the command data type.optional

NameDescriptionUse
Element <command> elements
<description>Specifies the command description.0 to unbounded
<history>New Specifies the command history.0 to unbounded
<optional>Defines if this command is optional.0 to 1
<units>Specifies the command data units.0 to 1
<deprecated>Specifies that the contents of this element should be marked as deprecated.0 to 1
<specreference>Specification reference for this command.0 to unbounded
<key>Specifies a unique command key.0 to 1
<configuration>Defines this command as a configuration command.0 to 1
<commandreceived>Specifies if a command message can be received from the device. 0 to 1
<rate>Specifies the polling rate in milliseconds.0 to 1
<message>Specifies the message to execute the command.0 to 1
<method>Specifies the method to execute the command.0 to 1
<data>Specifies the data to execute the command.0 to unbounded
<measurement>Specifies the measurement to get the value for the command.0 to 1

Sibling NameSibling Description
Element <command> element siblings
<commands>Specifies a command group.
<group>Defines a group supported by this concrete device.
<measurement>Defines a measurement supported by this concrete device.
<signal>Defines a signal supported by this concrete device.

Element NameElement Description
Element <command> element tree
<dkml>Specifies the root element of a Device Kit &lt;b&gt;D&lt;/b&gt;evice &lt;b&gt;K&lt;/b&gt;it &lt;b&gt;L&lt;/b&gt;anguage (dkml) document.
¦-<adapter>Specifies an adapter.
¦ ¦-<command>Defines a command supported by this concrete device.
¦ ¦ ¦-<description>Specifies the command description.
¦ ¦ ¦-<history>New Specifies the command history.
¦ ¦ ¦ ¦-<description>Description of the history.(see description)
¦ ¦ ¦ ¦-<provider>Specifies the provider history.
¦ ¦ ¦ ¦-<version>Version of the history documentation.
¦ ¦ ¦-<optional>Defines if this command is optional.
¦ ¦ ¦ ¦-<description>Description of the optional item.(see description)
¦ ¦ ¦ ¦-<history>New Specifies the optional history.(see history)
¦ ¦ ¦ ¦-<deprecated>Specifies that the contents of this element should be marked as deprecated.
¦ ¦ ¦ ¦-<specreference>Specification reference for this optional item.
¦ ¦ ¦ ¦ ¦-<description>Description of the specification reference.(see description)
¦ ¦ ¦ ¦ ¦-<deprecated>Specifies that the contents of this element should be marked as deprecated.(see deprecated)
¦ ¦ ¦ ¦ ¦-<spec>The protocol specification documentation.
¦ ¦ ¦ ¦ ¦ ¦-<description>Description of the specification.(see description)
¦ ¦ ¦ ¦ ¦ ¦-<history>New Specifies the specification history.(see history)
¦ ¦ ¦ ¦ ¦ ¦-<deprecated>Specifies that the contents of this element should be marked as deprecated.(see deprecated)
¦ ¦ ¦ ¦ ¦ ¦-<speccomment>Comment about the protocol specification documentation.
¦ ¦ ¦ ¦ ¦ ¦-<specdate>Date of the protocol specification documentation.
¦ ¦ ¦ ¦ ¦ ¦-<spectitle>Title of the protoocol specification documentation.
¦ ¦ ¦ ¦ ¦ ¦-<specurl>Url of the protocol specification documentation.
¦ ¦ ¦ ¦ ¦ ¦-<specvendor>Vendor of the protocol specification documentation.
¦ ¦ ¦ ¦ ¦ ¦-<specversion>Version of the protocol specification documentation.
¦ ¦ ¦ ¦ ¦-<specsection>The reference to section in the protocol specification documentation.
¦ ¦ ¦-<units>Specifies the command data units.
¦ ¦ ¦ ¦-<description>Description of the units.(see description)
¦ ¦ ¦ ¦-<history>New Specifies the units history.(see history)
¦ ¦ ¦ ¦-<deprecated>Specifies that the contents of this element should be marked as deprecated.(see deprecated)
¦ ¦ ¦ ¦-<specreference>Specification reference for this units.(see specreference)
¦ ¦ ¦-<deprecated>Specifies that the contents of this element should be marked as deprecated.(see deprecated)
¦ ¦ ¦-<specreference>Specification reference for this command.(see specreference)
¦ ¦ ¦-<key>Specifies a unique command key.
¦ ¦ ¦-<configuration>Defines this command as a configuration command.
¦ ¦ ¦ ¦-<description>Description of the configuration.(see description)
¦ ¦ ¦ ¦-<history>New Specifies the configuration history.(see history)
¦ ¦ ¦ ¦-<units>Specifies the configuration units.(see units)
¦ ¦ ¦ ¦-<deprecated>Specifies that the contents of this element should be marked as deprecated.(see deprecated)
¦ ¦ ¦ ¦-<specreference>Specification reference for this configuration.(see specreference)
¦ ¦ ¦ ¦-<enum>Specifies a enumeration option configuration.
¦ ¦ ¦ ¦ ¦-<description>Description of the enumeration.(see description)
¦ ¦ ¦ ¦ ¦-<history>New Specifies the enumeration history.(see history)
¦ ¦ ¦ ¦ ¦-<units>Specifies the enum units.(see units)
¦ ¦ ¦ ¦ ¦-<deprecated>Specifies that the contents of this element should be marked as deprecated.(see deprecated)
¦ ¦ ¦ ¦ ¦-<specreference>Specification reference for this enumeration.(see specreference)
¦ ¦ ¦ ¦ ¦-<key>Specifies a enumeration key.(see key)
¦ ¦ ¦ ¦ ¦-<label>Specifies a enumeration label.
¦ ¦ ¦ ¦ ¦-<value>Specifies the enumeration value.
¦ ¦ ¦ ¦ ¦ ¦-<description>Description of the value.(see description)
¦ ¦ ¦ ¦ ¦ ¦-<history>New Specifies the value history.(see history)
¦ ¦ ¦ ¦ ¦ ¦-<deprecated>Specifies that the contents of this element should be marked as deprecated.(see deprecated)
¦ ¦ ¦ ¦ ¦ ¦-<specreference>Specification reference for this value.(see specreference)
¦ ¦ ¦ ¦ ¦ ¦-<ascii>New Specifies a set of ASCII characters (8 bits) value.
¦ ¦ ¦ ¦ ¦ ¦-<bigdecimal>New Specifies an BigDecimal value.
¦ ¦ ¦ ¦ ¦ ¦-<biginteger>New Specifies an BigInteger value.
¦ ¦ ¦ ¦ ¦ ¦-<boolean>Specifies a Boolean value.
¦ ¦ ¦ ¦ ¦ ¦-<byte>Specifies a Byte value (8 bits).
¦ ¦ ¦ ¦ ¦ ¦-<bytes>Specifies bytes.
¦ ¦ ¦ ¦ ¦ ¦-<character>Specifies a character value (16 bits).
¦ ¦ ¦ ¦ ¦ ¦-<double>Specifies a Double value.
¦ ¦ ¦ ¦ ¦ ¦-<float>Specifies a Float value.
¦ ¦ ¦ ¦ ¦ ¦-<int>Specifies an Integer value (32 bits).
¦ ¦ ¦ ¦ ¦ ¦-<list>Specifies list data.
¦ ¦ ¦ ¦ ¦ ¦-<long>Specifies a Long value (64 bits).
¦ ¦ ¦ ¦ ¦ ¦-<map>Specifies a Map value.
¦ ¦ ¦ ¦ ¦ ¦-<short>Specifies a Short value (16 bits).
¦ ¦ ¦ ¦ ¦ ¦-<string>Specifies a String value.
¦ ¦ ¦ ¦ ¦ ¦ ¦-<encoding>New Specifies string encoding.
¦ ¦ ¦ ¦-<minimum>Specifies the minimum value.
¦ ¦ ¦ ¦-<maximum>Specifies the maximum value.
¦ ¦ ¦-<commandreceived>Specifies if a command message can be received from the device.
¦ ¦ ¦-<rate>Specifies the polling rate in milliseconds.
¦ ¦ ¦-<message>Specifies the message to execute the command.
¦ ¦ ¦ ¦-<description>Description of the message.(see description)
¦ ¦ ¦ ¦-<history>New Specifies the message history.(see history)
¦ ¦ ¦ ¦-<deprecated>Specifies that the contents of this element should be marked as deprecated.(see deprecated)
¦ ¦ ¦ ¦-<specreference>Specification reference for this message.(see specreference)
¦ ¦ ¦ ¦-<ascii>Specifies a set of ASCII characters (8 bits) within the message.(see ascii)
¦ ¦ ¦ ¦-<bytes>Specifies a set of bytes. Each byte is 8 bits within the message.(see bytes)
¦ ¦ ¦ ¦-<nibbles>Specifies a set of nibbles. Each nibble is 4 bits within the message.
¦ ¦ ¦ ¦-<string>New Specifies a set of string characters within the message.(see string)
¦ ¦ ¦ ¦-<utf8>Specifies a set of UTF-8 characters within the message.
¦ ¦ ¦ ¦-<tokens>Specifies the message tokens.
¦ ¦ ¦ ¦-<parameters>Specifies a group of parameters.
¦ ¦ ¦ ¦ ¦-<description>Specifies the parameters description.(see description)
¦ ¦ ¦ ¦ ¦-<history>New Specifies the parameters history.(see history)
¦ ¦ ¦ ¦ ¦-<units>Specifies the parameters units.(see units)
¦ ¦ ¦ ¦ ¦-<deprecated>Specifies that the contents of this element should be marked as deprecated.(see deprecated)
¦ ¦ ¦ ¦ ¦-<specreference>Specification reference for this group of parameters.(see specreference)
¦ ¦ ¦ ¦ ¦-<key>Specifies the unique parameters key.(see key)
¦ ¦ ¦ ¦ ¦-<parameters>Specifies the parameters.(see parameters)
¦ ¦ ¦ ¦-<filter>Specifies the message filter.
¦ ¦ ¦ ¦ ¦-<description>Description of the filter.(see description)
¦ ¦ ¦ ¦ ¦-<history>New Specifies the filter history.(see history)
¦ ¦ ¦ ¦ ¦-<deprecated>Specifies that the contents of this element should be marked as deprecated.(see deprecated)
¦ ¦ ¦ ¦ ¦-<specreference>Specification reference for this filter.(see specreference)
¦ ¦ ¦ ¦ ¦-<bytes>Specifies the message filter (Bit off - ignore, Bit on - compare).(see bytes)
¦ ¦ ¦ ¦-<sentmessage>Specifies the message that was sent that caused this message.
¦ ¦ ¦-<method>Specifies the method to execute the command.
¦ ¦ ¦-<data>Specifies the data to execute the command.
¦ ¦ ¦ ¦-<description>Description of the data.(see description)
¦ ¦ ¦ ¦-<history>New Specifies the data history.(see history)
¦ ¦ ¦ ¦-<optional>Defines if this data item is optional.(see optional)
¦ ¦ ¦ ¦-<units>Specifies the data units.(see units)
¦ ¦ ¦ ¦-<deprecated>Specifies that the contents of this element should be marked as deprecated.(see deprecated)
¦ ¦ ¦ ¦-<specreference>Specification reference for this data.(see specreference)
¦ ¦ ¦ ¦-<key>Specifies the data key.(see key)
¦ ¦ ¦ ¦-<enum>New Specifies a enumeration.(see enum)
¦ ¦ ¦ ¦-<length>Specifies the data length in bits. See the size element to specify the data length in bytes.
¦ ¦ ¦ ¦-<size>Specifies the data size in bytes. See the length element to specify the data length in bits.
¦ ¦ ¦ ¦-<minimum>Specifies the minimum value.(see minimum)
¦ ¦ ¦ ¦-<maximum>Specifies the maximum value.(see maximum)
¦ ¦ ¦ ¦-<data>Specifies the data to execute the command.(see data)
¦ ¦ ¦-<measurement>Specifies the measurement to get the value for the command.
¦ ¦-<commands>Specifies a command group.
¦ ¦ ¦-<command>Specifies the command within the group of commands.(see command)
¦ ¦-<group>Defines a group supported by this concrete device.
¦ ¦ ¦-<command>Specifies a command that is supported by this group.(see command)
¦ ¦ ¦-<commands>Specifies a command group.(see commands)
¦ ¦ ¦-<group>Specifies a group.(see group)
¦ ¦-<device>Specifies the device used by the adapter.
¦ ¦ ¦-<command>Specifies a command that is supported by this device.(see command)
¦ ¦ ¦-<commands>Specifies a command group.(see commands)
¦ ¦ ¦-<group>Defines a group supported by this device.(see group)
¦-<adaptertest>Specifies an adapter test.
¦ ¦-<adapter>Specifies the adapter to be tested.(see adapter)
¦-<agent>Specifies an agent.
¦ ¦-<agentmodel>Specifies the agent model used by the agent.
¦ ¦ ¦-<device>Specifies the device used by the agent model.(see device)
¦ ¦-<device>Specifies the device used by the agent.(see device)
¦ ¦-<command>Specifies a command that is supported by this device.(see command)
¦ ¦-<commands>Specifies a command group.(see commands)
¦ ¦-<group>Defines a group supported by this device.(see group)
¦-<agentmodel>Specifies the agent model used by the agent.(see agentmodel)
¦-<agenttest>Specifies an agent test.
¦ ¦-<agent>Specifies the agent to be tested.(see agent)
¦ ¦-<agentmodeltest>Specifies the agent model test.
¦ ¦ ¦-<agentmodel>Specifies the agent model to be tested.(see agentmodel)
¦-<agentmodeltest>Specifies an agent model test.(see agentmodeltest)
¦-<concrete>Specifies a concrete device.
¦ ¦-<command>Defines a command supported by this concrete device.(see command)
¦ ¦-<commands>Specifies a command group.(see commands)
¦ ¦-<group>Defines a group supported by this concrete device.(see group)
¦-<concretetest>Specifies a concrete test.
¦ ¦-<concrete>Specifies the concrete device to be tested.(see concrete)
¦-<device>Specifies a device.(see device)
¦-<devicetest>Specifies a device test.
¦ ¦-<device>Specifies the device to be tested.(see device)
¦-<profile>Specifies a profile.
¦ ¦-<command>Specifies a command that is supported by this profile.(see command)
¦ ¦-<commands>Specifies a command group.(see commands)
¦ ¦-<group>Defines a group supported by this profile.(see group)
¦ ¦-<adapter>Specifies the adapter used by the profile.(see adapter)
¦ ¦-<device>Specifies the device used by the profile.(see device)
¦-<profiletest>Specifies a profile test.
¦ ¦-<profile>Specifies the profile to be tested.(see profile)
¦-<testagent>Specifies a test agent.
¦ ¦-<profile>Specifies the profile to be tested.(see profile)

Copyright (c) 2009 IBM. See license in Legal section. 2009-01-22 Device Kit XML Reference 1.2.0