1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
---|
2 | <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> |
---|
3 | <title>mixpp: packet_channel.h Source File</title> |
---|
4 | <link href="tabs.css" rel="stylesheet" type="text/css"> |
---|
5 | <link href="doxygen.css" rel="stylesheet" type="text/css"> |
---|
6 | </head><body> |
---|
7 | <!-- Generated by Doxygen 1.5.8 --> |
---|
8 | <script type="text/javascript"> |
---|
9 | <!-- |
---|
10 | function changeDisplayState (e){ |
---|
11 | var num=this.id.replace(/[^[0-9]/g,''); |
---|
12 | var button=this.firstChild; |
---|
13 | var sectionDiv=document.getElementById('dynsection'+num); |
---|
14 | if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){ |
---|
15 | sectionDiv.style.display='block'; |
---|
16 | button.src='open.gif'; |
---|
17 | }else{ |
---|
18 | sectionDiv.style.display='none'; |
---|
19 | button.src='closed.gif'; |
---|
20 | } |
---|
21 | } |
---|
22 | function initDynSections(){ |
---|
23 | var divs=document.getElementsByTagName('div'); |
---|
24 | var sectionCounter=1; |
---|
25 | for(var i=0;i<divs.length-1;i++){ |
---|
26 | if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){ |
---|
27 | var header=divs[i]; |
---|
28 | var section=divs[i+1]; |
---|
29 | var button=header.firstChild; |
---|
30 | if (button!='IMG'){ |
---|
31 | divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild); |
---|
32 | button=document.createElement('img'); |
---|
33 | divs[i].insertBefore(button,divs[i].firstChild); |
---|
34 | } |
---|
35 | header.style.cursor='pointer'; |
---|
36 | header.onclick=changeDisplayState; |
---|
37 | header.id='dynheader'+sectionCounter; |
---|
38 | button.src='closed.gif'; |
---|
39 | section.id='dynsection'+sectionCounter; |
---|
40 | section.style.display='none'; |
---|
41 | section.style.marginLeft='14px'; |
---|
42 | sectionCounter++; |
---|
43 | } |
---|
44 | } |
---|
45 | } |
---|
46 | window.onload = initDynSections; |
---|
47 | --> |
---|
48 | </script> |
---|
49 | <div class="navigation" id="top"> |
---|
50 | <div class="tabs"> |
---|
51 | <ul> |
---|
52 | <li><a href="main.html"><span>Main Page</span></a></li> |
---|
53 | <li><a href="pages.html"><span>Related Pages</span></a></li> |
---|
54 | <li><a href="modules.html"><span>Modules</span></a></li> |
---|
55 | <li><a href="annotated.html"><span>Classes</span></a></li> |
---|
56 | <li class="current"><a href="files.html"><span>Files</span></a></li> |
---|
57 | </ul> |
---|
58 | </div> |
---|
59 | <div class="tabs"> |
---|
60 | <ul> |
---|
61 | <li><a href="files.html"><span>File List</span></a></li> |
---|
62 | <li><a href="globals.html"><span>File Members</span></a></li> |
---|
63 | </ul> |
---|
64 | </div> |
---|
65 | <h1>packet_channel.h</h1><a href="packet__channel_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 |
---|
66 | <a name="l00029"></a>00029 <span class="preprocessor">#ifndef PACKET_CHANNEL_H</span> |
---|
67 | <a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#define PACKET_CHANNEL_H</span> |
---|
68 | <a name="l00031"></a>00031 <span class="preprocessor"></span> |
---|
69 | <a name="l00032"></a>00032 <span class="preprocessor">#include <<a class="code" href="packet_8h.html" title="Definition of a Packet class.">itpp/protocol/packet.h</a>></span> |
---|
70 | <a name="l00033"></a>00033 <span class="preprocessor">#include <<a class="code" href="vec_8h.html" title="Templated Vector Class Definitions.">itpp/base/vec.h</a>></span> |
---|
71 | <a name="l00034"></a>00034 |
---|
72 | <a name="l00035"></a>00035 |
---|
73 | <a name="l00036"></a>00036 <span class="keyword">namespace </span>itpp |
---|
74 | <a name="l00037"></a>00037 { |
---|
75 | <a name="l00038"></a>00038 |
---|
76 | <a name="l00040"></a>00040 |
---|
77 | <a name="l00041"></a>00041 |
---|
78 | <a name="l00043"></a><a class="code" href="classitpp_1_1Packet__Channel.html">00043</a> <span class="keyword">class </span><a class="code" href="classitpp_1_1Packet__Channel.html" title="ADD DOCUMENTATION HERE.">Packet_Channel</a> |
---|
79 | <a name="l00044"></a>00044 { |
---|
80 | <a name="l00045"></a>00045 <span class="keyword">public</span>: |
---|
81 | <a name="l00047"></a>00047 <a class="code" href="classitpp_1_1Packet__Channel.html#0dff53c3662215af31199973cb244a4b" title="ADD DOCUMENTATION HERE.">Packet_Channel</a>(); |
---|
82 | <a name="l00049"></a>00049 <a class="code" href="classitpp_1_1Packet__Channel.html#0dff53c3662215af31199973cb244a4b" title="ADD DOCUMENTATION HERE.">Packet_Channel</a>(<span class="keyword">const</span> <span class="keywordtype">double</span> Pr, <span class="keyword">const</span> <a class="code" href="group__protocol.html#g33cb6c41273f24dbf05adf6e7cdb1a04" title="64-bit floating point time">Ttype</a> Delay, <span class="keyword">const</span> <span class="keywordtype">double</span> Block_rate, <span class="keyword">const</span> <span class="keywordtype">int</span> Max_slots = 0); |
---|
83 | <a name="l00050"></a>00050 |
---|
84 | <a name="l00052"></a>00052 <a class="code" href="classitpp_1_1Packet__Channel.html#3250399951f3a41da984855f3c730b01" title="ADD DOCUMENTATION HERE.">~Packet_Channel</a>(); |
---|
85 | <a name="l00053"></a>00053 |
---|
86 | <a name="l00054"></a>00054 <span class="comment">// -- Slots -- //</span> |
---|
87 | <a name="l00056"></a><a class="code" href="classitpp_1_1Packet__Channel.html#932f4f55d4a2e094d1ae4b56dacde3aa">00056</a> <span class="comment"></span> <a class="code" href="classitpp_1_1Slot.html">Slot<Packet_Channel, bool></a> <a class="code" href="classitpp_1_1Packet__Channel.html#932f4f55d4a2e094d1ae4b56dacde3aa" title="ADD DOCUMENTATION HERE.">start</a>; |
---|
88 | <a name="l00058"></a><a class="code" href="classitpp_1_1Packet__Channel.html#3eccc64ab07c3973ef1f34b408c8be48">00058</a> <a class="code" href="classitpp_1_1Slot.html">Slot<Packet_Channel, Link_Packet*></a> <a class="code" href="classitpp_1_1Packet__Channel.html#3eccc64ab07c3973ef1f34b408c8be48" title="ADD DOCUMENTATION HERE.">input</a>; |
---|
89 | <a name="l00060"></a><a class="code" href="classitpp_1_1Packet__Channel.html#8609667e475d783827701288c19049ea">00060</a> <a class="code" href="classitpp_1_1Slot.html">Slot<Packet_Channel, int></a> <a class="code" href="classitpp_1_1Packet__Channel.html#8609667e475d783827701288c19049ea" title="ADD DOCUMENTATION HERE.">nof_inputs</a>; |
---|
90 | <a name="l00061"></a>00061 |
---|
91 | <a name="l00062"></a>00062 <span class="comment">// -- Signals -- //</span> |
---|
92 | <a name="l00064"></a><a class="code" href="classitpp_1_1Packet__Channel.html#cd14467fc8ab8688671f18da024ecf9d">00064</a> <span class="comment"></span> <a class="code" href="classitpp_1_1Signal.html">Signal<Link_Packet*></a> <a class="code" href="classitpp_1_1Packet__Channel.html#cd14467fc8ab8688671f18da024ecf9d" title="ADD DOCUMENTATION HERE.">output</a>; |
---|
93 | <a name="l00066"></a><a class="code" href="classitpp_1_1Packet__Channel.html#167c605ad3157dcb3985a982413f5738">00066</a> <a class="code" href="classitpp_1_1Signal.html">Signal<int></a> <a class="code" href="classitpp_1_1Packet__Channel.html#167c605ad3157dcb3985a982413f5738" title="ADD DOCUMENTATION HERE.">input_request</a>; |
---|
94 | <a name="l00068"></a><a class="code" href="classitpp_1_1Packet__Channel.html#f5077cc32e09e03cd164d3866be033d2">00068</a> <a class="code" href="classitpp_1_1Signal.html">Signal<void*></a> <a class="code" href="classitpp_1_1Packet__Channel.html#f5077cc32e09e03cd164d3866be033d2" title="ADD DOCUMENTATION HERE.">get_nof_inputs</a>; |
---|
95 | <a name="l00069"></a>00069 |
---|
96 | <a name="l00071"></a>00071 <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Packet__Channel.html#80012e6ab528e4312d27f65b3278dfdd" title="ADD DOCUMENTATION HERE.">set_parameters</a>(<span class="keyword">const</span> <span class="keywordtype">double</span> Pr, <span class="keyword">const</span> <a class="code" href="group__protocol.html#g33cb6c41273f24dbf05adf6e7cdb1a04" title="64-bit floating point time">Ttype</a> Delay, <span class="keyword">const</span> <span class="keywordtype">double</span> Block_rate, <span class="keyword">const</span> <span class="keywordtype">int</span> Max_slots); |
---|
97 | <a name="l00072"></a>00072 |
---|
98 | <a name="l00074"></a>00074 <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Packet__Channel.html#68211eddf46a98733d05e3bbeab776d3" title="ADD DOCUMENTATION HERE.">set_errors</a>(<span class="keyword">const</span> ivec &Lost); |
---|
99 | <a name="l00075"></a>00075 |
---|
100 | <a name="l00076"></a>00076 <span class="keyword">private</span>: |
---|
101 | <a name="l00077"></a>00077 <span class="keywordtype">void</span> block_rate_loop(); |
---|
102 | <a name="l00078"></a>00078 <span class="keywordtype">void</span> handle_input(<a class="code" href="classitpp_1_1Link__Packet.html">Link_Packet</a>* M); |
---|
103 | <a name="l00079"></a>00079 <span class="keywordtype">void</span> handle_start(<span class="keyword">const</span> <span class="keywordtype">bool</span> <a class="code" href="classitpp_1_1Packet__Channel.html#932f4f55d4a2e094d1ae4b56dacde3aa" title="ADD DOCUMENTATION HERE.">start</a>); |
---|
104 | <a name="l00080"></a>00080 <span class="keywordtype">void</span> handle_nof_inputs(<span class="keyword">const</span> <span class="keywordtype">int</span> N); |
---|
105 | <a name="l00081"></a>00081 |
---|
106 | <a name="l00082"></a>00082 <span class="keywordtype">bool</span> keep_running; |
---|
107 | <a name="l00083"></a>00083 <span class="keywordtype">bool</span> parameters_ok; |
---|
108 | <a name="l00084"></a>00084 <span class="keywordtype">bool</span> explicit_errors; |
---|
109 | <a name="l00085"></a>00085 <span class="keywordtype">bool</span> lose; |
---|
110 | <a name="l00086"></a>00086 <span class="keywordtype">double</span> pr; |
---|
111 | <a name="l00087"></a>00087 <a class="code" href="group__protocol.html#g33cb6c41273f24dbf05adf6e7cdb1a04" title="64-bit floating point time">Ttype</a> delay; |
---|
112 | <a name="l00088"></a>00088 <span class="keywordtype">double</span> block_time; |
---|
113 | <a name="l00089"></a>00089 <span class="keywordtype">int</span> max_slots; |
---|
114 | <a name="l00090"></a>00090 ivec lost; |
---|
115 | <a name="l00091"></a>00091 <span class="keywordtype">int</span> k, K, L; |
---|
116 | <a name="l00092"></a>00092 }; |
---|
117 | <a name="l00093"></a>00093 |
---|
118 | <a name="l00094"></a>00094 |
---|
119 | <a name="l00096"></a><a class="code" href="classitpp_1_1ACK__Channel.html">00096</a> <span class="keyword">class </span><a class="code" href="classitpp_1_1ACK__Channel.html" title="ADD DOCUMENTATION HERE.">ACK_Channel</a> |
---|
120 | <a name="l00097"></a>00097 { |
---|
121 | <a name="l00098"></a>00098 <span class="keyword">public</span>: |
---|
122 | <a name="l00100"></a>00100 <a class="code" href="classitpp_1_1ACK__Channel.html#4d016fd7b27c966c8acd649bb588278f" title="ADD DOCUMENTATION HERE.">ACK_Channel</a>(); |
---|
123 | <a name="l00101"></a>00101 |
---|
124 | <a name="l00103"></a>00103 <a class="code" href="classitpp_1_1ACK__Channel.html#4d016fd7b27c966c8acd649bb588278f" title="ADD DOCUMENTATION HERE.">ACK_Channel</a>(<span class="keyword">const</span> <span class="keywordtype">double</span> Pr, <span class="keyword">const</span> <a class="code" href="group__protocol.html#g33cb6c41273f24dbf05adf6e7cdb1a04" title="64-bit floating point time">Ttype</a> Delay); |
---|
125 | <a name="l00104"></a>00104 |
---|
126 | <a name="l00106"></a>00106 <a class="code" href="classitpp_1_1ACK__Channel.html#c62db8785a72261ff8357f8bc843e1a7" title="ADD DOCUMENTATION HERE.">~ACK_Channel</a>(); |
---|
127 | <a name="l00107"></a>00107 |
---|
128 | <a name="l00108"></a>00108 <span class="comment">// -- Slots -- //</span> |
---|
129 | <a name="l00110"></a><a class="code" href="classitpp_1_1ACK__Channel.html#97302c68849c063f730a9939e6a7e0e4">00110</a> <span class="comment"></span> <a class="code" href="classitpp_1_1Slot.html">Slot<ACK_Channel, ACK*></a> <a class="code" href="classitpp_1_1ACK__Channel.html#97302c68849c063f730a9939e6a7e0e4" title="ADD DOCUMENTATION HERE.">input</a>; |
---|
130 | <a name="l00111"></a>00111 |
---|
131 | <a name="l00112"></a>00112 <span class="comment">// -- Signals -- //</span> |
---|
132 | <a name="l00114"></a><a class="code" href="classitpp_1_1ACK__Channel.html#f81fca2f49b2a4704a593cc234646df5">00114</a> <span class="comment"></span> <a class="code" href="classitpp_1_1Signal.html">Signal<ACK*></a> <a class="code" href="classitpp_1_1ACK__Channel.html#f81fca2f49b2a4704a593cc234646df5" title="ADD DOCUMENTATION HERE.">output</a>; |
---|
133 | <a name="l00115"></a>00115 |
---|
134 | <a name="l00117"></a>00117 <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1ACK__Channel.html#40e0e67615c6d773da4c82f1f90eb4a1" title="ADD DOCUMENTATION HERE.">set_parameters</a>(<span class="keyword">const</span> <span class="keywordtype">double</span> Pr, <span class="keyword">const</span> <a class="code" href="group__protocol.html#g33cb6c41273f24dbf05adf6e7cdb1a04" title="64-bit floating point time">Ttype</a> Delay); |
---|
135 | <a name="l00119"></a>00119 <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1ACK__Channel.html#f69917dcf8f507468869ef84e215f337" title="ADD DOCUMENTATION HERE.">set_errors</a>(<span class="keyword">const</span> ivec& Lost); |
---|
136 | <a name="l00120"></a>00120 |
---|
137 | <a name="l00121"></a>00121 <span class="keyword">private</span>: |
---|
138 | <a name="l00122"></a>00122 <span class="keywordtype">void</span> handle_input(<a class="code" href="classitpp_1_1ACK.html">ACK</a>* M); |
---|
139 | <a name="l00123"></a>00123 |
---|
140 | <a name="l00124"></a>00124 <span class="keywordtype">bool</span> parameters_ok; |
---|
141 | <a name="l00125"></a>00125 <span class="keywordtype">bool</span> explicit_errors; |
---|
142 | <a name="l00126"></a>00126 <span class="keywordtype">bool</span> lose; |
---|
143 | <a name="l00127"></a>00127 <span class="keywordtype">double</span> pr; |
---|
144 | <a name="l00128"></a>00128 <a class="code" href="group__protocol.html#g33cb6c41273f24dbf05adf6e7cdb1a04" title="64-bit floating point time">Ttype</a> delay; |
---|
145 | <a name="l00129"></a>00129 ivec lost; |
---|
146 | <a name="l00130"></a>00130 <span class="keywordtype">int</span> k, K, L; |
---|
147 | <a name="l00131"></a>00131 }; |
---|
148 | <a name="l00132"></a>00132 |
---|
149 | <a name="l00134"></a>00134 |
---|
150 | <a name="l00135"></a>00135 } <span class="comment">// namespace itpp</span> |
---|
151 | <a name="l00136"></a>00136 |
---|
152 | <a name="l00137"></a>00137 <span class="preprocessor">#endif // #ifndef PACKET_CHANNEL_H</span> |
---|
153 | <a name="l00138"></a>00138 <span class="preprocessor"></span> |
---|
154 | </pre></div></div> |
---|
155 | <hr size="1"><address style="text-align: right;"><small>Generated on Tue Jun 2 10:02:12 2009 for mixpp by |
---|
156 | <a href="http://www.doxygen.org/index.html"> |
---|
157 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address> |
---|
158 | </body> |
---|
159 | </html> |
---|