mm-iot-sdk/framework/doc/html/cplusplus__demo_8cpp.html
Morse Micro 4f4eb7fc7a Morse Micro MM-IoT-SDK release 2.9.7
This commit introduces version 2.9.7 of the Morse Micro MM-IoT-SDK
for ARM microcontroller base platforms.
2025-10-04 02:04:28 +10:00

177 lines
9.8 KiB
HTML

<!-- HTML header for doxygen 1.8.17-->
<!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.4"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Morse Micro IoT SDK: cplusplus_demo.cpp File Reference</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>
<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" />
<link href="style.css" rel="stylesheet" type="text/css"/>
<link rel="shortcut icon" href="favicon.svg" />
</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="projectlogo"><img alt="Logo" src="logo.png"/></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Morse Micro IoT SDK
&#160;<span id="projectnumber">2.9.7</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'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:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></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">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('cplusplus__demo_8cpp.html',''); initResizable(); });
/* @license-end */
</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="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a> </div>
<div class="headertitle"><div class="title">cplusplus_demo.cpp File Reference</div></div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p >Morse Micro C++ example application. </p>
<p >This file demonstrates how to build and include C++ files with the <code>MM-IoT-SDK</code>. The application demonstrates how to use C++ standard library features such as <code>iostream</code> and how to use C++ exceptions. C++ exceptions are not enabled by default in the <code>MM-IoT-SDK</code> framework by default due to the high cost in terms of code size of the default exception handlers. You can enable support for exception handling by setting <code>CSPECS</code> to <code>nosys.specs</code> as shown in <code>app.mk</code>. You can exclude this change to reduce the code size with the implication being that any exception will simply exit the application. </p>
<p class="definition">Definition in file <a class="el" href="cplusplus__demo_8cpp_source.html">cplusplus_demo.cpp</a>.</p>
</div><div class="textblock"><code>#include &lt;iostream&gt;</code><br />
<code>#include &quot;mmosal.h&quot;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for cplusplus_demo.cpp:</div>
<div class="dyncontent">
<div class="center"><img src="cplusplus__demo_8cpp__incl.png" border="0" usemap="#acplusplus__demo_8cpp" alt=""/></div>
<map name="acplusplus__demo_8cpp" id="acplusplus__demo_8cpp">
<area shape="rect" title="Morse Micro C++ example application." alt="" coords="156,5,311,32"/>
<area shape="rect" title=" " alt="" coords="140,80,220,107"/>
<area shape="rect" href="mmosal_8h_source.html" title=" " alt="" coords="245,80,331,107"/>
<area shape="rect" title=" " alt="" coords="5,155,88,181"/>
<area shape="rect" title=" " alt="" coords="113,155,183,181"/>
<area shape="rect" title=" " alt="" coords="208,155,275,181"/>
<area shape="rect" title=" " alt="" coords="299,155,370,181"/>
<area shape="rect" title=" " alt="" coords="394,155,465,181"/>
<area shape="rect" title=" " alt="" coords="489,155,575,181"/>
</map>
</div>
</div>
<p><a href="cplusplus__demo_8cpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classClassDemo.html">ClassDemo</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">The <code><a class="el" href="classClassDemo.html" title="The ClassDemo class.">ClassDemo</a></code> class. <a href="classClassDemo.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:add3190cf715f513666f4be42874d91e2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cplusplus__demo_8cpp.html#add3190cf715f513666f4be42874d91e2">app_init</a> (void)</td></tr>
<tr class="memdesc:add3190cf715f513666f4be42874d91e2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Main entry point to the application. <a href="cplusplus__demo_8cpp.html#add3190cf715f513666f4be42874d91e2">More...</a><br /></td></tr>
<tr class="separator:add3190cf715f513666f4be42874d91e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="var-members" name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:a465cb15f66e29436102d4a3764405823"><td class="memItemLeft" align="right" valign="top"><a id="a465cb15f66e29436102d4a3764405823" name="a465cb15f66e29436102d4a3764405823"></a>
<a class="el" href="classClassDemo.html">ClassDemo</a>&#160;</td><td class="memItemRight" valign="bottom"><b>global_demo</b> (&quot;global demo class&quot;)</td></tr>
<tr class="memdesc:a465cb15f66e29436102d4a3764405823"><td class="mdescLeft">&#160;</td><td class="mdescRight">A global instance of the <code><a class="el" href="classClassDemo.html" title="The ClassDemo class.">ClassDemo</a></code> class. <br /></td></tr>
<tr class="separator:a465cb15f66e29436102d4a3764405823"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="add3190cf715f513666f4be42874d91e2" name="add3190cf715f513666f4be42874d91e2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#add3190cf715f513666f4be42874d91e2">&#9670;&nbsp;</a></span>app_init()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void app_init </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Main entry point to the application. </p>
<p >This will be invoked in a thread once operating system and hardware initialization has completed. </p>
<p class="definition">Definition at line <a class="el" href="cplusplus__demo_8cpp_source.html#l00090">90</a> of file <a class="el" href="cplusplus__demo_8cpp_source.html">cplusplus_demo.cpp</a>.</p>
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.17-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_91b8f418cff946e8d8b598a9068417a8.html">examples</a></li><li class="navelem"><a class="el" href="dir_07f699e114f4d9cd87d6faefc17c77e4.html">cplusplus_demo</a></li><li class="navelem"><a class="el" href="dir_171254b27c1dac29acfa26eb646bfa45.html">src</a></li><li class="navelem"><a class="el" href="cplusplus__demo_8cpp.html">cplusplus_demo.cpp</a></li>
<li class="footer">Copyright 2021 Morse Micro </li>
</ul>
</div>
</body>
</html>