D15335.08 Cisco TelePresence MX700 and MX800 API Reference Guide CE9.2, NOVEMBER 2017.
Copyright © 2017 Cisco Systems, Inc. All rights reserved.
29
Cisco TelePresence MX700 and MX800
API Reference Guide
Synchronous API calls
The API works asynchronously. This means that there is no
guarantee that command responses arrive in the same order
as the commands were issued. The codec may also respond
with feedback between your request and the response, in
form of status changes or events, due to changes on the
system.
For some applications it might be crucial to match requests
with responses. The API therefore supports a response-
tagging mechanism.
This mechanism works with all command types: xcommand,
xconfiguration, and xstatus. A typical use of this would be
to create a command queue in your application and assign
unique IDs to every command sent to the codec. A listener
then listens to all feedback from the codec and matches
the ID on the response with the corresponding ID in the
command queue. This enables matching the original request
with the specific response.
Example:
xcommand Video Layout Add | resultId=”mytag _ 1”
OK
*r VideoLayoutAddResult (status=OK):
LayoutId: 1
** resultId: “mytag _ 1”
** end
In XML mode the resultId is added as an attribute to the top-level XmlDoc tag:
xgetxml /Configuration/Video/Layout/Scaling | resultId=”mytag _ 2”
<XmlDoc resultId=”mytag _ 2”>
<Configuration item=”1”>
<Video item=”1”>
<Layout item=”1”>
<Scaling item=”1” valueSpaceRef=”...”>Off</Scaling>
</Layout>
</Video>
</Configuration>
</XmlDoc>
Introduction
About the API
xConfiguration
Appendices
xCommand
xStatus
About the API