]> git.sesse.net Git - casparcg/blob - build/html/amcp/introduction.html
(no commit message)
[casparcg] / build / html / amcp / introduction.html
1
2
3 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
6
7 <html xmlns="http://www.w3.org/1999/xhtml">
8   <head>
9     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10     
11     <title>1. Communication &mdash; CasparCG 2.0 documentation</title>
12     
13     <link rel="stylesheet" href="../_static/default.css" type="text/css" />
14     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
15     
16     <script type="text/javascript">
17       var DOCUMENTATION_OPTIONS = {
18         URL_ROOT:    '../',
19         VERSION:     '2.0',
20         COLLAPSE_INDEX: false,
21         FILE_SUFFIX: '.html',
22         HAS_SOURCE:  true
23       };
24     </script>
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" />
38  
39
40   </head>
41   <body>
42     <div class="related">
43       <h3>Navigation</h3>
44       <ul>
45         <li class="right" style="margin-right: 10px">
46           <a href="../genindex.html" title="General Index"
47              accesskey="I">index</a></li>
48         <li class="right" >
49           <a href="basic-commands.html" title="5. Basic Commands"
50              accesskey="N">next</a> |</li>
51         <li class="right" >
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> &raquo;</li>
55
56           <li><a href="index.html" accesskey="U">AMCP 2.0 Reference</a> &raquo;</li> 
57       </ul>
58     </div>  
59
60     <div class="document">
61       <div class="documentwrapper">
62         <div class="bodywrapper">
63           <div class="body">
64             
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>
67 <ul>
68 <li><p class="first">All communication is presumed to be encoded in UTF-8.</p>
69 </li>
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">
73 <li>\r\n</li>
74 <li>&lt;CR&gt;&lt;LF&gt;</li>
75 <li>&lt;0x0D&gt;&lt;0x0A&gt;</li>
76 <li>&lt;13&gt;&lt;10&gt;</li>
77 </ul>
78 </dd>
79 </dl>
80 </li>
81 <li><p class="first">The whole command string is case insensitive.</p>
82 </li>
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>
84 </li>
85 </ul>
86 </div>
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>
92 <ul class="simple">
93 <li>The &#8216;&#8217;CLEAR&#8217;&#8217; command will also clear any visible template graphic in the specified container.</li>
94 </ul>
95 </div>
96 </div>
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 &#8221; in the command.
100 Valid sequences:</p>
101 <ul class="simple">
102 <li>\&#8221; Quotation mark</li>
103 <li>\\ Backslash</li>
104 <li>\n New line</li>
105 </ul>
106 <p>These sequences apply to all parameters, it doesn&#8217;t matter if it&#8217;s a file name or a long string of xml-data.</p>
107 </div>
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>
112 <ul class="simple">
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>
115 </ul>
116 </div>
117 <div class="section" id="successful">
118 <h2>4.2. Successful<a class="headerlink" href="#successful" title="Permalink to this headline">¶</a></h2>
119 <ul class="simple">
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>
123 </ul>
124 </div>
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>
127 <ul class="simple">
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>
133 </ul>
134 </div>
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>
137 <ul class="simple">
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>
141 </ul>
142 </div>
143 </div>
144
145
146           </div>
147         </div>
148       </div>
149       <div class="sphinxsidebar">
150         <div class="sphinxsidebarwrapper">
151   <h3><a href="../contents.html">Table Of Contents</a></h3>
152   <ul>
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>
156 </ul>
157 </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>
164 </ul>
165 </li>
166 </ul>
167
168   <h4>Previous topic</h4>
169   <p class="topless"><a href="index.html"
170                         title="previous chapter">AMCP 2.0 Reference</a></p>
171   <h4>Next topic</h4>
172   <p class="topless"><a href="basic-commands.html"
173                         title="next chapter">5. Basic Commands</a></p>
174 <h3>This Page</h3>
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>
179 </ul>
180
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" />
188     </form>
189     <p class="searchtip" style="font-size: 90%">
190     Enter search terms or a module, class or function name.
191     </p>
192 </div>
193 <script type="text/javascript">$('#searchbox').show(0);</script>
194         </div>
195       </div>
196       <div class="clearer"></div>
197     </div>
198     <div class="related">
199       <h3>Navigation</h3>
200       <ul>
201         <li class="right" style="margin-right: 10px">
202           <a href="../genindex.html" title="General Index"
203              >index</a></li>
204         <li class="right" >
205           <a href="basic-commands.html" title="5. Basic Commands"
206              >next</a> |</li>
207         <li class="right" >
208           <a href="index.html" title="AMCP 2.0 Reference"
209              >previous</a> |</li>
210         <li><a href="../index.html">CasparCG 2.0 documentation</a> &raquo;</li>
211
212           <li><a href="index.html" >AMCP 2.0 Reference</a> &raquo;</li> 
213       </ul>
214     </div>
215     <div class="footer">
216     &copy; <a href="../copyright.html">Copyright</a> 2011, Robert Nagy (ronag89@gmail.com).
217     <br />
218     Last updated on Mar 13, 2012.
219     <a href="../bugs.html">Found a bug</a>?
220     <br />
221     Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.2.
222     </div>
223
224   </body>
225 </html>