Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/commanheader_8h_source.html
author Dominic Pinkman <dominic.pinkman@nokia.com>
Fri, 13 Aug 2010 16:47:46 +0100
changeset 14 578be2adaf3e
parent 6 43e37759235e
permissions -rw-r--r--
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582

<!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"/>
<title>TB9.2 Example Applications: examples/PIPS/opencproducerconsumerex/inc/commanheader.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.2 -->
<h1>examples/PIPS/opencproducerconsumerex/inc/commanheader.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00016"></a>00016 <span class="preprocessor">#ifndef COMMANHEADER_H</span>
<a name="l00017"></a>00017 <span class="preprocessor"></span><span class="preprocessor">#define COMMANHEADER_H</span>
<a name="l00018"></a>00018 <span class="preprocessor"></span>
<a name="l00019"></a>00019 <span class="comment">/* INCLUDE FILES */</span>
<a name="l00020"></a>00020 <span class="preprocessor">#include &lt;semaphore.h&gt;</span>
<a name="l00021"></a>00021 
<a name="l00022"></a>00022 <span class="preprocessor">#define MAX_CLIENTS     10</span>
<a name="l00023"></a>00023 <span class="preprocessor"></span><span class="preprocessor">#define KPortNum                2222</span>
<a name="l00024"></a>00024 <span class="preprocessor"></span><span class="preprocessor">#define KMSGQKEY                1000</span>
<a name="l00025"></a>00025 <span class="preprocessor"></span><span class="preprocessor">#define KMAXSENDMSG     100</span>
<a name="l00026"></a>00026 <span class="preprocessor"></span>
<a name="l00027"></a>00027 <span class="preprocessor">#define IN_SET_LOOPBACK_ADDR(a) \</span>
<a name="l00028"></a>00028 <span class="preprocessor">        { (a)-&gt;sin_addr.s_addr  = 0x0100007F; (a)-&gt;sin_family = AF_INET; }</span>
<a name="l00029"></a>00029 <span class="preprocessor"></span>
<a name="l00030"></a>00030 
<a name="l00031"></a>00031 <span class="comment">/* Structure used for sending details to the Producer and Consumers */</span>
<a name="l00032"></a><a class="code" href="struct_thread_param.html">00032</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>
<a name="l00033"></a>00033 {
<a name="l00034"></a>00034         <span class="keywordtype">int</span>   noOfItems;
<a name="l00035"></a>00035         <span class="keywordtype">int</span>   noOfConsumers;
<a name="l00036"></a>00036         sem_t itemLock;
<a name="l00037"></a>00037 } <a class="code" href="struct_thread_param.html">ThreadParam</a>;
<a name="l00038"></a>00038 
<a name="l00039"></a>00039 <span class="comment">/* Structure defining Items to be Produced */</span>
<a name="l00040"></a><a class="code" href="struct_produced_item.html">00040</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>
<a name="l00041"></a>00041 {
<a name="l00042"></a>00042         <span class="keywordtype">int</span>    itemNum;
<a name="l00043"></a>00043         <span class="keywordtype">char</span>   itemName[50];
<a name="l00044"></a>00044 } <a class="code" href="struct_produced_item.html">ProducedItem</a>;
<a name="l00045"></a>00045 
<a name="l00046"></a>00046 
<a name="l00047"></a>00047 
<a name="l00054"></a>00054 <span class="keywordtype">void</span>* <a class="code" href="producer_8c.html#a9ba1d3d3c7c4fefedf72684e9abdc8ee">ProducerThreadEntryPoint</a>( <span class="keywordtype">void</span>* aParam );
<a name="l00055"></a>00055 
<a name="l00062"></a>00062 <span class="keywordtype">void</span>* <a class="code" href="consumer_8c.html#aeb7daec86aaf17cff923e4e69e1ca964">ConsumerThreadEntryPoint</a>( <span class="keywordtype">void</span>* aParam );
<a name="l00063"></a>00063 
<a name="l00064"></a>00064 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00065"></a>00065 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> 
<a name="l00066"></a>00066 {
<a name="l00067"></a>00067 <span class="preprocessor">#endif</span>
<a name="l00068"></a>00068 <span class="preprocessor"></span>
<a name="l00074"></a>00074 <span class="keywordtype">void</span> <a class="code" href="observer_8cpp.html#abe25ac9eb42087610e2949b201e2f0b5">CreateObserverThread</a>( <span class="keywordtype">int</span> aNoOfMsg );
<a name="l00075"></a>00075 
<a name="l00082"></a>00082 <span class="keywordtype">void</span> <a class="code" href="stack_8cpp.html#a90e98e7c8440177d0df072df573cc038">PushOntoStack</a>( <a class="code" href="struct_produced_item.html">ProducedItem</a>* aItem );
<a name="l00083"></a>00083 
<a name="l00088"></a>00088 <a class="code" href="struct_produced_item.html">ProducedItem</a>* <a class="code" href="stack_8cpp.html#aaf42677487a6b410248a6c4fef8979fd">PopFromStack</a>();
<a name="l00089"></a>00089 
<a name="l00095"></a>00095 <span class="keywordtype">void</span> <a class="code" href="stack_8cpp.html#ac0da5b0fd0c1fbbee12568b2cfbf5354">FreeItem</a>(<a class="code" href="struct_produced_item.html">ProducedItem</a>* aItem);
<a name="l00096"></a>00096 
<a name="l00097"></a>00097 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00098"></a>00098 <span class="preprocessor"></span>}
<a name="l00099"></a>00099 <span class="preprocessor">#endif</span>
<a name="l00100"></a>00100 <span class="preprocessor"></span>
<a name="l00101"></a>00101 
<a name="l00102"></a>00102 <span class="preprocessor">#endif </span><span class="comment">/*COMMANHEADER_H*/</span>
<a name="l00103"></a>00103 
<a name="l00104"></a>00104 <span class="comment">/*  End of File */</span>
</pre></div></div>
<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
</body>
</html>