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

(-)a/src/wifi/model/interference-helper.cc (-94 / +80 lines)
 Lines 88-110    Link Here 
88
 *       short period of time.
88
 *       short period of time.
89
 ****************************************************************/
89
 ****************************************************************/
90
90
91
InterferenceHelper::NiChange::NiChange (Time time, double delta, Ptr<InterferenceHelper::Event> event)
91
InterferenceHelper::NiChange::NiChange (double power, Ptr<InterferenceHelper::Event> event)
92
  : m_time (time),
92
  : m_power (power),
93
    m_delta (delta),
94
    m_event (event)
93
    m_event (event)
95
{
94
{
96
}
95
}
97
96
98
Time
97
double
99
InterferenceHelper::NiChange::GetTime (void) const
98
InterferenceHelper::NiChange::GetPower (void) const
100
{
99
{
101
  return m_time;
100
  return m_power;
102
}
101
}
103
102
104
double
103
void
105
InterferenceHelper::NiChange::GetDelta (void) const
104
InterferenceHelper::NiChange::AddPower (double power)
106
{
105
{
107
  return m_delta;
106
  m_power += power;
108
}
107
}
109
108
110
Ptr<InterferenceHelper::Event>
109
Ptr<InterferenceHelper::Event>
 Lines 113-124    Link Here 
113
  return m_event;
112
  return m_event;
