sdk-ameba-v4.0c_180328/doc/api_doc/sn__coap__protocol_8h.html
2019-04-02 16:34:25 +08:00

148 lines
14 KiB
HTML
Executable file

<!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>SDK3.5: sn_coap_protocol.h 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="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">SDK3.5
</div>
<div id="projectbrief">This document shows Ameba SDK 3.5 APIs</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="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data&#160;Structures</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>
<li><a href="globals.html"><span>Globals</span></a></li>
</ul>
</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 id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_59865070466a2d887ccae359ce349522.html">sdk-ameba</a></li><li class="navelem"><a class="el" href="dir_da6bad2e2c5a50fa6b6edae596f8e89f.html">component</a></li><li class="navelem"><a class="el" href="dir_407195b71e2fda49d4a285654b5b25b9.html">common</a></li><li class="navelem"><a class="el" href="dir_199fc8db423d23fe221af67c9b9ab28d.html">network</a></li><li class="navelem"><a class="el" href="dir_343c3b8af3990974a3d33eb9b8a837fd.html">coap</a></li><li class="navelem"><a class="el" href="dir_00077fbb335f4b3b1e31593233038958.html">include</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">sn_coap_protocol.h File Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>CoAP C-library User protocol interface header file.
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga9113e5503267462b7bab78ca378972d7"><td class="memItemLeft" align="right" valign="top">struct coap_s *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coap.html#ga9113e5503267462b7bab78ca378972d7">sn_coap_protocol_init</a> (void *(*used_malloc_func_ptr)(uint16_t), void(*used_free_func_ptr)(void *), uint8_t(*used_tx_callback_ptr)(uint8_t *, uint16_t, <a class="el" href="group__coap.html#ga40901598735b221da45e0e701e3b10f4">sn_nsdl_addr_s</a> *, void *), int8_t(*used_rx_callback_ptr)(<a class="el" href="group__coap.html#ga3a52e89139fbb21b93186618be191a04">sn_coap_hdr_s</a> *, <a class="el" href="group__coap.html#ga40901598735b221da45e0e701e3b10f4">sn_nsdl_addr_s</a> *, void *))</td></tr>
<tr class="memdesc:ga9113e5503267462b7bab78ca378972d7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes CoAP Protocol part. When using libNsdl, sn_nsdl_init() calls this function. <a href="group__coap.html#ga9113e5503267462b7bab78ca378972d7">More...</a><br /></td></tr>
<tr class="separator:ga9113e5503267462b7bab78ca378972d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9a8f99056af7c1a8a8880708c46b72d8"><td class="memItemLeft" align="right" valign="top">int8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coap.html#ga9a8f99056af7c1a8a8880708c46b72d8">sn_coap_protocol_destroy</a> (struct coap_s *handle)</td></tr>
<tr class="memdesc:ga9a8f99056af7c1a8a8880708c46b72d8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Frees all memory from CoAP protocol part. <a href="group__coap.html#ga9a8f99056af7c1a8a8880708c46b72d8">More...</a><br /></td></tr>
<tr class="separator:ga9a8f99056af7c1a8a8880708c46b72d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga142f9cb4f67a4ae94138b262969a9a65"><td class="memItemLeft" align="right" valign="top">int16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coap.html#ga142f9cb4f67a4ae94138b262969a9a65">sn_coap_protocol_build</a> (struct coap_s *handle, <a class="el" href="group__coap.html#ga40901598735b221da45e0e701e3b10f4">sn_nsdl_addr_s</a> *dst_addr_ptr, uint8_t *dst_packet_data_ptr, <a class="el" href="group__coap.html#ga3a52e89139fbb21b93186618be191a04">sn_coap_hdr_s</a> *src_coap_msg_ptr, void *param)</td></tr>
<tr class="memdesc:ga142f9cb4f67a4ae94138b262969a9a65"><td class="mdescLeft">&#160;</td><td class="mdescRight">Builds Packet data from given CoAP header structure to be sent. <a href="group__coap.html#ga142f9cb4f67a4ae94138b262969a9a65">More...</a><br /></td></tr>
<tr class="separator:ga142f9cb4f67a4ae94138b262969a9a65"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaadd6e5537265e26823babae9f6e85610"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__coap.html#ga3a52e89139fbb21b93186618be191a04">sn_coap_hdr_s</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coap.html#gaadd6e5537265e26823babae9f6e85610">sn_coap_protocol_parse</a> (struct coap_s *handle, <a class="el" href="group__coap.html#ga40901598735b221da45e0e701e3b10f4">sn_nsdl_addr_s</a> *src_addr_ptr, uint16_t packet_data_len, uint8_t *packet_data_ptr, void *param)</td></tr>
<tr class="memdesc:gaadd6e5537265e26823babae9f6e85610"><td class="mdescLeft">&#160;</td><td class="mdescRight">Parses received CoAP message from given Packet data. <a href="group__coap.html#gaadd6e5537265e26823babae9f6e85610">More...</a><br /></td></tr>
<tr class="separator:gaadd6e5537265e26823babae9f6e85610"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf0b59b7758588e49380bfcc79a39b6d4"><td class="memItemLeft" align="right" valign="top">int8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coap.html#gaf0b59b7758588e49380bfcc79a39b6d4">sn_coap_protocol_exec</a> (struct coap_s *handle, uint32_t current_time)</td></tr>
<tr class="memdesc:gaf0b59b7758588e49380bfcc79a39b6d4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sends CoAP messages from re-sending queue, if there is any. Cleans also old messages from the duplication list and from block receiving list. <a href="group__coap.html#gaf0b59b7758588e49380bfcc79a39b6d4">More...</a><br /></td></tr>
<tr class="separator:gaf0b59b7758588e49380bfcc79a39b6d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaaf3b06868caaeeeb89533d432d4c05d8"><td class="memItemLeft" align="right" valign="top">int8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coap.html#gaaf3b06868caaeeeb89533d432d4c05d8">sn_coap_protocol_set_block_size</a> (struct coap_s *handle, uint16_t block_size)</td></tr>
<tr class="memdesc:gaaf3b06868caaeeeb89533d432d4c05d8"><td class="mdescLeft">&#160;</td><td class="mdescRight">If block transfer is enabled, this function changes the block size. <a href="group__coap.html#gaaf3b06868caaeeeb89533d432d4c05d8">More...</a><br /></td></tr>
<tr class="separator:gaaf3b06868caaeeeb89533d432d4c05d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga93a7f28d1089d6f10b2133c7ba89b81a"><td class="memItemLeft" align="right" valign="top">int8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coap.html#ga93a7f28d1089d6f10b2133c7ba89b81a">sn_coap_protocol_set_duplicate_buffer_size</a> (struct coap_s *handle, uint8_t message_count)</td></tr>
<tr class="memdesc:ga93a7f28d1089d6f10b2133c7ba89b81a"><td class="mdescLeft">&#160;</td><td class="mdescRight">If dublicate message detection is enabled, this function changes buffer size. <a href="group__coap.html#ga93a7f28d1089d6f10b2133c7ba89b81a">More...</a><br /></td></tr>
<tr class="separator:ga93a7f28d1089d6f10b2133c7ba89b81a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaef16336455064c5baa92f3f3d9738a35"><td class="memItemLeft" align="right" valign="top">int8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coap.html#gaef16336455064c5baa92f3f3d9738a35">sn_coap_protocol_set_retransmission_parameters</a> (struct coap_s *handle, uint8_t resending_count, uint8_t resending_interval)</td></tr>
<tr class="memdesc:gaef16336455064c5baa92f3f3d9738a35"><td class="mdescLeft">&#160;</td><td class="mdescRight">If re-transmissions are enabled, this function changes resending count and interval. <a href="group__coap.html#gaef16336455064c5baa92f3f3d9738a35">More...</a><br /></td></tr>
<tr class="separator:gaef16336455064c5baa92f3f3d9738a35"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga460f5825ac70f0856376a70b95a22a7e"><td class="memItemLeft" align="right" valign="top">int8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coap.html#ga460f5825ac70f0856376a70b95a22a7e">sn_coap_protocol_set_retransmission_buffer</a> (struct coap_s *handle, uint8_t buffer_size_messages, uint16_t buffer_size_bytes)</td></tr>
<tr class="memdesc:ga460f5825ac70f0856376a70b95a22a7e"><td class="mdescLeft">&#160;</td><td class="mdescRight">If re-transmissions are enabled, this function changes message retransmission queue size. Set size to '0' to disable feature. If both are set to '0', then re-sendings are disabled. <a href="group__coap.html#ga460f5825ac70f0856376a70b95a22a7e">More...</a><br /></td></tr>
<tr class="separator:ga460f5825ac70f0856376a70b95a22a7e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1f77f3103eb61915110405c46f00ec9c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coap.html#ga1f77f3103eb61915110405c46f00ec9c">sn_coap_protocol_clear_retransmission_buffer</a> (struct coap_s *handle)</td></tr>
<tr class="memdesc:ga1f77f3103eb61915110405c46f00ec9c"><td class="mdescLeft">&#160;</td><td class="mdescRight">If re-transmissions are enabled, this function removes all messages from the retransmission queue. <a href="group__coap.html#ga1f77f3103eb61915110405c46f00ec9c">More...</a><br /></td></tr>
<tr class="separator:ga1f77f3103eb61915110405c46f00ec9c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa15b043f4e50fb189279eed6c636d99f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coap.html#gaa15b043f4e50fb189279eed6c636d99f">sn_coap_protocol_block_remove</a> (struct coap_s *handle, <a class="el" href="group__coap.html#ga40901598735b221da45e0e701e3b10f4">sn_nsdl_addr_s</a> *source_address, uint16_t payload_length, void *payload)</td></tr>
<tr class="memdesc:gaa15b043f4e50fb189279eed6c636d99f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove saved block data. Can be used to remove the data from RAM to enable storing it to other place. <a href="group__coap.html#gaa15b043f4e50fb189279eed6c636d99f">More...</a><br /></td></tr>
<tr class="separator:gaa15b043f4e50fb189279eed6c636d99f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga886ae23b591e7a1099e921714b3e5f2e"><td class="memItemLeft" align="right" valign="top">int8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coap.html#ga886ae23b591e7a1099e921714b3e5f2e">sn_coap_protocol_delete_retransmission</a> (struct coap_s *handle, uint16_t msg_id)</td></tr>
<tr class="memdesc:ga886ae23b591e7a1099e921714b3e5f2e"><td class="mdescLeft">&#160;</td><td class="mdescRight">If re-transmissions are enabled, this function removes message from retransmission buffer. <a href="group__coap.html#ga886ae23b591e7a1099e921714b3e5f2e">More...</a><br /></td></tr>
<tr class="separator:ga886ae23b591e7a1099e921714b3e5f2e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>CoAP C-library User protocol interface header file. </p>
</div></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>