src/devices/wifi/dcf-manager-test.cc
changeset 2105 e883a100109a
parent 2104 1ba670fdde06
child 2110 b49dc66e635b
--- a/src/devices/wifi/dcf-manager-test.cc	Wed Nov 14 12:36:08 2007 +0100
+++ b/src/devices/wifi/dcf-manager-test.cc	Wed Nov 14 12:43:01 2007 +0100
@@ -38,7 +38,7 @@
 
 
 private:
-  void StartTest (uint64_t slotTime, uint64_t ackTxDuration);
+  void StartTest (uint64_t slotTime, uint64_t sifs, uint64_t ackTxDuration);
   void AddDcfState (uint32_t cwMin, uint32_t cwMax, uint32_t aifsn);
   void EndTest (void);
   void ExpectAccessGranted (uint64_t time, uint32_t from);
@@ -160,12 +160,11 @@
 }
 
 void
-DcfManagerTest::StartTest (uint64_t slotTime, uint64_t ackTxDuration)
+DcfManagerTest::StartTest (uint64_t slotTime, uint64_t sifs, uint64_t ackTxDuration)
 {
   m_dcfManager = new DcfManager ();
-  m_parameters = new MacParameters ();
-  m_parameters->SetSlotTime (MicroSeconds (slotTime));
-  m_dcfManager->SetParameters (m_parameters);
+  m_dcfManager->SetSlotTime (MicroSeconds (slotTime));
+  m_dcfManager->SetSifs (MicroSeconds (sifs));
   m_dcfManager->SetAckTxDuration (MicroSeconds (ackTxDuration));
 }
 
@@ -259,7 +258,7 @@
 {
   m_result = true;
 
-  StartTest (1 /* slot time */, 10 /* ack tx dur */);
+  StartTest (1 /* slot time */, 3 /* sifs */, 10 /* ack tx dur */);
   AddDcfState (8 /* cwmin */, 64 /* cwmax */, 1 /* aifsn */);
   AddAccessRequest (10 /* at */ , 0 /* from */);
   ExpectAccessGranted (10 /* at */, 0 /* from */);