root/doc/html/packet_8h-source.html @ 354

Revision 353, 12.4 kB (checked in by smidl, 16 years ago)

doc

Line 
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.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<!--
10function 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}
22function 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}
46window.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&nbsp;Page</span></a></li>
53      <li><a href="pages.html"><span>Related&nbsp;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&nbsp;List</span></a></li>
62      <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
63    </ul>
64  </div>
65<h1>packet.h</h1><a href="packet_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_H</span>
67<a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#define PACKET_H</span>
68<a name="l00031"></a>00031 <span class="preprocessor"></span>
69<a name="l00032"></a>00032 <span class="preprocessor">#include &lt;<a class="code" href="signals__slots_8h.html" title="Definitions of Signals and Slots classes.">itpp/protocol/signals_slots.h</a>&gt;</span>
70<a name="l00033"></a>00033
71<a name="l00034"></a>00034
72<a name="l00035"></a>00035 <span class="keyword">namespace </span>itpp
73<a name="l00036"></a>00036 {
74<a name="l00037"></a>00037
75<a name="l00039"></a>00039
76<a name="l00040"></a>00040
77<a name="l00044"></a><a class="code" href="classitpp_1_1Packet.html">00044</a> <span class="keyword">class </span><a class="code" href="classitpp_1_1Packet.html">Packet</a>
78<a name="l00045"></a>00045 {
79<a name="l00046"></a>00046 <span class="keyword">public</span>:
80<a name="l00048"></a><a class="code" href="classitpp_1_1Packet.html#d7ffaefabf495c296163d53caac7fbab">00048</a>   <a class="code" href="classitpp_1_1Packet.html#d7ffaefabf495c296163d53caac7fbab" title="ADD DOCUMENTATION HERE.">Packet</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> packet_size = 0) { <a class="code" href="classitpp_1_1Packet.html#6413bdc5915093620dfbe32e0e0a1730" title="set size of packet in bits">set_bit_size</a>(packet_size); }
81<a name="l00050"></a><a class="code" href="classitpp_1_1Packet.html#72dc609b7041153c1a260cdd67ab9ebe">00050</a>   <span class="keyword">virtual</span> <a class="code" href="classitpp_1_1Packet.html#72dc609b7041153c1a260cdd67ab9ebe" title="ADD DOCUMENTATION HERE.">~Packet</a>() {}
82<a name="l00051"></a>00051
83<a name="l00053"></a><a class="code" href="classitpp_1_1Packet.html#6413bdc5915093620dfbe32e0e0a1730">00053</a>   <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Packet.html#6413bdc5915093620dfbe32e0e0a1730" title="set size of packet in bits">set_bit_size</a>(<span class="keywordtype">int</span> packet_size) { <a class="code" href="group__errorhandlingfunc.html#gd5c34b291e5018534fd2344486e2b5a1" title="Abort if t is not true.">it_assert</a>(packet_size &gt;= 0, <span class="stringliteral">"Packet size must be positive"</span>); size_bits = packet_size; }
84<a name="l00054"></a>00054
85<a name="l00056"></a><a class="code" href="classitpp_1_1Packet.html#2970c5562530cf8981965451a5dde65a">00056</a>   <span class="keywordtype">int</span> <a class="code" href="classitpp_1_1Packet.html#2970c5562530cf8981965451a5dde65a" title="get size of packet in bits">bit_size</a>() { <span class="keywordflow">return</span> size_bits; }
86<a name="l00057"></a>00057
87<a name="l00058"></a>00058 <span class="keyword">private</span>:
88<a name="l00059"></a>00059   <span class="keywordtype">int</span> size_bits; <span class="comment">// size of packet in bits</span>
89<a name="l00060"></a>00060 };
90<a name="l00061"></a>00061
91<a name="l00062"></a>00062
92<a name="l00066"></a><a class="code" href="classitpp_1_1L3__Packet__Info.html">00066</a> <span class="keyword">class </span><a class="code" href="classitpp_1_1L3__Packet__Info.html">L3_Packet_Info</a>
93<a name="l00067"></a>00067 {
94<a name="l00068"></a>00068 <span class="keyword">public</span>:
95<a name="l00070"></a><a class="code" href="classitpp_1_1L3__Packet__Info.html#af88a51115b6c9bb29e1819d823bede7">00070</a>   <a class="code" href="classitpp_1_1L3__Packet__Info.html#af88a51115b6c9bb29e1819d823bede7" title="ADD DOCUMENTATION HERE.">L3_Packet_Info</a>(<a class="code" href="classitpp_1_1Packet.html">Packet</a> *packet) { <a class="code" href="classitpp_1_1L3__Packet__Info.html#bdad6c86b0eeb05c61c8b235df2b1441" title="ADD DOCUMENTATION HERE.">timestamp</a> = 0; <a class="code" href="classitpp_1_1L3__Packet__Info.html#8b77d917332c117a0a643ba4398180b3" title="ADD DOCUMENTATION HERE.">pkt_pointer</a> = packet; }
96<a name="l00071"></a>00071
97<a name="l00073"></a><a class="code" href="classitpp_1_1L3__Packet__Info.html#f83302be441a588b90ddb1c67484330a">00073</a>   <a class="code" href="classitpp_1_1L3__Packet__Info.html#f83302be441a588b90ddb1c67484330a" title="ADD DOCUMENTATION HERE.">~L3_Packet_Info</a>() {}
98<a name="l00074"></a>00074
99<a name="l00076"></a><a class="code" href="classitpp_1_1L3__Packet__Info.html#bdad6c86b0eeb05c61c8b235df2b1441">00076</a>   <a class="code" href="group__protocol.html#g33cb6c41273f24dbf05adf6e7cdb1a04" title="64-bit floating point time">Ttype</a> <a class="code" href="classitpp_1_1L3__Packet__Info.html#bdad6c86b0eeb05c61c8b235df2b1441" title="ADD DOCUMENTATION HERE.">timestamp</a>;
100<a name="l00077"></a>00077
101<a name="l00079"></a><a class="code" href="classitpp_1_1L3__Packet__Info.html#8b77d917332c117a0a643ba4398180b3">00079</a>   <a class="code" href="classitpp_1_1Packet.html">Packet</a> *<a class="code" href="classitpp_1_1L3__Packet__Info.html#8b77d917332c117a0a643ba4398180b3" title="ADD DOCUMENTATION HERE.">pkt_pointer</a>;
102<a name="l00080"></a>00080 };
103<a name="l00081"></a>00081
104<a name="l00082"></a>00082
105<a name="l00086"></a><a class="code" href="classitpp_1_1Link__Packet.html">00086</a> <span class="keyword">class </span><a class="code" href="classitpp_1_1Link__Packet.html">Link_Packet</a> : <span class="keyword">public</span> <a class="code" href="classitpp_1_1Packet.html">Packet</a>
106<a name="l00087"></a>00087 {
107<a name="l00088"></a>00088 <span class="keyword">public</span>:
108<a name="l00090"></a><a class="code" href="classitpp_1_1Link__Packet.html#7294a5863406dccef4fdf41c847780a6">00090</a>   <a class="code" href="classitpp_1_1Link__Packet.html#7294a5863406dccef4fdf41c847780a6" title="ADD DOCUMENTATION HERE.">Link_Packet</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> Seq_no, <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> Link_packet_id, <a class="code" href="classitpp_1_1L3__Packet__Info.html">L3_Packet_Info</a> *Cp) { <a class="code" href="classitpp_1_1Link__Packet.html#5974d417d6169b1eb2434c0ff3a00a41" title="ADD DOCUMENTATION HERE.">seq_no</a> = Seq_no; <a class="code" href="classitpp_1_1Link__Packet.html#3151d4a84246a70c195d7f0bdbeafaf4" title="ADD DOCUMENTATION HERE.">link_packet_id</a> = Link_packet_id; <a class="code" href="classitpp_1_1Link__Packet.html#a76bd9f6a782a5d9fcbf1e088c0efe01" title="ADD DOCUMENTATION HERE.">l3_pkt_info_p</a> = Cp; }
109<a name="l00091"></a>00091
110<a name="l00093"></a><a class="code" href="classitpp_1_1Link__Packet.html#9f34af1084ab4f627705313b243c1009">00093</a>   <a class="code" href="classitpp_1_1Link__Packet.html#9f34af1084ab4f627705313b243c1009" title="ADD DOCUMENTATION HERE.">~Link_Packet</a>() {}
111<a name="l00094"></a>00094
112<a name="l00096"></a><a class="code" href="classitpp_1_1Link__Packet.html#3151d4a84246a70c195d7f0bdbeafaf4">00096</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> <a class="code" href="classitpp_1_1Link__Packet.html#3151d4a84246a70c195d7f0bdbeafaf4" title="ADD DOCUMENTATION HERE.">link_packet_id</a>;
113<a name="l00098"></a><a class="code" href="classitpp_1_1Link__Packet.html#5974d417d6169b1eb2434c0ff3a00a41">00098</a>   <span class="keywordtype">int</span> <a class="code" href="classitpp_1_1Link__Packet.html#5974d417d6169b1eb2434c0ff3a00a41" title="ADD DOCUMENTATION HERE.">seq_no</a>;
114<a name="l00100"></a><a class="code" href="classitpp_1_1Link__Packet.html#a76bd9f6a782a5d9fcbf1e088c0efe01">00100</a>   <a class="code" href="classitpp_1_1L3__Packet__Info.html">L3_Packet_Info</a> *<a class="code" href="classitpp_1_1Link__Packet.html#a76bd9f6a782a5d9fcbf1e088c0efe01" title="ADD DOCUMENTATION HERE.">l3_pkt_info_p</a>;
115<a name="l00101"></a>00101 };
116<a name="l00102"></a>00102
117<a name="l00106"></a><a class="code" href="classitpp_1_1ACK.html">00106</a> <span class="keyword">class </span><a class="code" href="classitpp_1_1ACK.html">ACK</a> : <span class="keyword">public</span> <a class="code" href="classitpp_1_1Packet.html">Packet</a>
118<a name="l00107"></a>00107 {
119<a name="l00108"></a>00108 <span class="keyword">public</span>:
120<a name="l00110"></a><a class="code" href="classitpp_1_1ACK.html#4f486d812af0e8717fb683a271772a57">00110</a>   <a class="code" href="classitpp_1_1ACK.html#4f486d812af0e8717fb683a271772a57" title="ADD DOCUMENTATION HERE.">ACK</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> Seq_no = -1, <span class="keyword">const</span> <span class="keywordtype">int</span> Id = 0) { <a class="code" href="classitpp_1_1ACK.html#633fb2e083fec8fe163a6dc1f3da2289" title="ADD DOCUMENTATION HERE.">seq_no</a> = Seq_no; <span class="keywordtype">id</span> = Id; }
121<a name="l00111"></a>00111
122<a name="l00113"></a><a class="code" href="classitpp_1_1ACK.html#8e11fa7b3b1c2e3c78c5b6bc575dae6c">00113</a>   <a class="code" href="classitpp_1_1ACK.html#8e11fa7b3b1c2e3c78c5b6bc575dae6c" title="ADD DOCUMENTATION HERE.">~ACK</a>() {}
123<a name="l00114"></a>00114
124<a name="l00116"></a><a class="code" href="classitpp_1_1ACK.html#c001a83351cde7058dc00ad0994ecbc8">00116</a>   <span class="keywordtype">int</span> <a class="code" href="classitpp_1_1ACK.html#c001a83351cde7058dc00ad0994ecbc8" title="ADD DOCUMENTATION HERE.">id</a>;
125<a name="l00118"></a><a class="code" href="classitpp_1_1ACK.html#633fb2e083fec8fe163a6dc1f3da2289">00118</a>   <span class="keywordtype">int</span> <a class="code" href="classitpp_1_1ACK.html#633fb2e083fec8fe163a6dc1f3da2289" title="ADD DOCUMENTATION HERE.">seq_no</a>;
126<a name="l00119"></a>00119 };
127<a name="l00120"></a>00120
128<a name="l00122"></a>00122
129<a name="l00123"></a>00123 } <span class="comment">// namespace itpp</span>
130<a name="l00124"></a>00124
131<a name="l00125"></a>00125 <span class="preprocessor">#endif // #ifndef PACKET_H</span>
132<a name="l00126"></a>00126 <span class="preprocessor"></span>
133</pre></div></div>
134<hr size="1"><address style="text-align: right;"><small>Generated on Tue Jun 2 10:02:12 2009 for mixpp by&nbsp;
135<a href="http://www.doxygen.org/index.html">
136<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
137</body>
138</html>
Note: See TracBrowser for help on using the browser.