114
}
113
}
115
114
116
bool
117
InterferenceHelper::NiChange::operator < (const InterferenceHelper::NiChange& o) const
118
{
119
  return (m_time < o.m_time);
120
}
121
122
115
123
/****************************************************************
116
/****************************************************************
124
 *       The actual InterferenceHelper
117
 *       The actual InterferenceHelper
 Lines 141-148    Link Here 
141
Ptr<InterferenceHelper::Event>
134
Ptr<InterferenceHelper::Event>
142
InterferenceHelper::Add (Ptr<const Packet> packet, WifiTxVector txVector, Time duration, double rxPowerW)
135
InterferenceHelper::Add (Ptr<const Packet> packet, WifiTxVector txVector, Time duration, double rxPowerW)
143
{
136
{
144
  Ptr<InterferenceHelper::Event> event;
137
  Ptr<InterferenceHelper::Event> event = Create<InterferenceHelper::Event> (packet, txVector, duration, rxPowerW);
145
  event = Create<InterferenceHelper::Event> (packet, txVector, duration, rxPowerW);
146
  AppendEvent (event);
138
  AppendEvent (event);
147
  return event;
139
  return event;
148
}
140
}
 Lines 191-211    Link Here 
191
InterferenceHelper::GetEnergyDuration (double energyW) const
183
InterferenceHelper::GetEnergyDuration (double energyW) const
192
{
184
{
193
  Time now = Simulator::Now ();
185
  Time now = Simulator::Now ();
194
  double noiseInterferenceW = 0;
186
  auto i = GetPreviousPosition (now);
195
  Time end = now;
187
  Time end = i->first;
196
  noiseInterferenceW = m_firstPower;
188
  while (i != m_niChanges.end ())
197
  for (NiChanges::const_iterator i = m_niChanges.begin (); i != m_niChanges.end (); i++)
198
    {
189
    {
199
      noiseInterferenceW += i->GetDelta ();
190
      double noiseInterferenceW = i->second.GetPower ();
200
      end = i->GetTime ();
191
      end = i->first;
201
      if (end < now)
202
        {
203
          continue;
204
        }
205
      if (noiseInterferenceW < energyW)
192
      if (noiseInterferenceW < energyW)
206
        {
193
        {
207
          break;
194
          break;
208
        }
195
        }
196
      ++i;
209
    }
197
    }
210
  return end > now ? end - now : MicroSeconds (0);
198
  return end > now ? end - now : MicroSeconds (0);
211
}
199
}
 Lines 213-230    Link Here 
213
void
201
void
214
InterferenceHelper::AppendEvent (Ptr<InterferenceHelper::Event> event)
202
InterferenceHelper::AppendEvent (Ptr<InterferenceHelper::Event> event)
215
{
203
{
216
  Time now = Simulator::Now ();
204
  NS_LOG_FUNCTION (this);
205
  double previousPowerStart = 0;
206
  double previousPowerEnd = 0;
207
  if (m_niChanges.size() > 0)
208
    {
209
      previousPowerStart = GetPreviousPosition (event->GetStartTime ())->second.GetPower ();
210
      previousPowerEnd = GetPreviousPosition (event->GetEndTime ())->second.GetPower ();
211
    }
217
  if (!m_rxing)
212
  if (!m_rxing)
218
    {
213
    {
219
      NiChanges::const_iterator nowIterator = GetPosition (now);
214
      m_firstPower = previousPowerStart;
220
      for (NiChanges::const_iterator i = m_niChanges.begin (); i != nowIterator; i++)
215
      m_niChanges.erase (m_niChanges.begin (), GetNextPosition (event->GetStartTime ()));
221
        {
222
          m_firstPower += i->GetDelta ();
223
        }
224
      m_niChanges.erase (m_niChanges.begin (), nowIterator);
225
    }
216
    }
226
  AddNiChangeEvent (NiChange (event->GetStartTime (), event->GetRxPowerW (), event));
217
  auto first = AddNiChangeEvent (event->GetStartTime (), NiChange (previousPowerStart, event));
227
  AddNiChangeEvent (NiChange (event->GetEndTime (), -event->GetRxPowerW (), event));
218
  auto last = AddNiChangeEvent (event->GetEndTime (), NiChange (previousPowerEnd, event));
219
  for (auto i = first; i != last; ++i)
220
    {
221
      i->second.AddPower (event->GetRxPowerW ());
222
    }
228
}
223
}
229
224
230
double
225
double
 Lines 246-286    Link Here 
246
InterferenceHelper::CalculateNoiseInterferenceW (Ptr<InterferenceHelper::Event> event, NiChanges *ni) const
241
InterferenceHelper::CalculateNoiseInterferenceW (Ptr<InterferenceHelper::Event> event, NiChanges *ni) const
247
{
242
{
248
  double noiseInterference = m_firstPower;
243
  double noiseInterference = m_firstPower;
249
  NiChanges::const_iterator eventIterator = m_niChanges.begin ();
244
  auto it = m_niChanges.find (event->GetStartTime ());
250
  while (eventIterator != m_niChanges.end ())
245
  for (; it != m_niChanges.end () && it->second.GetEvent () != event; ++it)
251
    {
246
    {
252
      // Iterate the NI change list from the beginning to the end
247
      noiseInterference = it->second.GetPower ();
253
      // until find the position of the event in the NI change list
254
      // The reason of using the event that causes the NI change to identify
255
      // different NI changes is because in some special cases
256
      // different NI changes happen at the same time with the same delta
257
      // value. Therefore, it may be impossible to identify a NI change that belongs
258
      // to which event based on just the NI time and NI delta value
259
      if (eventIterator->GetEvent () != event)
260
        {
261
          // The NI changes which happen before the event should be considered
262
          // as the interference. This considers the case that the receiving event
263
          // arrives while another receiving event is going on. The SINR of
264
          // the newly arrived event is calculated for checking the possibility of frame capture
265
          noiseInterference += eventIterator->GetDelta ();
266
        }
267
      else
268
        {
269
          break;
270
        }
271
      ++eventIterator;
272
    }
248
    }
273
249
  ni->emplace (event->GetStartTime (), NiChange (0, event));
274
  for (NiChanges::const_iterator i = eventIterator + 1; i != m_niChanges.end (); ++i)
250
  while (++it != m_niChanges.end () && event != it->second.GetEvent ())
275
    {
251
    {
276
      if (event->GetEndTime () == i->GetTime () && event == i->GetEvent ())
252
      ni->insert (*it);
277
        {
278
          break;
279
        }
280
      ni->push_back (*i);
281
    }
253
    }
282
  ni->insert (ni->begin (), NiChange (event->GetStartTime (), noiseInterference, event));
254
  ni->emplace(event->GetEndTime (), NiChange (0, event));
283
  ni->push_back (NiChange (event->GetEndTime (), 0, event));
284
  return noiseInterference;
255
  return noiseInterference;
285
}
256
}
286
257
 Lines 312-331    Link Here 
312
  NS_LOG_FUNCTION (this);
283
  NS_LOG_FUNCTION (this);
313
  const WifiTxVector txVector = event->GetTxVector ();
284
  const WifiTxVector txVector = event->GetTxVector ();
314
  double psr = 1.0; /* Packet Success Rate */
285
  double psr = 1.0; /* Packet Success Rate */
315
  NiChanges::const_iterator j = ni->begin ();
286
  auto j = ni->begin ();
316
  Time previous = (*j).GetTime ();
