Controlling the KVM switch via XML
23
· G&D DL-DVI-MUX2-NT
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.
Use of port names
Port names are always displayed in a
visible notation
. The port names are the same as
printed on the device panel.
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
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 the different commands.
Messages of the device
If the XML service is not able to process a request, the service responds with an
error document:
Depending on the type of message, responses to commands, which are not executed
by the XML service itself, but are delegated to the device service of the KVM switch,
are shown in different XML containers.
EXEMPLARY RESPONSE OF XML API
<?xml version="1.0" encoding="utf-8"?>
<root>
<result type="nextmuxchannel">
<commandStatus>Command 'connectMux' succeeded.</commandStatus>
</result>
</root>
STRUCTURE OF AN ERROR DOCUMENT
<?xml version="1.0" encoding="utf-8"?>
<root>
<Error>Invalid request document</Error>
</root>