Controlling the central power supply via XML
G&D MultiPower-12-NT ·
15
English
Use of device IDs
For responses and messages of the XML API, device IDs are output as hexadecimal
values with the prefix
0x
.
In commands, device IDs can be stated as hexadecimal values with the prefix
0x
, as
octal values with the prefix
0
or as decimal values. Leading zeros in the ID are
optional for hexadecimal notation.
Responses and messages of G&D devices
After processing an XML document, the G&D device always responds with a
com-
plete
XML document.
Responses of the device
The responses of the device are included in a
<result>
tag.
The attribute <
type>
includes the name of the executed command. When executing
several commands within the same XML document (see below), you can assign the
responses to different commands.
In the following example, the temperature of a central power supply was queried.
The available information is listed within the
<item>
tags:
ADDRESSING THE CENTRAL POWER SUPPLY BY ID
<?xml version="1.0" encoding="utf-8"?>
<root>
<powerupoutlet>
<MultiPowerSwitch>0x0000000A</MultiPowerSwitch>
<Outlet>1</Outlet>
</powerupoutlet>
</root>
EXEMPLARY RESPONSE OF THE XML API
<?xml version="1.0" encoding="utf-8"?>
<root>
<result type="monitor">
<MultiPowerSwitch>
<item>
<id>0x0000000A</id>
<name>MultiPower-NT</name>
<monitorName>Temperature</monitorName>
<value>36.5</value>
<alarm>off</alarm>
<acknowledged>no</acknowledged>
</item>
</MultiPowerSwitch>
</result>
</root>