287
  Time previous = j->first;
317
  WifiMode payloadMode = event->GetPayloadMode ();
288
  WifiMode payloadMode = event->GetPayloadMode ();
318
  WifiPreamble preamble = txVector.GetPreambleType ();
289
  WifiPreamble preamble = txVector.GetPreambleType ();
319
  Time plcpHeaderStart = (*j).GetTime () + WifiPhy::GetPlcpPreambleDuration (txVector); //packet start time + preamble
290
  Time plcpHeaderStart = j->first + WifiPhy::GetPlcpPreambleDuration (txVector); //packet start time + preamble
320
  Time plcpHsigHeaderStart = plcpHeaderStart + WifiPhy::GetPlcpHeaderDuration (txVector); //packet start time + preamble + L-SIG
291
  Time plcpHsigHeaderStart = plcpHeaderStart + WifiPhy::GetPlcpHeaderDuration (txVector); //packet start time + preamble + L-SIG
321
  Time plcpTrainingSymbolsStart = plcpHsigHeaderStart + WifiPhy::GetPlcpHtSigHeaderDuration (preamble) + WifiPhy::GetPlcpSigA1Duration (preamble) + WifiPhy::GetPlcpSigA2Duration (preamble); //packet start time + preamble + L-SIG + HT-SIG or SIG-A
292
  Time plcpTrainingSymbolsStart = plcpHsigHeaderStart + WifiPhy::GetPlcpHtSigHeaderDuration (preamble) + WifiPhy::GetPlcpSigA1Duration (preamble) + WifiPhy::GetPlcpSigA2Duration (preamble); //packet start time + preamble + L-SIG + HT-SIG or SIG-A
322
  Time plcpPayloadStart = plcpTrainingSymbolsStart + WifiPhy::GetPlcpTrainingSymbolDuration (txVector) + WifiPhy::GetPlcpSigBDuration (preamble); //packet start time + preamble + L-SIG + HT-SIG or SIG-A + Training + SIG-B
293
  Time plcpPayloadStart = plcpTrainingSymbolsStart + WifiPhy::GetPlcpTrainingSymbolDuration (txVector) + WifiPhy::GetPlcpSigBDuration (preamble); //packet start time + preamble + L-SIG + HT-SIG or SIG-A + Training + SIG-B
323
  double noiseInterferenceW = (*j).GetDelta ();
294
  double noiseInterferenceW = m_firstPower;
324
  double powerW = event->GetRxPowerW ();
295
  double powerW = event->GetRxPowerW ();
325
  j++;
296
  while (++j != ni->end ())
326
  while (ni->end () != j)
327
    {
297
    {
328
      Time current = (*j).GetTime ();
298
      Time current = j->first;
329
      NS_LOG_DEBUG ("previous= " << previous << ", current=" << current);
299
      NS_LOG_DEBUG ("previous= " << previous << ", current=" << current);
330
      NS_ASSERT (current >= previous);
300
      NS_ASSERT (current >= previous);
331
      //Case 1: Both previous and current point to the payload
301
      //Case 1: Both previous and current point to the payload
 Lines 348-356    Link Here 
348
                                            payloadMode, txVector);
318
                                            payloadMode, txVector);
349
          NS_LOG_DEBUG ("previous is before payload and current is in the payload: mode=" << payloadMode << ", psr=" << psr);
319
          NS_LOG_DEBUG ("previous is before payload and current is in the payload: mode=" << payloadMode << ", psr=" << psr);
350
        }
320
        }
351
      noiseInterferenceW += (*j).GetDelta ();
321
      noiseInterferenceW = j->second.GetPower () - powerW;
352
      previous = (*j).GetTime ();
322
      previous = j->first;
353
      j++;
354
    }
323
    }
355
  double per = 1 - psr;
324
  double per = 1 - psr;
356
  return per;
325
  return per;
 Lines 362-369    Link Here 
362
  NS_LOG_FUNCTION (this);
331
  NS_LOG_FUNCTION (this);
363
  const WifiTxVector txVector = event->GetTxVector ();
332
  const WifiTxVector txVector = event->GetTxVector ();
364
  double psr = 1.0; /* Packet Success Rate */
333
  double psr = 1.0; /* Packet Success Rate */
365
  NiChanges::const_iterator j = ni->begin ();
334
  auto j = ni->begin ();
366
  Time previous = (*j).GetTime ();
335
  Time previous = j->first;
