3 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
7 <html xmlns="http://www.w3.org/1999/xhtml">
9 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
11 <title>1. Communication — CasparCG 2.0 documentation</title>
13 <link rel="stylesheet" href="../_static/default.css" type="text/css" />
14 <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
16 <script type="text/javascript">
17 var DOCUMENTATION_OPTIONS = {
20 COLLAPSE_INDEX: false,
25 <script type="text/javascript" src="../_static/jquery.js"></script>
26 <script type="text/javascript" src="../_static/underscore.js"></script>
27 <script type="text/javascript" src="../_static/doctools.js"></script>
28 <script type="text/javascript" src="../_static/sidebar.js"></script>
29 <link rel="search" type="application/opensearchdescription+xml"
30 title="Search within CasparCG 2.0 documentation"
31 href="../_static/opensearch.xml"/>
32 <link rel="author" title="About these documents" href="../about.html" />
33 <link rel="copyright" title="Copyright" href="../copyright.html" />
34 <link rel="top" title="CasparCG 2.0 documentation" href="../index.html" />
35 <link rel="up" title="AMCP 2.0 Reference" href="index.html" />
36 <link rel="next" title="5. Basic Commands" href="basic-commands.html" />
37 <link rel="prev" title="AMCP 2.0 Reference" href="index.html" />
45 <li class="right" style="margin-right: 10px">
46 <a href="../genindex.html" title="General Index"
47 accesskey="I">index</a></li>
49 <a href="basic-commands.html" title="5. Basic Commands"
50 accesskey="N">next</a> |</li>
52 <a href="index.html" title="AMCP 2.0 Reference"
53 accesskey="P">previous</a> |</li>
54 <li><a href="../index.html">CasparCG 2.0 documentation</a> »</li>
56 <li><a href="index.html" accesskey="U">AMCP 2.0 Reference</a> »</li>
60 <div class="document">
61 <div class="documentwrapper">
62 <div class="bodywrapper">
65 <div class="section" id="communication">
66 <span id="introduction"></span><h1>1. Communication<a class="headerlink" href="#communication" title="Permalink to this headline">¶</a></h1>
68 <li><p class="first">All communication is presumed to be encoded in UTF-8.</p>
70 <li><dl class="first docutils">
71 <dt>Each command has to be terminated with both a carriage return and a linefeed character. For example:</dt>
72 <dd><ul class="first last simple">
74 <li><CR><LF></li>
75 <li><0x0D><0x0A></li>
76 <li><13><10></li>
81 <li><p class="first">The whole command string is case insensitive.</p>
83 <li><p class="first">Since the parameters in a command is separated by spaces, you need to enclose the parameter with quotation marks if you want it to contain spaces.</p>
87 <div class="section" id="backwards-compatibility">
88 <h1>2. Backwards Compatibility<a class="headerlink" href="#backwards-compatibility" title="Permalink to this headline">¶</a></h1>
89 <p>The AMCP 2.0 protocol implementation is mostly backward compatible with the previous CasparCG 1.7.1 AMCP Protocol and CasparCG 1.8.0 AMCP Protocol. This is achieved by providing default values for parameters used by the AMCP 2.0 protocol.</p>
90 <div class="section" id="breaking-changes">
91 <h2>2.1. Breaking Changes<a class="headerlink" href="#breaking-changes" title="Permalink to this headline">¶</a></h2>
93 <li>The ‘’CLEAR’’ command will also clear any visible template graphic in the specified container.</li>
97 <div class="section" id="special-sequences">
98 <h1>3. Special sequences<a class="headerlink" href="#special-sequences" title="Permalink to this headline">¶</a></h1>
99 <p>Since bare quotation marks are used to keep parameters with spaces in one piece, there has to be another way to indicate a quotation mark in a string. Enter special sequences. They behave as in most programming languages. The escape character is the backslash character. In order to get a quotation mark you enter ” in the command.
102 <li>\” Quotation mark</li>
103 <li>\\ Backslash</li>
106 <p>These sequences apply to all parameters, it doesn’t matter if it’s a file name or a long string of xml-data.</p>
108 <div class="section" id="return-codes">
109 <h1>4. Return codes<a class="headerlink" href="#return-codes" title="Permalink to this headline">¶</a></h1>
110 <div class="section" id="information">
111 <h2>4.1. Information<a class="headerlink" href="#information" title="Permalink to this headline">¶</a></h2>
113 <li>100 [action] - Information about an event.</li>
114 <li>101 [action] - Information about an event. A line of data is being returned.</li>
117 <div class="section" id="successful">
118 <h2>4.2. Successful<a class="headerlink" href="#successful" title="Permalink to this headline">¶</a></h2>
120 <li>200 [command] OK - The command has been executed and several lines of data are being returned (terminated by an empty line).</li>
121 <li>201 [command] OK - The command has been executed and a line of data is being returned</li>
122 <li>202 [command] OK - The command has been executed</li>
125 <div class="section" id="client-error">
126 <h2>4.3. Client Error<a class="headerlink" href="#client-error" title="Permalink to this headline">¶</a></h2>
128 <li>400 ERROR - Command not understood</li>
129 <li>401 [command] ERROR - Illegal video_channel</li>
130 <li>402 [command] ERROR - Parameter missing</li>
131 <li>403 [command] ERROR - Illegal parameter</li>
132 <li>404 [command] ERROR - Media file not found</li>
135 <div class="section" id="server-error">
136 <h2>4.4. Server Error<a class="headerlink" href="#server-error" title="Permalink to this headline">¶</a></h2>
138 <li>500 FAILED - Internal server error</li>
139 <li>501 [command] FAILED - Internal server error</li>
140 <li>502 [command] FAILED - Media file unreadable</li>
149 <div class="sphinxsidebar">
150 <div class="sphinxsidebarwrapper">
151 <h3><a href="../contents.html">Table Of Contents</a></h3>
153 <li><a class="reference internal" href="#">1. Communication</a></li>
154 <li><a class="reference internal" href="#backwards-compatibility">2. Backwards Compatibility</a><ul>
155 <li><a class="reference internal" href="#breaking-changes">2.1. Breaking Changes</a></li>
158 <li><a class="reference internal" href="#special-sequences">3. Special sequences</a></li>
159 <li><a class="reference internal" href="#return-codes">4. Return codes</a><ul>
160 <li><a class="reference internal" href="#information">4.1. Information</a></li>
161 <li><a class="reference internal" href="#successful">4.2. Successful</a></li>
162 <li><a class="reference internal" href="#client-error">4.3. Client Error</a></li>
163 <li><a class="reference internal" href="#server-error">4.4. Server Error</a></li>
168 <h4>Previous topic</h4>
169 <p class="topless"><a href="index.html"
170 title="previous chapter">AMCP 2.0 Reference</a></p>
172 <p class="topless"><a href="basic-commands.html"
173 title="next chapter">5. Basic Commands</a></p>
175 <ul class="this-page-menu">
176 <li><a href="../bugs.html">Report a Bug</a></li>
177 <li><a href="../_sources/amcp/introduction.txt"
178 rel="nofollow">Show Source</a></li>
181 <div id="searchbox" style="display: none">
182 <h3>Quick search</h3>
183 <form class="search" action="../search.html" method="get">
184 <input type="text" name="q" />
185 <input type="submit" value="Go" />
186 <input type="hidden" name="check_keywords" value="yes" />
187 <input type="hidden" name="area" value="default" />
189 <p class="searchtip" style="font-size: 90%">
190 Enter search terms or a module, class or function name.
193 <script type="text/javascript">$('#searchbox').show(0);</script>
196 <div class="clearer"></div>
198 <div class="related">
201 <li class="right" style="margin-right: 10px">
202 <a href="../genindex.html" title="General Index"
205 <a href="basic-commands.html" title="5. Basic Commands"
208 <a href="index.html" title="AMCP 2.0 Reference"
210 <li><a href="../index.html">CasparCG 2.0 documentation</a> »</li>
212 <li><a href="index.html" >AMCP 2.0 Reference</a> »</li>
216 © <a href="../copyright.html">Copyright</a> 2011, Robert Nagy (ronag89@gmail.com).
218 Last updated on Mar 13, 2012.
219 <a href="../bugs.html">Found a bug</a>?
221 Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.2.