jbus/Endpoint_8hpp_source.html

156 lines
58 KiB
HTML
Raw Permalink Normal View History

2017-01-07 23:46:40 +00:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://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.8.11"/>
<title>JBus: include/jbus/Endpoint.hpp Source File</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="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
$(window).load(resizeHeight);
</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>
<script type="text/javascript">
$(document).ready(function() { init_search(); });
</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">JBus
</div>
<div id="projectbrief">JoyBus communication server</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
</ul>
</div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('Endpoint_8hpp_source.html','');});
</script>
<div id="doc-content">
<!-- 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 class="header">
<div class="headertitle">
<div class="title">Endpoint.hpp</div> </div>
</div><!--header-->
<div class="contents">
2017-01-08 02:56:56 +00:00
<a href="Endpoint_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="preprocessor">#ifndef JBUS_ENDPOINT_HPP</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="preprocessor">#define JBUS_ENDPOINT_HPP</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;</div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="Common_8hpp.html">Common.hpp</a>&quot;</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="Socket_8hpp.html">Socket.hpp</a>&quot;</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="preprocessor">#include &quot;optional.hpp&quot;</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="preprocessor">#include &lt;thread&gt;</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="preprocessor">#include &lt;mutex&gt;</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="preprocessor">#include &lt;condition_variable&gt;</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;</div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacejbus.html">jbus</a></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;{</div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;</div><div class="line"><a name="l00016"></a><span class="lineno"><a class="line" href="classjbus_1_1Endpoint.html"> 16</a></span>&#160;<span class="keyword">class </span><a class="code" href="classjbus_1_1Endpoint.html">Endpoint</a></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;{</div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160; <span class="keyword">class </span>KawasedoChallenge</div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160; {</div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160; <span class="keyword">struct </span>DSPSecParms</div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160; {</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160; <span class="comment">/* Nonce challenge (first read from GBA, hence already little-endian) */</span></div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160; <a class="code" href="namespacejbus.html#ae4a7d015f3b8913ec0b563caa0a53221">u32</a> x0_gbaChallenge;</div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160; <span class="comment">/* Palette of pulsing logo on GBA during transmission [0,6] */</span></div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160; <a class="code" href="namespacejbus.html#ae4a7d015f3b8913ec0b563caa0a53221">u32</a> x4_logoPalette;</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160; <span class="comment">/* Speed and direction of palette interpolation [-4,4] */</span></div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160; <a class="code" href="namespacejbus.html#ae4a7d015f3b8913ec0b563caa0a53221">u32</a> x8_logoSpeed;</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160;</div><div class="line"><a name="l00039"></a><span class="l
2017-01-07 23:46:40 +00:00
<div class="ttc" id="namespacejbus_html_aff2760609de15f92daafbdff7be79b33"><div class="ttname"><a href="namespacejbus.html#aff2760609de15f92daafbdff7be79b33">jbus::u16</a></div><div class="ttdeci">uint16_t u16</div><div class="ttdef"><b>Definition:</b> Common.hpp:14</div></div>
<div class="ttc" id="classjbus_1_1Endpoint_html_a779ba524cf30f41e29fd53a626ba2acf"><div class="ttname"><a href="classjbus_1_1Endpoint.html#a779ba524cf30f41e29fd53a626ba2acf">jbus::Endpoint::GBAGetStatus</a></div><div class="ttdeci">EJoyReturn GBAGetStatus(u8 *status)</div><div class="ttdoc">Get JOYSTAT register from GBA synchronously. </div></div>
<div class="ttc" id="namespacejbus_html_a416b65eae1b2ff9ab63c4c71ff857ea4"><div class="ttname"><a href="namespacejbus.html#a416b65eae1b2ff9ab63c4c71ff857ea4">jbus::s8</a></div><div class="ttdeci">int8_t s8</div><div class="ttdef"><b>Definition:</b> Common.hpp:11</div></div>
<div class="ttc" id="namespacejbus_html_ae1577e03ea8c6e27361cb389c992280d"><div class="ttname"><a href="namespacejbus.html#ae1577e03ea8c6e27361cb389c992280d">jbus::FGBACallback</a></div><div class="ttdeci">std::function&lt; void(ThreadLocalEndpoint &amp;endpoint, EJoyReturn status)&gt; FGBACallback</div><div class="ttdoc">Standard callback for asynchronous jbus::Endpoint APIs. </div><div class="ttdef"><b>Definition:</b> Common.hpp:169</div></div>
<div class="ttc" id="namespacejbus_html_a19d112b8b9f912fca094b41ce26c4fef"><div class="ttname"><a href="namespacejbus.html#a19d112b8b9f912fca094b41ce26c4fef">jbus::u8</a></div><div class="ttdeci">uint8_t u8</div><div class="ttdef"><b>Definition:</b> Common.hpp:12</div></div>
2017-01-08 02:56:56 +00:00
<div class="ttc" id="classjbus_1_1Endpoint_html_ab5de6af29530791b0b2958002f1d3603"><div class="ttname"><a href="classjbus_1_1Endpoint.html#ab5de6af29530791b0b2958002f1d3603">jbus::Endpoint::ThreadLocalEndpoint</a></div><div class="ttdeci">friend class ThreadLocalEndpoint</div><div class="ttdef"><b>Definition:</b> Endpoint.hpp:132</div></div>
2017-01-07 23:46:40 +00:00
<div class="ttc" id="namespacejbus_html"><div class="ttname"><a href="namespacejbus.html">jbus</a></div><div class="ttdef"><b>Definition:</b> Common.hpp:8</div></div>
2017-01-08 02:56:56 +00:00
<div class="ttc" id="classjbus_1_1net_1_1Socket_html"><div class="ttname"><a href="classjbus_1_1net_1_1Socket.html">jbus::net::Socket</a></div><div class="ttdef"><b>Definition:</b> Socket.hpp:104</div></div>
2017-01-07 23:46:40 +00:00
<div class="ttc" id="classjbus_1_1Endpoint_html_a06506d0cfa26d461f239ed761264d7b0"><div class="ttname"><a href="classjbus_1_1Endpoint.html#a06506d0cfa26d461f239ed761264d7b0">jbus::Endpoint::GBAWriteAsync</a></div><div class="ttdeci">EJoyReturn GBAWriteAsync(const u8 *src, u8 *status, FGBACallback &amp;&amp;callback)</div><div class="ttdoc">Send WRITE command to GBA asynchronously. </div></div>
<div class="ttc" id="namespacejbus_html_a36fb1f7488218c972a50b1f9dd547b81"><div class="ttname"><a href="namespacejbus.html#a36fb1f7488218c972a50b1f9dd547b81">jbus::u64</a></div><div class="ttdeci">uint64_t u64</div><div class="ttdef"><b>Definition:</b> Common.hpp:18</div></div>
<div class="ttc" id="classjbus_1_1Endpoint_html_a39ddcbf5ac7078d59a4d99d291e3f0fa"><div class="ttname"><a href="classjbus_1_1Endpoint.html#a39ddcbf5ac7078d59a4d99d291e3f0fa">jbus::Endpoint::Endpoint</a></div><div class="ttdeci">Endpoint(u8 chan, net::Socket &amp;&amp;data, net::Socket &amp;&amp;clock)</div></div>
<div class="ttc" id="Socket_8hpp_html"><div class="ttname"><a href="Socket_8hpp.html">Socket.hpp</a></div></div>
<div class="ttc" id="namespacejbus_html_aa767fe4f71e145e2c0b12eccbeb83071"><div class="ttname"><a href="namespacejbus.html#aa767fe4f71e145e2c0b12eccbeb83071">jbus::s16</a></div><div class="ttdeci">int16_t s16</div><div class="ttdef"><b>Definition:</b> Common.hpp:13</div></div>
<div class="ttc" id="namespacejbus_html_a33e5022738a0799c066372ce74d04c37"><div class="ttname"><a href="namespacejbus.html#a33e5022738a0799c066372ce74d04c37">jbus::s32</a></div><div class="ttdeci">int32_t s32</div><div class="ttdef"><b>Definition:</b> Common.hpp:15</div></div>
<div class="ttc" id="classjbus_1_1Endpoint_html_a4ba9120b99057be42940b797708b790e"><div class="ttname"><a href="classjbus_1_1Endpoint.html#a4ba9120b99057be42940b797708b790e">jbus::Endpoint::GBAGetStatusAsync</a></div><div class="ttdeci">EJoyReturn GBAGetStatusAsync(u8 *status, FGBACallback &amp;&amp;callback)</div><div class="ttdoc">Get JOYSTAT register from GBA asynchronously. </div></div>
<div class="ttc" id="classjbus_1_1Endpoint_html_a047d724cc9ccb8253cb8464c24b9ccd4"><div class="ttname"><a href="classjbus_1_1Endpoint.html#a047d724cc9ccb8253cb8464c24b9ccd4">jbus::Endpoint::GBAReadAsync</a></div><div class="ttdeci">EJoyReturn GBAReadAsync(u8 *dst, u8 *status, FGBACallback &amp;&amp;callback)</div><div class="ttdoc">Send READ command to GBA asynchronously. </div></div>
<div class="ttc" id="classjbus_1_1Endpoint_html_aad76a9374e4e151540f678798548a843"><div class="ttname"><a href="classjbus_1_1Endpoint.html#aad76a9374e4e151540f678798548a843">jbus::Endpoint::GBAJoyBootAsync</a></div><div class="ttdeci">EJoyReturn GBAJoyBootAsync(s32 paletteColor, s32 paletteSpeed, const u8 *programp, s32 length, u8 *status, FGBACallback &amp;&amp;callback)</div><div class="ttdoc">Initiate JoyBoot sequence on this endpoint. </div></div>
<div class="ttc" id="classjbus_1_1Endpoint_html_a6e59373aa28a23097129470deaeb46dd"><div class="ttname"><a href="classjbus_1_1Endpoint.html#a6e59373aa28a23097129470deaeb46dd">jbus::Endpoint::GBAWrite</a></div><div class="ttdeci">EJoyReturn GBAWrite(const u8 *src, u8 *status)</div><div class="ttdoc">Send WRITE command to GBA synchronously. </div></div>
<div class="ttc" id="namespacejbus_html_a7118bfa3cb9d51e588418220bca20117"><div class="ttname"><a href="namespacejbus.html#a7118bfa3cb9d51e588418220bca20117">jbus::EJoyReturn</a></div><div class="ttdeci">EJoyReturn</div><div class="ttdef"><b>Definition:</b> Common.hpp:157</div></div>
2017-01-08 02:56:56 +00:00
<div class="ttc" id="classjbus_1_1ThreadLocalEndpoint_html_a1205d985c7e71b42a9cf2c1be06383b2"><div class="ttname"><a href="classjbus_1_1ThreadLocalEndpoint.html#a1205d985c7e71b42a9cf2c1be06383b2">jbus::ThreadLocalEndpoint::getChan</a></div><div class="ttdeci">int getChan() const </div><div class="ttdoc">Get virtual SI channel assigned to this endpoint. </div><div class="ttdef"><b>Definition:</b> Endpoint.hpp:307</div></div>
<div class="ttc" id="classjbus_1_1Endpoint_html"><div class="ttname"><a href="classjbus_1_1Endpoint.html">jbus::Endpoint</a></div><div class="ttdef"><b>Definition:</b> Endpoint.hpp:16</div></div>
2017-01-07 23:46:40 +00:00
<div class="ttc" id="classjbus_1_1Endpoint_html_ad39f268d3bee438e5176cc7f4cf59675"><div class="ttname"><a href="classjbus_1_1Endpoint.html#ad39f268d3bee438e5176cc7f4cf59675">jbus::Endpoint::~Endpoint</a></div><div class="ttdeci">~Endpoint()</div></div>
<div class="ttc" id="namespacejbus_html_ae4a7d015f3b8913ec0b563caa0a53221"><div class="ttname"><a href="namespacejbus.html#ae4a7d015f3b8913ec0b563caa0a53221">jbus::u32</a></div><div class="ttdeci">uint32_t u32</div><div class="ttdef"><b>Definition:</b> Common.hpp:16</div></div>
2017-01-08 02:56:56 +00:00
<div class="ttc" id="classjbus_1_1Endpoint_html_a930f7ae80af4e13ff50122f2a54c63da"><div class="ttname"><a href="classjbus_1_1Endpoint.html#a930f7ae80af4e13ff50122f2a54c63da">jbus::Endpoint::connected</a></div><div class="ttdeci">bool connected() const </div><div class="ttdoc">Get connection status of this endpoint. </div><div class="ttdef"><b>Definition:</b> Endpoint.hpp:263</div></div>
<div class="ttc" id="classjbus_1_1Endpoint_html_a6aa5fa9049740d739b03e303719a764a"><div class="ttname"><a href="classjbus_1_1Endpoint.html#a6aa5fa9049740d739b03e303719a764a">jbus::Endpoint::getChan</a></div><div class="ttdeci">unsigned getChan() const </div><div class="ttdoc">Get virtual SI channel assigned to this endpoint. </div><div class="ttdef"><b>Definition:</b> Endpoint.hpp:250</div></div>
<div class="ttc" id="classjbus_1_1Endpoint_html_a1cae93f2e1e097b10b34810a0d04333f"><div class="ttname"><a href="classjbus_1_1Endpoint.html#a1cae93f2e1e097b10b34810a0d04333f">jbus::Endpoint::stop</a></div><div class="ttdeci">void stop()</div><div class="ttdoc">Request stop of I/O thread and block until joined. Further use of this Endpoint will return GBA_NOT_R...</div></div>
2017-01-07 23:46:40 +00:00
<div class="ttc" id="classjbus_1_1Endpoint_html_a9065f6189182596a3f5c498e8ef98b40"><div class="ttname"><a href="classjbus_1_1Endpoint.html#a9065f6189182596a3f5c498e8ef98b40">jbus::Endpoint::GBAReset</a></div><div class="ttdeci">EJoyReturn GBAReset(u8 *status)</div><div class="ttdoc">Send RESET command to GBA synchronously. </div></div>
<div class="ttc" id="Common_8hpp_html"><div class="ttname"><a href="Common_8hpp.html">Common.hpp</a></div></div>
2017-01-08 02:56:56 +00:00
<div class="ttc" id="classjbus_1_1Endpoint_html_a21b883cf30eb52ca355163617960788e"><div class="ttname"><a href="classjbus_1_1Endpoint.html#a21b883cf30eb52ca355163617960788e">jbus::Endpoint::setChan</a></div><div class="ttdeci">void setChan(unsigned chan)</div><div class="ttdoc">Set virtual SI channel assigned to this endpoint. </div><div class="ttdef"><b>Definition:</b> Endpoint.hpp:254</div></div>
2017-01-07 23:46:40 +00:00
<div class="ttc" id="classjbus_1_1Endpoint_html_a81d86608ffb93b3211a915fa1712beb4"><div class="ttname"><a href="classjbus_1_1Endpoint.html#a81d86608ffb93b3211a915fa1712beb4">jbus::Endpoint::GBAResetAsync</a></div><div class="ttdeci">EJoyReturn GBAResetAsync(u8 *status, FGBACallback &amp;&amp;callback)</div><div class="ttdoc">Send RESET command to GBA asynchronously. </div></div>
<div class="ttc" id="classjbus_1_1Endpoint_html_a50401a9a9d658f1f68e3dde61d5dfbce"><div class="ttname"><a href="classjbus_1_1Endpoint.html#a50401a9a9d658f1f68e3dde61d5dfbce">jbus::Endpoint::GBAGetProcessStatus</a></div><div class="ttdeci">EJoyReturn GBAGetProcessStatus(u8 &amp;percentOut)</div><div class="ttdoc">Get status of last asynchronous operation. </div></div>
2017-01-08 02:56:56 +00:00
<div class="ttc" id="classjbus_1_1ThreadLocalEndpoint_html"><div class="ttname"><a href="classjbus_1_1ThreadLocalEndpoint.html">jbus::ThreadLocalEndpoint</a></div><div class="ttdef"><b>Definition:</b> Endpoint.hpp:272</div></div>
2017-01-07 23:46:40 +00:00
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_4525d057f72f34aebe3436e89afccf45.html">jbus</a></li><li class="navelem"><a class="el" href="Endpoint_8hpp.html">Endpoint.hpp</a></li>
<li class="footer">Generated by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
</ul>
</div>
</body>
</html>