|
|
| 86 |
/** |
86 |
/** |
| 87 |
* \return true if the queue is empty; false otherwise |
87 |
* \return true if the queue is empty; false otherwise |
| 88 |
*/ |
88 |
*/ |
| 89 |
bool IsEmpty (void); |
89 |
bool IsEmpty (void) const; |
| 90 |
/** |
90 |
/** |
| 91 |
* Place a packet into the rear of the Queue |
91 |
* Place a packet into the rear of the Queue |
| 92 |
* \return True if the operation was successful; false otherwise |
92 |
* \return True if the operation was successful; false otherwise |
|
|
| 101 |
* Get a copy of the item at the front of the queue without removing it |
101 |
* Get a copy of the item at the front of the queue without removing it |
| 102 |
* \return True if the operation was successful; false otherwise |
102 |
* \return True if the operation was successful; false otherwise |
| 103 |
*/ |
103 |
*/ |
| 104 |
bool Peek (Packet &p); |
104 |
bool Peek (Packet &p) const; |
| 105 |
|
105 |
|
| 106 |
/** |
106 |
/** |
| 107 |
* XXX Doesn't do anything right now, think its supposed to flush the queue |
107 |
* XXX Doesn't do anything right now, think its supposed to flush the queue |
|
|
| 110 |
/** |
110 |
/** |
| 111 |
* \return The number of packets currently stored in the Queue |
111 |
* \return The number of packets currently stored in the Queue |
| 112 |
*/ |
112 |
*/ |
| 113 |
uint32_t GetNPackets (void); |
113 |
uint32_t GetNPackets (void) const; |
| 114 |
/** |
114 |
/** |
| 115 |
* \return The number of bytes currently occupied by the packets in the Queue |
115 |
* \return The number of bytes currently occupied by the packets in the Queue |
| 116 |
*/ |
116 |
*/ |
| 117 |
uint32_t GetNBytes (void); |
117 |
uint32_t GetNBytes (void) const; |
| 118 |
|
118 |
|
| 119 |
/** |
119 |
/** |
| 120 |
* \return The total number of bytes recieved by this Queue since the |
120 |
* \return The total number of bytes recieved by this Queue since the |
|
|
| 122 |
* whichever happened more recently |
122 |
* whichever happened more recently |
| 123 |
* |
123 |
* |
| 124 |
*/ |
124 |
*/ |
| 125 |
uint32_t GetTotalReceivedBytes (void); |
125 |
uint32_t GetTotalReceivedBytes (void) const; |
| 126 |
/** |
126 |
/** |
| 127 |
* \return The total number of packets recieved by this Queue since the |
127 |
* \return The total number of packets recieved by this Queue since the |
| 128 |
* simulation began, or since ResetStatistics was called, according to |
128 |
* simulation began, or since ResetStatistics was called, according to |
| 129 |
* whichever happened more recently |
129 |
* whichever happened more recently |
| 130 |
*/ |
130 |
*/ |
| 131 |
uint32_t GetTotalReceivedPackets (void); |
131 |
uint32_t GetTotalReceivedPackets (void) const; |
| 132 |
/** |
132 |
/** |
| 133 |
* \return The total number of bytes dropped by this Queue since the |
133 |
* \return The total number of bytes dropped by this Queue since the |
| 134 |
* simulation began, or since ResetStatistics was called, according to |
134 |
* simulation began, or since ResetStatistics was called, according to |
| 135 |
* whichever happened more recently |
135 |
* whichever happened more recently |
| 136 |
*/ |
136 |
*/ |
| 137 |
uint32_t GetTotalDroppedBytes (void); |
137 |
uint32_t GetTotalDroppedBytes (void) const; |
| 138 |
/** |
138 |
/** |
| 139 |
* \return The total number of bytes dropped by this Queue since the |
139 |
* \return The total number of bytes dropped by this Queue since the |
| 140 |
* simulation began, or since ResetStatistics was called, according to |
140 |
* simulation began, or since ResetStatistics was called, according to |
| 141 |
* whichever happened more recently |
141 |
* whichever happened more recently |
| 142 |
*/ |
142 |
*/ |
| 143 |
uint32_t GetTotalDroppedPackets (void); |
143 |
uint32_t GetTotalDroppedPackets (void) const; |
| 144 |
/** |
144 |
/** |
| 145 |
* Resets the counts for dropped packets, dropped bytes, recieved packets, and |
145 |
* Resets the counts for dropped packets, dropped bytes, recieved packets, and |
| 146 |
* recieved bytes. |
146 |
* recieved bytes. |
|
|
| 175 |
|
175 |
|
| 176 |
virtual bool DoEnqueue (const Packet& p) = 0; |
176 |
virtual bool DoEnqueue (const Packet& p) = 0; |
| 177 |
virtual bool DoDequeue (Packet &p) = 0; |
177 |
virtual bool DoDequeue (Packet &p) = 0; |
| 178 |
virtual bool DoPeek (Packet &p) = 0; |
178 |
virtual bool DoPeek (Packet &p) const = 0; |
| 179 |
|
179 |
|
| 180 |
protected: |
180 |
protected: |
| 181 |
Ptr<TraceResolver> GetTraceResolver (void) const; |
181 |
Ptr<TraceResolver> GetTraceResolver (void) const; |