Eclipse.org Eclipse.org writecommand Device Kit

XML Element 

<writecommand> 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: writecommand examples


NameTypeDescriptionUse
Element <writecommand> 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 <writecommand> 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 <writecommand> element siblings
<method>Specifies the method.

Element NameElement Description
Element <writecommand> 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.

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