View | Details | Raw Unified | Return to bug 105
Collapse All | Expand All

(-)a/src/node/drop-tail-queue.cc (-1 / +1 lines)
 Lines 95-101   DropTailQueue::DoDequeue (Packet& p) Link Here 
95
}
95
}
96
96
97
bool
97
bool
98
DropTailQueue::DoPeek (Packet& p)
98
DropTailQueue::DoPeek (Packet& p) const
99
{
99
{
100
  NS_LOG_FUNCTION;
100
  NS_LOG_FUNCTION;
101
  NS_LOG_PARAM ("(" << &p << ")");
101
  NS_LOG_PARAM ("(" << &p << ")");
(-)a/src/node/drop-tail-queue.h (-1 / +1 lines)
 Lines 59-65   private: Link Here 
59
private:
59
private:
60
  virtual bool DoEnqueue (const Packet& p);
60
  virtual bool DoEnqueue (const Packet& p);
61
  virtual bool DoDequeue (Packet &p);
61
  virtual bool DoDequeue (Packet &p);
62
  virtual bool DoPeek (Packet &p);
62
  virtual bool DoPeek (Packet &p) const;
63
63
64
private:
64
private:
65
  std::queue<Packet> m_packets;
65
  std::queue<Packet> m_packets;
(-)a/src/node/queue.cc (-8 / +8 lines)
 Lines 186-192   Queue::DequeueAll (void) Link Here 
186
}
186
}
187
187
188
bool
188
bool
189
Queue::Peek (Packet &p)
189
Queue::Peek (Packet &p) const
190
{
190
{
191
  NS_LOG_FUNCTION;
191
  NS_LOG_FUNCTION;
192
  NS_LOG_PARAM ("(" << &p << ")");
192
  NS_LOG_PARAM ("(" << &p << ")");
 Lines 195-201   Queue::Peek (Packet &p) Link Here 
195
195
196
196
197
uint32_t 
197
uint32_t 
198
Queue::GetNPackets (void)
198
Queue::GetNPackets (void) const
199
{
199
{
200
  NS_LOG_FUNCTION;
200
  NS_LOG_FUNCTION;
201
  NS_LOG_LOGIC ("returns " << m_nPackets);
201
  NS_LOG_LOGIC ("returns " << m_nPackets);
 Lines 203-209   Queue::GetNPackets (void) Link Here 
203
}
203
}
204
204
205
uint32_t
205
uint32_t
206
Queue::GetNBytes (void)
206
Queue::GetNBytes (void) const
207
{
207
{
208
  NS_LOG_FUNCTION;
208
  NS_LOG_FUNCTION;
209
  NS_LOG_LOGIC (" returns " << m_nBytes);
209
  NS_LOG_LOGIC (" returns " << m_nBytes);
 Lines 211-217   Queue::GetNBytes (void) Link Here 
211
}
211
}
212
212
213
bool
213
bool
214
Queue::IsEmpty (void)
214
Queue::IsEmpty (void) const
215
{
215
{
216
  NS_LOG_FUNCTION;
216
  NS_LOG_FUNCTION;
217
  NS_LOG_LOGIC ("returns " << (m_nPackets == 0));
217
  NS_LOG_LOGIC ("returns " << (m_nPackets == 0));
 Lines 219-225   Queue::IsEmpty (void) Link Here 
219
}
219
}
220
220
221
uint32_t
221
uint32_t
222
Queue::GetTotalReceivedBytes (void)
222
Queue::GetTotalReceivedBytes (void) const
223
{
223
{
224
  NS_LOG_FUNCTION;
224
  NS_LOG_FUNCTION;
225
  NS_LOG_LOGIC("returns " << m_nTotalReceivedBytes);
225
  NS_LOG_LOGIC("returns " << m_nTotalReceivedBytes);
 Lines 227-233   Queue::GetTotalReceivedBytes (void) Link Here 
227
}
227
}
228
228
229
uint32_t
229
uint32_t
230
Queue::GetTotalReceivedPackets (void)
230
Queue::GetTotalReceivedPackets (void) const
231
{
231
{
232
  NS_LOG_FUNCTION;
232
  NS_LOG_FUNCTION;
233
  NS_LOG_LOGIC ("returns " << m_nTotalReceivedPackets);
233
  NS_LOG_LOGIC ("returns " << m_nTotalReceivedPackets);
 Lines 235-241   Queue::GetTotalReceivedPackets (void) Link Here 
235
}
235
}
236
236
237
uint32_t
237
uint32_t
238
Queue:: GetTotalDroppedBytes (void)
238
Queue:: GetTotalDroppedBytes (void) const
239
{
239
{
240
  NS_LOG_FUNCTION;
240
  NS_LOG_FUNCTION;
241
  NS_LOG_LOGIC ("returns " << m_nTotalDroppedBytes);
241
  NS_LOG_LOGIC ("returns " << m_nTotalDroppedBytes);
 Lines 243-249   Queue:: GetTotalDroppedBytes (void) Link Here 
243
}
243
}
244
244
245
uint32_t
245
uint32_t
246
Queue::GetTotalDroppedPackets (void)
246
Queue::GetTotalDroppedPackets (void) const
247
{
247
{
248
  NS_LOG_FUNCTION;
248
  NS_LOG_FUNCTION;
249
  NS_LOG_LOGIC("returns " << m_nTotalDroppedPackets);
249
  NS_LOG_LOGIC("returns " << m_nTotalDroppedPackets);
(-)a/src/node/queue.h (-9 / +9 lines)
 Lines 86-92   public: Link Here 
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
 Lines 101-107   public: Link Here 
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
 Lines 110-120   public: Link Here 
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
 Lines 122-146   public: Link Here 
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.
 Lines 175-181   private: Link Here 
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;

Return to bug 105