367
  WifiPreamble preamble = txVector.GetPreambleType ();
336
  WifiPreamble preamble = txVector.GetPreambleType ();
368
  WifiMode mcsHeaderMode;
337
  WifiMode mcsHeaderMode;
369
  if (preamble == WIFI_PREAMBLE_HT_MF || preamble == WIFI_PREAMBLE_HT_GF)
338
  if (preamble == WIFI_PREAMBLE_HT_MF || preamble == WIFI_PREAMBLE_HT_GF)
 Lines 382-397    Link Here 
382
      mcsHeaderMode = WifiPhy::GetHePlcpHeaderMode ();
351
      mcsHeaderMode = WifiPhy::GetHePlcpHeaderMode ();
383
    }
352
    }
384
  WifiMode headerMode = WifiPhy::GetPlcpHeaderMode (txVector);
353
  WifiMode headerMode = WifiPhy::GetPlcpHeaderMode (txVector);
385
  Time plcpHeaderStart = (*j).GetTime () + WifiPhy::GetPlcpPreambleDuration (txVector); //packet start time + preamble
354
  Time plcpHeaderStart = j->first + WifiPhy::GetPlcpPreambleDuration (txVector); //packet start time + preamble
386
  Time plcpHsigHeaderStart = plcpHeaderStart + WifiPhy::GetPlcpHeaderDuration (txVector); //packet start time + preamble + L-SIG
355
  Time plcpHsigHeaderStart = plcpHeaderStart + WifiPhy::GetPlcpHeaderDuration (txVector); //packet start time + preamble + L-SIG
387
  Time plcpTrainingSymbolsStart = plcpHsigHeaderStart + WifiPhy::GetPlcpHtSigHeaderDuration (preamble) + WifiPhy::GetPlcpSigA1Duration (preamble) + WifiPhy::GetPlcpSigA2Duration (preamble); //packet start time + preamble + L-SIG + HT-SIG or SIG-A
356
  Time plcpTrainingSymbolsStart = plcpHsigHeaderStart + WifiPhy::GetPlcpHtSigHeaderDuration (preamble) + WifiPhy::GetPlcpSigA1Duration (preamble) + WifiPhy::GetPlcpSigA2Duration (preamble); //packet start time + preamble + L-SIG + HT-SIG or SIG-A
388
  Time plcpPayloadStart = plcpTrainingSymbolsStart + WifiPhy::GetPlcpTrainingSymbolDuration (txVector) + WifiPhy::GetPlcpSigBDuration (preamble); //packet start time + preamble + L-SIG + HT-SIG or SIG-A + Training + SIG-B
357
  Time plcpPayloadStart = plcpTrainingSymbolsStart + WifiPhy::GetPlcpTrainingSymbolDuration (txVector) + WifiPhy::GetPlcpSigBDuration (preamble); //packet start time + preamble + L-SIG + HT-SIG or SIG-A + Training + SIG-B
389
  double noiseInterferenceW = (*j).GetDelta ();
358
  double noiseInterferenceW = m_firstPower;
390
  double powerW = event->GetRxPowerW ();
359
  double powerW = event->GetRxPowerW ();
391
  j++;
360
  while (++j != ni->end ())
392
  while (ni->end () != j)
393
    {
361
    {
394
      Time current = (*j).GetTime ();
362
      Time current = j->first;
395
      NS_LOG_DEBUG ("previous= " << previous << ", current=" << current);
363
      NS_LOG_DEBUG ("previous= " << previous << ", current=" << current);
396
      NS_ASSERT (current >= previous);
364
      NS_ASSERT (current >= previous);
397
      //Case 1: previous and current after playload start: nothing to do
365
      //Case 1: previous and current after playload start: nothing to do
 Lines 764-772    Link Here 
764
            }
732
            }
765
        }
733
        }
766
734
767
      noiseInterferenceW += (*j).GetDelta ();
735
      noiseInterferenceW = j->second.GetPower () - powerW;
768
      previous = (*j).GetTime ();
736
      previous = j->first;
769
      j++;
770
    }
737
    }
771
738
772
  double per = 1 - psr;
739
  double per = 1 - psr;
 Lines 774-780    Link Here 
