equal
deleted
inserted
replaced
375 void |
375 void |
376 MacLow::SetSifs (Time sifs) |
376 MacLow::SetSifs (Time sifs) |
377 { |
377 { |
378 m_sifs = sifs; |
378 m_sifs = sifs; |
379 } |
379 } |
|
380 void |
|
381 MacLow::SetSlotTime (Time slotTime) |
|
382 { |
|
383 m_slotTime = slotTime; |
|
384 } |
|
385 void |
|
386 MacLow::SetPifs (Time pifs) |
|
387 { |
|
388 m_pifs = pifs; |
|
389 } |
380 Mac48Address |
390 Mac48Address |
381 MacLow::GetAddress (void) const |
391 MacLow::GetAddress (void) const |
382 { |
392 { |
383 return m_self; |
393 return m_self; |
384 } |
394 } |
394 } |
404 } |
395 Time |
405 Time |
396 MacLow::GetSifs (void) const |
406 MacLow::GetSifs (void) const |
397 { |
407 { |
398 return m_sifs; |
408 return m_sifs; |
|
409 } |
|
410 Time |
|
411 MacLow::GetSlotTime (void) const |
|
412 { |
|
413 return m_slotTime; |
|
414 } |
|
415 Time |
|
416 MacLow::GetPifs (void) const |
|
417 { |
|
418 return m_pifs; |
399 } |
419 } |
400 |
420 |
401 void |
421 void |
402 MacLow::SetRxCallback (Callback<void,Ptr<Packet>,const WifiMacHeader *> callback) |
422 MacLow::SetRxCallback (Callback<void,Ptr<Packet>,const WifiMacHeader *> callback) |
403 { |
423 { |
649 { |
669 { |
650 WifiMacHeader cts; |
670 WifiMacHeader cts; |
651 cts.SetType (WIFI_MAC_CTL_CTS); |
671 cts.SetType (WIFI_MAC_CTL_CTS); |
652 return cts.GetSize () + 4; |
672 return cts.GetSize () + 4; |
653 } |
673 } |
654 Time |
|
655 MacLow::GetSlotTime (void) const |
|
656 { |
|
657 return m_mac->GetSlot (); |
|
658 } |
|
659 Time |
|
660 MacLow::GetPifs (void) const |
|
661 { |
|
662 return m_mac->GetPifs (); |
|
663 } |
|
664 uint32_t |
674 uint32_t |
665 MacLow::GetSize (Ptr<const Packet> packet, const WifiMacHeader *hdr) const |
675 MacLow::GetSize (Ptr<const Packet> packet, const WifiMacHeader *hdr) const |
666 { |
676 { |
667 WifiMacTrailer fcs; |
677 WifiMacTrailer fcs; |
668 return packet->GetSize () + hdr->GetSize () + fcs.GetSerializedSize (); |
678 return packet->GetSize () + hdr->GetSize () + fcs.GetSerializedSize (); |