author | Vedran Miletić <rivanvx@gmail.com> |
Tue, 02 Aug 2011 17:42:33 -0400 | |
changeset 7385 | 10beb0e53130 |
parent 7353 | 09fccf6195ea |
child 10469 | c4e79d3e3007 |
permissions | -rw-r--r-- |
7385
10beb0e53130
standardize emacs c++ mode comments
Vedran Miletić <rivanvx@gmail.com>
parents:
7353
diff
changeset
|
1 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
6478
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
2 |
/* |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
3 |
* Copyright (c) 2009 University of Washington |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
4 |
* |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
5 |
* This program is free software; you can redistribute it and/or modify |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
6 |
* it under the terms of the GNU General Public License version 2 as |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
8 |
* |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
9 |
* This program is distributed in the hope that it will be useful, |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
12 |
* GNU General Public License for more details. |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
13 |
* |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
14 |
* You should have received a copy of the GNU General Public License |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
15 |
* along with this program; if not, write to the Free Software |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
16 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
17 |
* |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
18 |
* Author: Leonard Tracy <lentracy@gmail.com> |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
19 |
*/ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
20 |
|
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
21 |
|
7353
09fccf6195ea
bug 1203: Inconsistently named ifndef/define macros in ns-3 headers
Vedran Miletic <rivanvx@gmail.com>
parents:
6852
diff
changeset
|
22 |
#ifndef UAN_HEADER_RC_H |
09fccf6195ea
bug 1203: Inconsistently named ifndef/define macros in ns-3 headers
Vedran Miletic <rivanvx@gmail.com>
parents:
6852
diff
changeset
|
23 |
#define UAN_HEADER_RC_H |
6478
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
24 |
|
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
25 |
#include "ns3/header.h" |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
26 |
#include "ns3/nstime.h" |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
27 |
#include "ns3/uan-address.h" |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
28 |
|
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
29 |
#include <set> |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
30 |
|
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
31 |
namespace ns3 { |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
32 |
|
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
33 |
/** |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
34 |
* \class UanHeaderRcData |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
35 |
* |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
36 |
* \brief Extra data header information |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
37 |
* |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
38 |
* Adds prop. delay measure, and frame number info to |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
39 |
* transmitted data packet |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
40 |
*/ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
41 |
class UanHeaderRcData : public Header |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
42 |
{ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
43 |
public: |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
44 |
UanHeaderRcData (); |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
45 |
/** |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
46 |
* \param frameNum Data frame # of reservation being transmitted |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
47 |
* \param propDelay Measured propagation delay found in handshaking |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
48 |
* \note Prop. delay is transmitted with 16 bits and ms accuracy |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
49 |
*/ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
50 |
UanHeaderRcData (uint8_t frameNum, Time propDelay); |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
51 |
virtual ~UanHeaderRcData (); |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
52 |
|
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
53 |
static TypeId GetTypeId (void); |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
54 |
|
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
55 |
/** |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
56 |
* \param frameNum Data frame # of reservation being transmitted |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
57 |
*/ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
58 |
void SetFrameNo (uint8_t frameNum); |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
59 |
/** |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
60 |
* \param propDelay Measured propagation delay found in handshaking |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
61 |
* \note Prop. delay is transmitted with 16 bits and ms accuracy |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
62 |
*/ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
63 |
void SetPropDelay (Time propDelay); |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
64 |
/** |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
65 |
* \returns Data frame # of reservation being transmitted |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
66 |
*/ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
67 |
uint8_t GetFrameNo (void) const; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
68 |
/** |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
69 |
* \returns Measured propagation delay found in handshaking |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
70 |
* \note Prop. delay is transmitted with 16 bits and ms accuracy |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
71 |
*/ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
72 |
Time GetPropDelay (void) const; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
73 |
|
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
74 |
// Inherrited methods |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
75 |
virtual uint32_t GetSerializedSize (void) const; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
76 |
virtual void Serialize (Buffer::Iterator start) const; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
77 |
virtual uint32_t Deserialize (Buffer::Iterator start); |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
78 |
virtual void Print (std::ostream &os) const; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
79 |
virtual TypeId GetInstanceTypeId (void) const; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
80 |
|
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
81 |
private: |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
82 |
uint8_t m_frameNo; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
83 |
Time m_propDelay; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
84 |
}; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
85 |
|
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
86 |
/** |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
87 |
* \class UanHeaderRcRts |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
88 |
* |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
89 |
* \brief RTS header |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
90 |
* |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
91 |
* Contains frame #, retry #, # frames, length, and timestamp |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
92 |
*/ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
93 |
class UanHeaderRcRts : public Header |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
94 |
{ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
95 |
public: |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
96 |
UanHeaderRcRts (); |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
97 |
/** |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
98 |
* \param frameNo Reservation frame # |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
99 |
* \param retryNo Retry # of RTS packet |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
100 |
* \param noFrames # of data frames in reservation |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
101 |
* \param length # of bytes (including headers) in data |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
102 |
* \param ts RTS TX timestamp |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
103 |
* \note Timestamp is serialized into 32 bits with ms accuracy |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
104 |
*/ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
105 |
UanHeaderRcRts (uint8_t frameNo, uint8_t retryNo, uint8_t noFrames, uint16_t length, Time ts); |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
106 |
virtual ~UanHeaderRcRts (); |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
107 |
|
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
108 |
static TypeId GetTypeId (void); |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
109 |
|
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
110 |
/** |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
111 |
* \param fno TX frame # |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
112 |
*/ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
113 |
void SetFrameNo (uint8_t fno); |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
114 |
/** |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
115 |
* \param no Number of data frames included in this reservation request |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
116 |
*/ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
117 |
void SetNoFrames (uint8_t no); |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
118 |
/** |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
119 |
* \param timeStamp RTS transmission time |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
120 |
*/ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
121 |
void SetTimeStamp (Time timeStamp); |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
122 |
/** |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
123 |
* \param length Total number of data bytes in reservation (including headers) |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
124 |
* \note Timestamp is serialized with 32 bits in ms precision |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
125 |
*/ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
126 |
void SetLength (uint16_t length); |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
127 |
/** |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
128 |
* \param no Retry number of this RTS (Used to match timestamp to correctly received RTS) |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
129 |
*/ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
130 |
void SetRetryNo (uint8_t no); |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
131 |
|
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
132 |
/** |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
133 |
* \returns Frame # |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
134 |
*/ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
135 |
uint8_t GetFrameNo (void) const; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
136 |
/** |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
137 |
* \returns # of data frames in reservation |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
138 |
*/ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
139 |
uint8_t GetNoFrames (void) const; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
140 |
/** |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
141 |
* \returns TX time of the RTS packet |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
142 |
* \note Timestamp is serialized with 32 bits in ms precision |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
143 |
*/ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
144 |
Time GetTimeStamp (void) const; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
145 |
/** |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
146 |
* \returns Total # of bytes in data packets for reservation (including headers) |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
147 |
*/ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
148 |
uint16_t GetLength (void) const; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
149 |
/** |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
150 |
* \returns Retry number of this RTS packet |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
151 |
*/ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
152 |
uint8_t GetRetryNo (void) const; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
153 |
|
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
154 |
// Inherrited methods |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
155 |
virtual uint32_t GetSerializedSize (void) const; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
156 |
virtual void Serialize (Buffer::Iterator start) const; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
157 |
virtual uint32_t Deserialize (Buffer::Iterator start); |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
158 |
virtual void Print (std::ostream &os) const; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
159 |
virtual TypeId GetInstanceTypeId (void) const; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
160 |
|
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
161 |
private: |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
162 |
uint8_t m_frameNo; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
163 |
uint8_t m_noFrames; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
164 |
uint16_t m_length; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
165 |
Time m_timeStamp; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
166 |
uint8_t m_retryNo; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
167 |
}; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
168 |
|
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
169 |
/** |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
170 |
* \class UanHeaderRcCtsGlobal |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
171 |
* |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
172 |
* \brief Cycle broadcast information for |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
173 |
*/ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
174 |
|
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
175 |
|
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
176 |
class UanHeaderRcCtsGlobal : public Header |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
177 |
{ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
178 |
public: |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
179 |
/** |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
180 |
* \brief Create UanHeaderRcCtsGlobal with fields zeroed out |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
181 |
*/ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
182 |
UanHeaderRcCtsGlobal (); |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
183 |
/** |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
184 |
* \brief Create object with given window time, time stamp, rate, and retry rate. |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
185 |
* \param wt Window time |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
186 |
* \param ts Timestamp |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
187 |
* \param rate Rate number |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
188 |
* \param retryRate Retry rate value |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
189 |
*/ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
190 |
UanHeaderRcCtsGlobal (Time wt, Time ts, uint16_t rate, uint16_t retryRate); |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
191 |
~UanHeaderRcCtsGlobal (); |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
192 |
|
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
193 |
static TypeId GetTypeId (void); |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
194 |
|
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
195 |
/** |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
196 |
* \param rate Rate number corresponding to data rate of current cycle |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
197 |
*/ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
198 |
void SetRateNum (uint16_t rate); |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
199 |
/** |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
200 |
* \param rate Retry rate number for current cycle |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
201 |
*/ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
202 |
void SetRetryRate (uint16_t rate); |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
203 |
/** |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
204 |
* \param t Time duration following blocking time to allow RTS transmissions |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
205 |
*/ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
206 |
void SetWindowTime (Time t); |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
207 |
|
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
208 |
/** |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
209 |
* \param timeStamp Time of CTS transmission |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
210 |
*/ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
211 |
void SetTxTimeStamp (Time timeStamp); |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
212 |
|
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
213 |
/** |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
214 |
* \returns Rate # corresponding to data rate of current cycle |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
215 |
*/ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
216 |
uint16_t GetRateNum (void) const; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
217 |
/** |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
218 |
* \returns retry rate # of retry rate for current cycle |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
219 |
*/ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
220 |
uint16_t GetRetryRate (void) const; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
221 |
/** |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
222 |
* \returns Time duration after blocking time allowed for RTS transmissions |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
223 |
*/ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
224 |
Time GetWindowTime (void) const; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
225 |
/** |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
226 |
* \returns Timestamp of CTS transmission |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
227 |
*/ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
228 |
Time GetTxTimeStamp (void) const; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
229 |
|
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
230 |
// Inherrited methods |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
231 |
virtual uint32_t GetSerializedSize (void) const; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
232 |
virtual void Serialize (Buffer::Iterator start) const; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
233 |
virtual uint32_t Deserialize (Buffer::Iterator start); |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
234 |
virtual void Print (std::ostream &os) const; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
235 |
virtual TypeId GetInstanceTypeId (void) const; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
236 |
|
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
237 |
private: |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
238 |
Time m_timeStampTx; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
239 |
Time m_winTime; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
240 |
uint16_t m_retryRate; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
241 |
uint16_t m_rateNum; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
242 |
}; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
243 |
/** |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
244 |
* \class UanHeaderRcCts |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
245 |
* |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
246 |
* \brief CTS header |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
247 |
* |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
248 |
* Includes RTS RX time, CTS TX time, delay until TX, RTS blocking period, |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
249 |
* RTS tx period, rate #, and retry rate # |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
250 |
*/ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
251 |
|
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
252 |
class UanHeaderRcCts : public Header |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
253 |
{ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
254 |
public: |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
255 |
UanHeaderRcCts (); |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
256 |
/** |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
257 |
* \param frameNo Resrvation frame # being cleared |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
258 |
* \param retryNo Retry # of received RTS packet |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
259 |
* \param rtsTs RX time of RTS packet at gateway |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
260 |
* \param delay Delay until transmission |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
261 |
* \param addr Destination of CTS packet |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
262 |
* \note Times are serialized, with ms precission, into 32 bit fields. |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
263 |
*/ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
264 |
UanHeaderRcCts (uint8_t frameNo, uint8_t retryNo, Time rtsTs, Time delay, UanAddress addr); |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
265 |
virtual ~UanHeaderRcCts (); |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
266 |
|
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
267 |
static TypeId GetTypeId (void); |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
268 |
|
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
269 |
/** |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
270 |
* \param frameNo Frame # of RTS being cleared |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
271 |
*/ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
272 |
void SetFrameNo (uint8_t frameNo); |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
273 |
/** |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
274 |
* \param timeStamp Time of RTS reception |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
275 |
*/ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
276 |
void SetRtsTimeStamp (Time timeStamp); |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
277 |
/** |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
278 |
* \param delay Time duration, from CTS TX, before first data frame arrival |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
279 |
*/ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
280 |
void SetDelayToTx (Time delay); |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
281 |
/** |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
282 |
* \param no Retry number of RTS frame being cleared |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
283 |
*/ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
284 |
void SetRetryNo (uint8_t no); |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
285 |
/** |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
286 |
* \param addr Destination for scheduling info |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
287 |
*/ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
288 |
void SetAddress (UanAddress addr); |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
289 |
|
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
290 |
/** |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
291 |
* \returns Frame # of RTS being cleared |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
292 |
*/ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
293 |
uint8_t GetFrameNo (void) const; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
294 |
/** |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
295 |
* \returns RX time of RTS being cleared |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
296 |
*/ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
297 |
Time GetRtsTimeStamp (void) const; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
298 |
/** |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
299 |
* \returns Delay from TX time of CTS packet until arrival of first data frame |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
300 |
*/ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
301 |
Time GetDelayToTx (void) const; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
302 |
/** |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
303 |
* \returns Retry # of RTS packet being cleared |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
304 |
*/ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
305 |
uint8_t GetRetryNo (void) const; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
306 |
/** |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
307 |
* \returns Destination for scheduling info |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
308 |
*/ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
309 |
UanAddress GetAddress (void) const; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
310 |
|
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
311 |
// Inherrited methods |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
312 |
virtual uint32_t GetSerializedSize (void) const; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
313 |
virtual void Serialize (Buffer::Iterator start) const; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
314 |
virtual uint32_t Deserialize (Buffer::Iterator start); |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
315 |
virtual void Print (std::ostream &os) const; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
316 |
virtual TypeId GetInstanceTypeId (void) const; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
317 |
|
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
318 |
private: |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
319 |
uint8_t m_frameNo; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
320 |
Time m_timeStampRts; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
321 |
uint8_t m_retryNo; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
322 |
Time m_delay; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
323 |
UanAddress m_address; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
324 |
}; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
325 |
|
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
326 |
/** |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
327 |
* \class UanHeaderRcAck |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
328 |
* \brief Header used for ACK packets by protocol ns3::UanMacRc |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
329 |
*/ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
330 |
class UanHeaderRcAck : public Header |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
331 |
{ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
332 |
public: |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
333 |
UanHeaderRcAck (); |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
334 |
virtual ~UanHeaderRcAck (); |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
335 |
|
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
336 |
static TypeId GetTypeId (void); |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
337 |
|
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
338 |
/** |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
339 |
* \param frameNo Frame # of reservation being acknowledged |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
340 |
*/ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
341 |
void SetFrameNo (uint8_t frameNo); |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
342 |
/** |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
343 |
* \param frame Data frame # being nacked |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
344 |
*/ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
345 |
void AddNackedFrame (uint8_t frame); |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
346 |
|
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
347 |
/** |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
348 |
* \returns Set of nacked frames |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
349 |
*/ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
350 |
const std::set<uint8_t> &GetNackedFrames (void) const; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
351 |
/** |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
352 |
* \returns Reservation frame # being acknowledged. |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
353 |
*/ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
354 |
uint8_t GetFrameNo (void) const; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
355 |
/** |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
356 |
* \returns Number of data frames being NACKED |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
357 |
*/ |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
358 |
uint8_t GetNoNacks (void) const; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
359 |
|
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
360 |
// Inherrited methods |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
361 |
virtual uint32_t GetSerializedSize (void) const; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
362 |
virtual void Serialize (Buffer::Iterator start) const; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
363 |
virtual uint32_t Deserialize (Buffer::Iterator start); |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
364 |
virtual void Print (std::ostream &os) const; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
365 |
virtual TypeId GetInstanceTypeId (void) const; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
366 |
|
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
367 |
private: |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
368 |
uint8_t m_frameNo; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
369 |
std::set<uint8_t> m_nackedFrames; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
370 |
|
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
371 |
}; |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
372 |
|
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
373 |
} |
b401db8531f5
Bug 970 - move UAN over to new directory structure
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff
changeset
|
374 |
|
7353
09fccf6195ea
bug 1203: Inconsistently named ifndef/define macros in ns-3 headers
Vedran Miletic <rivanvx@gmail.com>
parents:
6852
diff
changeset
|
375 |
#endif /* UAN_HEADER_RC_H */ |