774
}
741
}
775
742
776
struct InterferenceHelper::SnrPer
743
struct InterferenceHelper::SnrPer
777
InterferenceHelper::CalculatePlcpPayloadSnrPer (Ptr<InterferenceHelper::Event> event)
744
InterferenceHelper::CalculatePlcpPayloadSnrPer (Ptr<InterferenceHelper::Event> event) const
778
{
745
{
779
  NiChanges ni;
746
  NiChanges ni;
780
  double noiseInterferenceW = CalculateNoiseInterferenceW (event, &ni);
747
  double noiseInterferenceW = CalculateNoiseInterferenceW (event, &ni);
 Lines 794-800    Link Here 
794
}
761
}
795
762
796
struct InterferenceHelper::SnrPer
763
struct InterferenceHelper::SnrPer
797
InterferenceHelper::CalculatePlcpHeaderSnrPer (Ptr<InterferenceHelper::Event> event)
764
InterferenceHelper::CalculatePlcpHeaderSnrPer (Ptr<InterferenceHelper::Event> event) const
798
{
765
{
799
  NiChanges ni;
766
  NiChanges ni;
800
  double noiseInterferenceW = CalculateNoiseInterferenceW (event, &ni);
767
  double noiseInterferenceW = CalculateNoiseInterferenceW (event, &ni);
 Lines 822-836    Link Here 
822
}
789
}
823
790
824
InterferenceHelper::NiChanges::const_iterator
791
InterferenceHelper::NiChanges::const_iterator
825
InterferenceHelper::GetPosition (Time moment)
792
InterferenceHelper::GetNextPosition (Time moment) const
826
{
793
{
827
  return std::upper_bound (m_niChanges.begin (), m_niChanges.end (), NiChange (moment, 0, NULL));
794
  return m_niChanges.upper_bound (moment);
828
}
795
}
829
796
830
void
797
InterferenceHelper::NiChanges::const_iterator
831
InterferenceHelper::AddNiChangeEvent (NiChange change)
798
InterferenceHelper::GetPreviousPosition (Time moment) const
832
{
799
{
833
  m_niChanges.insert (GetPosition (change.GetTime ()), change);
800
  auto it = GetNextPosition (moment);
801
  if (it == m_niChanges.begin ())
802
    {
803
      it = m_niChanges.end();
804
    }
805
  else
806
    {
807
      --it;
808
    }
809
  return it;
810
}
811
812
InterferenceHelper::NiChanges::iterator
813
InterferenceHelper::AddNiChangeEvent (Time moment, NiChange change)
814
{
815
  return m_niChanges.insert (GetNextPosition (moment), std::make_pair (moment, change));
834
}
816
}
835
817
836
void
818
void
 Lines 845-850    Link Here 
845
{
827
{
846
  NS_LOG_FUNCTION (this);
828
  NS_LOG_FUNCTION (this);
847
  m_rxing = false;
829
  m_rxing = false;
830
  //Update m_firstPower for frame capture
831
  auto it = m_niChanges.find (Simulator::Now ());
832
  it--;
833
  m_firstPower = it->second.GetPower ();
848
}
834
}
849
835
850
} //namespace ns3
836
} //namespace ns3
(-)a/src/wifi/model/interference-helper.h (-27 / +37 lines)
 Lines 25-30    Link Here 
25
#include "ns3/packet.h"
25
#include "ns3/packet.h"
26
#include "wifi-tx-vector.h"
26
#include "wifi-tx-vector.h"
27
#include "error-rate-model.h"
27
#include "error-rate-model.h"
28
#include <map>
28
29
29
namespace ns3 {
30
namespace ns3 {
30
31
 Lines 177-183    Link Here 
177
   *
178
   *
178
   * \return struct of SNR and PER
179
   * \return struct of SNR and PER
179
   */
180
   */
180
  struct InterferenceHelper::SnrPer CalculatePlcpPayloadSnrPer (Ptr<InterferenceHelper::Event> event);
181
  struct InterferenceHelper::SnrPer CalculatePlcpPayloadSnrPer (Ptr<InterferenceHelper::Event> event) const;
181
  /**
182
  /**
182
   * Calculate the SNIR at the start of the plcp header and accumulate
183
   * Calculate the SNIR at the start of the plcp header and accumulate
183
   * all SNIR changes in the snir vector.
184
   * all SNIR changes in the snir vector.
 Lines 186-192    Link Here 
186
   *
187
   *
187
   * \return struct of SNR and PER
188
   * \return struct of SNR and PER
188
   */
189
   */
189
  struct InterferenceHelper::SnrPer CalculatePlcpHeaderSnrPer (Ptr<InterferenceHelper::Event> event);
190
  struct InterferenceHelper::SnrPer CalculatePlcpHeaderSnrPer (Ptr<InterferenceHelper::Event> event) const ;
190
191
191
  /**
192
  /**
192
   * Notify that RX has started.
193
   * Notify that RX has started.
 Lines 212-258    Link Here 
212
    /**
213
    /**
213
     * Create a NiChange at the given time and the amount of NI change.
214
     * Create a NiChange at the given time and the amount of NI change.
214
     *
215
     *
215
     * \param time time of the event
216
     * \param power the power
216
     * \param delta the power
217
     * \param event causes this NI change
217
     * \param event causes this NI change
218
     */
218
     */
219
    NiChange (Time time, double delta, Ptr<InterferenceHelper::Event> event);
219
    NiChange (double power, Ptr<InterferenceHelper::Event> event);
220
    /**
221
     * Return the event time.
222
     *
223
     * \return the event time.
224
     */
225
    Time GetTime (void) const;
226
    /**
220
    /**
227
     * Return the power
221
     * Return the power
228
     *
222
     *
229
     * \return the power
223
     * \return the power
230
     */
224
     */
231
    double GetDelta (void) const;
225
    double GetPower (void) const;
226
    /**
227
     * Add a given amount of power.
228
     *
229
     * \param power the power to be added to the existing value
230
     */
231
    void AddPower (double power);
232
    /**
232
    /**
233
     * Return the event causes the corresponding NI change
233
     * Return the event causes the corresponding NI change
234
     *
234
     *
235
     * \return the event
235
     * \return the event
236
     */
236
     */
237
    Ptr<InterferenceHelper::Event> GetEvent (void) const;
237
    Ptr<InterferenceHelper::Event> GetEvent (void) const;
238
    /**
239
     * Compare the event time of two NiChange objects (a < o).
240
     *
241
     * \param o
242
     * \return true if a < o.time, false otherwise
243
     */
244
    bool operator < (const NiChange& o) const;
245
238
246
239
247
private:
240
private:
248
    Time m_time; ///< time
241
    double m_power; ///< power
249
    double m_delta; ///< delta
250
    Ptr<InterferenceHelper::Event> m_event; ///< event
242
    Ptr<InterferenceHelper::Event> m_event; ///< event
251
  };
243
  };
252
  /**
244
  /**
253
   * typedef for a vector of NiChanges
245
   * typedef for a multimap of NiChanges
254
   */
246
   */
255
  typedef std::vector <NiChange> NiChanges;
247
  typedef std::multimap<Time, NiChange> NiChanges;
256
248
257
  /**
249
  /**
258
   * Append the given Event.
250
   * Append the given Event.
 Lines 322-339    Link Here 
322
  bool m_rxing; ///< flag whether it is in receiving state
314
  bool m_rxing; ///< flag whether it is in receiving state
323
315
324
  /**
316
  /**
325
   * Returns a const iterator to the first nichange, which is later than moment
317
   * Returns an iterator to the first nichange that is later than moment
326
   *
318
   *
327
   * \param moment time to check from
319
   * \param moment time to check from
328
   * \returns an iterator to the list of NiChanges
320
   * \returns an iterator to the list of NiChanges
329
   */
321
   */
330
  NiChanges::const_iterator GetPosition (Time moment);
322
  NiChanges::const_iterator GetNextPosition (Time moment) const;
331
  /**
323
  /**
332
   * Add NiChange to the list at the appropriate position.
324
   * Returns an iterator to the first nichange that is later than moment
325
   *
326
   * \param moment time to check from
327
   * \returns an iterator to the list of NiChanges
328
   */
329
  //NiChanges::iterator GetNextPosition (Time moment);
330
  /**
331
   * Returns an iterator to the last nichange that is before than moment
332
   *
333
   * \param moment time to check from
334
   * \returns an iterator to the list of NiChanges
335
   */
336
  NiChanges::const_iterator GetPreviousPosition (Time moment) const;
337
338
  /**
339
   * Add NiChange to the list at the appropriate position and
340
   * return the iterator of the new event.
333
   *
341
   *
334
   * \param change
342
   * \param change
343
   * \param moment
344
   * \returns the iterator of the new event
335
   */
345
   */
336
  void AddNiChangeEvent (NiChange change);
346
  NiChanges::iterator AddNiChangeEvent (Time moment, NiChange change);
337
};
347
};
338
348
339
} //namespace ns3
349
} //namespace ns3

Return to bug 2791