130 lines
7.2 KiB
HTML
130 lines
7.2 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
<meta name="generator" content="Doxygen 1.9.1"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>OpenLCP: Library for E1.31 sACN</title>
|
|
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="../../jquery.js"></script>
|
|
<script type="text/javascript" src="../../dynsections.js"></script>
|
|
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="../../search/searchdata.js"></script>
|
|
<script type="text/javascript" src="../../search/search.js"></script>
|
|
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr style="height: 56px;">
|
|
<td id="projectalign" style="padding-left: 0.5em;">
|
|
<div id="projectname">OpenLCP
|
|
 <span id="projectnumber">0.2.0</span>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.9.1 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
var searchBox = new SearchBox("searchBox", "../../search",false,'Search','.html');
|
|
/* @license-end */
|
|
</script>
|
|
<script type="text/javascript" src="../../menudata.js"></script>
|
|
<script type="text/javascript" src="../../menu.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
$(function() {
|
|
initMenu('../../',true,false,'search.php','Search');
|
|
$(document).ready(function() { init_search(); });
|
|
});
|
|
/* @license-end */</script>
|
|
<div id="main-nav"></div>
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<iframe src="javascript:void(0)" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</div>
|
|
|
|
</div><!-- top -->
|
|
<div class="PageDoc"><div class="header">
|
|
<div class="headertitle">
|
|
<div class="title">Library for E1.31 sACN </div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<div class="textblock"><h1><a class="anchor" id="autotoc_md14"></a>
|
|
<tt>Lightweight streaming protocol for transport of DMX512 using ACN</tt></h1>
|
|
<h1><a class="anchor" id="autotoc_md15"></a>
|
|
Top level include</h1>
|
|
<p>Include <code>sacn.h</code> for full protocol support.</p>
|
|
<blockquote class="doxtable">
|
|
<p><code>#include "sacn.h"</code> </p>
|
|
</blockquote>
|
|
<h2><a class="anchor" id="autotoc_md16"></a>
|
|
Requirements</h2>
|
|
<p>Expects to also have the <code>acn</code> and <code>dmx</code> libraries in the include path.</p>
|
|
<h1><a class="anchor" id="autotoc_md17"></a>
|
|
Logical components</h1>
|
|
<h2><a class="anchor" id="autotoc_md18"></a>
|
|
Protocol Handling</h2>
|
|
<ul>
|
|
<li><code>sacn.h</code>: [<code>SACN</code>] protocol constants.</li>
|
|
<li><code>data.h</code>: [<code>SACN::DATA</code>] protocol support for <code>VECTOR_ROOT_E131_DATA</code> packets.</li>
|
|
<li><code>extended.h</code>: [<code>SACN::EXTENDED</code>] protocol support for <code>VECTOR_ROOT_E131_EXTENDED</code> packets</li>
|
|
</ul>
|
|
<h2><a class="anchor" id="autotoc_md19"></a>
|
|
Data Classes</h2>
|
|
<ul>
|
|
<li><code>universe.h</code>: [<code><a class="el" href="../../d8/d1d/class_s_a_c_n_1_1_universe.html" title="The Universe class.">SACN::Universe</a></code>] A set of up to 512 data slots identified by universe number. Note: In E1.31 there may be multiple sources for a universe. <blockquote class="doxtable">
|
|
<p>For protocol agnostic universe refer to the base class, <code><a class="el" href="../../d0/de4/class_d_m_x_1_1_universe.html" title="The Universe class.">DMX::Universe</a></code> </p>
|
|
</blockquote>
|
|
</li>
|
|
<li><code>receiver.h</code>: [<code><a class="el" href="../../da/dde/class_s_a_c_n_1_1_receiver.html" title="The Receiver class.">SACN::Receiver</a></code>] A receiver is the intended target of information from a source. A receiver may listen for multiple universes.</li>
|
|
<li><code>source.h</code>: [<code><a class="el" href="../../d9/d82/class_s_a_c_n_1_1_source.html" title="The Source class.">SACN::Source</a></code>] A sACN component that assembles, formats, and transmits data to one or many receivers.</li>
|
|
<li><code>node.h</code>: [<code><a class="el" href="../../da/d5f/class_s_a_c_n_1_1_node.html" title="The Node class.">SACN::Node</a></code>] A class that inherits from both <code><a class="el" href="../../d9/d82/class_s_a_c_n_1_1_source.html" title="The Source class.">SACN::Source</a></code> and <code><a class="el" href="../../da/dde/class_s_a_c_n_1_1_receiver.html" title="The Receiver class.">SACN::Receiver</a></code>. IE. can both send and receive. The node class also manages universe discovery.</li>
|
|
</ul>
|
|
<h2><a class="anchor" id="autotoc_md20"></a>
|
|
Reference Implementations</h2>
|
|
<p>Several reference implementations may be available in the <code>platform</code> subdirectory.</p>
|
|
<ul>
|
|
<li><code>receiver-esp.h</code>: [<code>SACN::EspReceiver</code>] A reference implementation, derived from <code><a class="el" href="../../da/dde/class_s_a_c_n_1_1_receiver.html" title="The Receiver class.">SACN::Receiver</a></code> for use with ESP devices and Arduino.</li>
|
|
<li><code>qsacnnode.h</code>: [<code>SACN::QSacnNode</code>] An implementation that inherits from <code><a class="el" href="../../da/d5f/class_s_a_c_n_1_1_node.html" title="The Node class.">SACN::Node</a></code>, which handles all of the mucky hardware and network with Qt.</li>
|
|
</ul>
|
|
<h1><a class="anchor" id="autotoc_md21"></a>
|
|
Usage with Arduino</h1>
|
|
<p>Include <code>receiver-esp.h</code> at the top of your sketch.</p>
|
|
<p>Create a receiver object. </p><blockquote class="doxtable">
|
|
<p>``` EspReceiver * e131 = new EspReceiver(); </p><div class="fragment"><div class="line"></blockquote></div>
|
|
<div class="line">In `setup`, subscribe to a universe an register a callback for data activity.</div>
|
|
<div class="line"><blockquote></div>
|
|
</div><!-- fragment --> </blockquote>
|
|
<p>setup() { e131->subscribe(1); e131->universe(1)->onData(std::bind(&universeHandler, std::placeholders::_1)); } >```</p>
|
|
<p>Write a handler function with the follow signature (returns <code>void</code>, requires 1 argument, a <code>Universe</code> pointer): </p><blockquote class="doxtable">
|
|
<p>``` </p>
|
|
</blockquote>
|
|
<p>void universeHandler(Universe * universe) { do something... } </p><blockquote class="doxtable">
|
|
<p>``` </p>
|
|
</blockquote>
|
|
</div></div><!-- contents -->
|
|
</div><!-- PageDoc -->
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
|
|
</small></address>
|
|
</body>
|
|
</html>
|