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

(-)a/ns3/ns-allinone-3.14.1/ns-3.14.1/src/wifi/model/sta-wifi-mac.cc (-3 / +10 lines)
 Lines 84-90   StaWifiMac::GetTypeId (void) Link Here 
84
                   MakeUintegerChecker<uint32_t> ())
84
                   MakeUintegerChecker<uint32_t> ())
85
    .AddAttribute ("ActiveProbing", "If true, we send probe requests. If false, we don't. NOTE: if more than one STA in your simulation is using active probing, you should enable it at a different simulation time for each STA, otherwise all the STAs will start sending probes at the same time resulting in collisions. See bug 1060 for more info.",
85
    .AddAttribute ("ActiveProbing", "If true, we send probe requests. If false, we don't. NOTE: if more than one STA in your simulation is using active probing, you should enable it at a different simulation time for each STA, otherwise all the STAs will start sending probes at the same time resulting in collisions. See bug 1060 for more info.",
86
                   BooleanValue (false),
86
                   BooleanValue (false),
87
                   MakeBooleanAccessor (&StaWifiMac::SetActiveProbing),
87
                   MakeBooleanAccessor (&StaWifiMac::SetActiveProbing, &StaWifiMac::GetActiveProbing),
88
                   MakeBooleanChecker ())
88
                   MakeBooleanChecker ())
89
    .AddTraceSource ("Assoc", "Associated with an access point.",
89
    .AddTraceSource ("Assoc", "Associated with an access point.",
90
                     MakeTraceSourceAccessor (&StaWifiMac::m_assocLogger))
90
                     MakeTraceSourceAccessor (&StaWifiMac::m_assocLogger))
 Lines 152-157   StaWifiMac::SetActiveProbing (bool enable) Link Here 
152
    {
152
    {
153
      m_probeRequestEvent.Cancel ();
153
      m_probeRequestEvent.Cancel ();
154
    }
154
    }
155
  m_activeProbing = enable;
156
}
157
  
158
bool StaWifiMac::GetActiveProbing (void) const{
159
  return m_activeProbing;
155
}
160
}
156
161
157
void
162
void
 Lines 232-239   StaWifiMac::TryToEnsureAssociated (void) Link Here 
232
       * We try to initiate a probe request now.
237
       * We try to initiate a probe request now.
233
       */
238
       */
234
      m_linkDown ();
239
      m_linkDown ();
235
      SetState (WAIT_PROBE_RESP);
240
      if(m_activeProbing){
236
      SendProbeRequest ();
241
        SetState (WAIT_PROBE_RESP);
242
        SendProbeRequest ();
243
      }
237
      break;
244
      break;
238
    case WAIT_ASSOC_RESP:
245
    case WAIT_ASSOC_RESP:
239
      /* we have sent an assoc request so we do not need to
246
      /* we have sent an assoc request so we do not need to
(-)a/ns3/ns-allinone-3.14.1/ns-3.14.1/src/wifi/model/sta-wifi-mac.h (+1 lines)
 Lines 124-129   private: Link Here 
124
  EventId m_beaconWatchdog;
124
  EventId m_beaconWatchdog;
125
  Time m_beaconWatchdogEnd;
125
  Time m_beaconWatchdogEnd;
126
  uint32_t m_maxMissedBeacons;
126
  uint32_t m_maxMissedBeacons;
127
  bool m_activeProbing;
127
128
128
  TracedCallback<Mac48Address> m_assocLogger;
129
  TracedCallback<Mac48Address> m_assocLogger;
129
  TracedCallback<Mac48Address> m_deAssocLogger;
130
  TracedCallback<Mac48Address> m_deAssocLogger;

Return to bug 1923