📄 group__xg_web_port.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head> <meta name="robots" content="noindex"> <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>Ethernut WebPort</title> <link href="doxygen.css" rel="stylesheet" type="text/css"></head><body bgcolor="#ffffff"><!-- Generated by Doxygen 1.4.1 --><div class="qindex"><a class="qindex" href="main.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related Pages</a></div><h1>Main Routines</h1>Initialization and HTTP connection handling. <a href="#_details">More...</a><table border="0" cellpadding="0" cellspacing="0"><tr><td></td></tr><tr><td colspan="2"><br><h2>Defines</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__xg_web_port.html#ga3">JUMP_RESET</a> { asm("cli"); asm("call 0"); }</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">CPU reset macro. <a href="#ga3"></a><br></td></tr><tr><td colspan="2"><br><h2>Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__xg_web_port.html#ga0">Service</a> (void)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Process a single HTTP request. <a href="#ga0"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__xg_web_port.html#ga1">ServiceThread</a> (void *arg)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Background thread to process HTTP requests. <a href="#ga1"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__xg_web_port.html#ga2">main</a> (void)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Main entry of our application. <a href="#ga2"></a><br></td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>Initialization and HTTP connection handling. <p>The C main routine is hidden inside the Nut/OS library to perform some initialization tasks before starting the application code by calling NutMain(). <hr><h2>Define Documentation</h2><a class="anchor" name="ga3" doxytag="webport.c::JUMP_RESET"></a><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define JUMP_RESET { asm("cli"); asm("call 0"); } </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>CPU reset macro. <p>Start all over on fatal initialization errors.<p><dl compact><dt><b>Note:</b></dt><dd>This function currently works on AVR systems only. On other architectures an endless loop will be entered. </dd></dl><p>Definition at line <a class="el" href="webport_8c-source.html#l00160">160</a> of file <a class="el" href="webport_8c-source.html">webport.c</a>.<p>Referenced by <a class="el" href="webport_8c-source.html#l00260">main()</a>. </td> </tr></table><hr><h2>Function Documentation</h2><a class="anchor" name="ga2" doxytag="webport.c::main"></a><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">int main </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">void </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Main entry of our application. <p>Nut/OS automatically calls this entry after initialization.<p>This routine will do all required initialization, start some background threads and then process incoming HTTP requests together with the concurrently running background threads. <p>Definition at line <a class="el" href="webport_8c-source.html#l00260">260</a> of file <a class="el" href="webport_8c-source.html">webport.c</a>.<p>References <a class="el" href="webport_8h-source.html#l00069">CHARON_CONTROL_CGI</a>, <a class="el" href="webport_8h-source.html#l00070">CHARON_STATUS_CGI</a>, <a class="el" href="cgi_8c-source.html#l00610">CharonLedControl()</a>, <a class="el" href="cgi_8c-source.html#l00689">CharonSwitchStatus()</a>, <a class="el" href="cgi_8c-source.html#l00330">CpuPortControl()</a>, <a class="el" href="cgi_8c-source.html#l00400">CpuPortStatus()</a>, <a class="el" href="webport_8h-source.html#l00063">HTTP_THREAD_STACK</a>, <a class="el" href="webport_8c-source.html#l00160">JUMP_RESET</a>, <a class="el" href="webport_8c-source.html#l00067">MYIP</a>, <a class="el" href="webport_8c-source.html#l00057">MYMAC</a>, <a class="el" href="webport_8c-source.html#l00072">MYMASK</a>, <a class="el" href="webport_8h-source.html#l00062">NUM_HTTP_THREADS</a>, <a class="el" href="webport_8h-source.html#l00068">OPTO_STATUS_CGI</a>, <a class="el" href="webport_8h-source.html#l00065">PORT_CONTROL_CGI</a>, <a class="el" href="webport_8h-source.html#l00066">PORT_STATUS_CGI</a>, <a class="el" href="webport_8h-source.html#l00067">RELAY_CONTROL_CGI</a>, <a class="el" href="webport_8c-source.html#l00175">Service()</a>, <a class="el" href="webport_8c-source.html#l00241">ServiceThread()</a>, <a class="el" href="cgi_8c-source.html#l00547">SpiOptoStatus()</a>, <a class="el" href="cgi_8c-source.html#l00470">SpiRelayControl()</a>, and <a class="el" href="webport_8h-source.html#l00058">WP_STATUSOUT</a>. </td> </tr></table><a class="anchor" name="ga0" doxytag="webport.c::Service"></a><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">void Service </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">void </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Process a single HTTP request. <p>This routine performs the whole cycle of a HTTP request.<p><ul><li>Creating a socket.</li><li>Listening on the defined port.</li><li>Processing the request.</li><li>Closing the socket. </li></ul><p>Definition at line <a class="el" href="webport_8c-source.html#l00175">175</a> of file <a class="el" href="webport_8c-source.html">webport.c</a>.<p>References <a class="el" href="webport_8h-source.html#l00060">HTTP_PORT</a>, and <a class="el" href="webport_8h-source.html#l00061">LOW_MEM_MARK</a>.<p>Referenced by <a class="el" href="webport_8c-source.html#l00260">main()</a>, and <a class="el" href="webport_8c-source.html#l00241">ServiceThread()</a>. </td> </tr></table><a class="anchor" name="ga1" doxytag="webport.c::ServiceThread"></a><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">ServiceThread </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">void * </td> <td class="mdname1" valign="top" nowrap> <em>arg</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Background thread to process HTTP requests. <p>This thread calls <a class="el" href="group__xg_web_port.html#ga0">Service()</a> in an endless loop. It can be started more than once to support parallel connections. <p>Definition at line <a class="el" href="webport_8c-source.html#l00241">241</a> of file <a class="el" href="webport_8c-source.html">webport.c</a>.<p>References <a class="el" href="webport_8c-source.html#l00175">Service()</a>.<p>Referenced by <a class="el" href="webport_8c-source.html#l00260">main()</a>. </td> </tr></table><hr><address> <small> © 2002-2004 by egnite Software GmbH - visit <a href="http://www.ethernut.de/">http://www.ethernut.de/</a> </small></address></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -