25 #include "ns3/simulator.h"
26 #include "ns3/drop-tail-queue.h"
28 #include "bs-uplink-scheduler.h"
29 #include "bs-net-device.h"
30 #include "wimax-phy.h"
31 #include "ns3/packet-burst.h"
32 #include "ss-record.h"
33 #include "bs-scheduler.h"
34 #include "wimax-mac-queue.h"
35 #include "burst-profile-manager.h"
36 #include "ss-manager.h"
37 #include "ns3/trace-source-accessor.h"
38 #include "ns3/pointer.h"
40 #include "ns3/uinteger.h"
41 #include "service-flow.h"
42 #include "service-flow-manager.h"
43 #include "connection-manager.h"
44 #include "bs-link-manager.h"
45 #include "bandwidth-manager.h"
46 #include "ns3/ipv4-address.h"
47 #include "ns3/llc-snap-header.h"
53 NS_OBJECT_ENSURE_REGISTERED (BaseStationNetDevice);
55 TypeId BaseStationNetDevice::GetTypeId (
void)
57 static TypeId tid = TypeId (
"ns3::BaseStationNetDevice")
59 .SetParent<WimaxNetDevice> ()
61 .AddConstructor<BaseStationNetDevice> ()
63 .AddAttribute (
"BSScheduler",
64 "Downlink Scheduler for BS",
66 MakePointerAccessor (&BaseStationNetDevice::m_scheduler),
67 MakePointerChecker<BSScheduler> ())
69 .AddAttribute (
"InitialRangInterval",
70 "Time between Initial Ranging regions assigned by the BS. Maximum is 2s",
76 .AddAttribute (
"DcdInterval",
77 "Time between transmission of DCD messages. Maximum value is 10s.",
82 .AddAttribute (
"UcdInterval",
83 "Time between transmission of UCD messages. Maximum value is 10s.",
88 .AddAttribute (
"IntervalT8",
89 "Wait for DSA/DSC Acknowledge timeout. Maximum 300ms.",
94 .AddAttribute (
"RangReqOppSize",
95 "The ranging opportunity size in symbols",
99 MakeUintegerChecker<uint8_t> (1, 256))
101 .AddAttribute (
"BwReqOppSize",
102 "The bandwidth request opportunity size in symbols",
105 MakeUintegerChecker<uint8_t> (1, 256))
107 .AddAttribute (
"MaxRangCorrectionRetries",
108 "Number of retries on contention Ranging Requests",
112 MakeUintegerChecker<uint8_t> (1, 16))
114 .AddAttribute (
"SSManager",
115 "The ss manager attached to this device.",
118 MakePointerChecker<SSManager> ())
120 .AddAttribute (
"Scheduler",
121 "The BS scheduler attached to this device.",
124 MakePointerChecker<BSScheduler> ())
126 .AddAttribute (
"LinkManager",
127 "The link manager attached to this device.",
130 MakePointerChecker<BSLinkManager> ())
132 .AddAttribute (
"UplinkScheduler",
133 "The uplink scheduler attached to this device.",
137 MakePointerChecker<UplinkScheduler> ())
139 .AddAttribute (
"BsIpcsPacketClassifier",
140 "The uplink IP packet classifier attached to this device.",
143 MakePointerChecker<IpcsClassifier> ())
145 .AddAttribute (
"ServiceFlowManager",
146 "The service flow manager attached to this device.",
148 MakePointerAccessor (&BaseStationNetDevice::GetServiceFlowManager,
149 &BaseStationNetDevice::SetServiceFlowManager),
150 MakePointerChecker<ServiceFlowManager> ())
152 .AddTraceSource (
"BSTx",
"A packet has been received from higher layers and is being processed in preparation for "
155 .AddTraceSource (
"BSTxDrop",
156 "A packet has been dropped in the MAC layer before being queued for transmission.",
159 .AddTraceSource (
"BSPromiscRx",
160 "A packet has been received by this device, has been passed up from the physical layer "
161 "and is being forwarded up the local protocol stack. This is a promiscuous trace,",
164 .AddTraceSource (
"BSRx",
165 "A packet has been received by this device, has been passed up from the physical layer "
166 "and is being forwarded up the local protocol stack. This is a non-promiscuous trace,",
169 .AddTraceSource (
"BSRxDrop",
170 "A packet has been dropped in the MAC layer after it has been passed up from the physical "
176 BaseStationNetDevice::BaseStationNetDevice (
void)
185 m_initialRangInterval =
Seconds (0.05);
189 m_maxRangCorrectionRetries = 16;
190 m_maxInvitedRangRetries = 16;
191 m_rangReqOppSize = 8;
199 m_dcdConfigChangeCount = 0;
200 m_ucdConfigChangeCount = 0;
201 m_framesSinceLastDcd = 0;
202 m_framesSinceLastUcd = 0;
205 m_nrSsRegistered = 0;
206 m_nrDlAllocations = 0;
207 m_nrUlAllocations = 0;
208 m_dlSubframeStartTime =
Seconds (0);
209 m_ulSubframeStartTime =
Seconds (0);
210 m_ulAllocationNumber = 0;
211 m_rangingOppNumber = 0;
212 m_allocationStartTime = 0;
214 m_symbolDuration =
Seconds (0);
215 m_linkManager = CreateObject<BSLinkManager> (
this);
217 m_ssManager = CreateObject<SSManager> ();
218 m_bsClassifier = CreateObject<IpcsClassifier> ();
219 m_serviceFlowManager = CreateObject<BsServiceFlowManager> (
this);
230 BaseStationNetDevice::BaseStationNetDevice (Ptr<Node> node,
232 Ptr<UplinkScheduler> uplinkScheduler,
233 Ptr<BSScheduler> bsScheduler)
238 m_uplinkScheduler = uplinkScheduler;
239 m_scheduler = bsScheduler;
242 BaseStationNetDevice::~BaseStationNetDevice (
void)
254 m_serviceFlowManager = 0;
255 m_uplinkScheduler = 0;
258 m_uplinkScheduler = 0;
267 m_bsClassifier = bsc;
273 return m_bsClassifier;
279 m_initialRangInterval = initialRangInterval;
285 return m_initialRangInterval;
291 m_dcdInterval = dcdInterval;
297 return m_dcdInterval;
303 m_ucdInterval = ucdInterval;
309 return m_ucdInterval;
315 m_intervalT8 = interval;
327 m_maxRangCorrectionRetries = maxRangCorrectionRetries;
333 return m_maxRangCorrectionRetries;
339 m_maxInvitedRangRetries = maxInvitedRangRetries;
345 return m_maxInvitedRangRetries;
351 m_rangReqOppSize = rangReqOppSize;
357 return m_rangReqOppSize;
363 m_bwReqOppSize = bwReqOppSize;
369 return m_bwReqOppSize;
375 m_nrDlSymbols = nrDlSymbols;
381 return m_nrDlSymbols;
387 m_nrUlSymbols = nrUlSymbols;
393 return m_nrUlSymbols;
409 BaseStationNetDevice::GetDlSubframeStartTime (
void)
const
411 return m_dlSubframeStartTime;
415 BaseStationNetDevice::GetUlSubframeStartTime (
void)
const
417 return m_ulSubframeStartTime;
421 BaseStationNetDevice::GetRangingOppNumber (
void)
const
423 return m_rangingOppNumber;
439 BaseStationNetDevice::GetServiceFlowManager (
void)
const
441 return m_serviceFlowManager;
445 BaseStationNetDevice::SetServiceFlowManager (Ptr<BsServiceFlowManager> sfm)
447 m_serviceFlowManager = sfm;
453 return m_uplinkScheduler;
459 m_uplinkScheduler = uls;
465 return m_linkManager;
486 BaseStationNetDevice::GetPsDuration (
void)
const
492 BaseStationNetDevice::GetSymbolDuration (
void)
const
494 return m_symbolDuration;
498 BaseStationNetDevice::Start (
void)
500 SetReceiveCallback ();
502 GetPhy ()->SetPhyParameters ();
503 GetPhy ()->SetDataRates ();
506 m_psDuration =
GetPhy ()->GetPsDuration ();
507 m_symbolDuration =
GetPhy ()->GetSymbolDuration ();
510 CreateDefaultConnections ();
511 GetPhy ()->SetSimplex (m_linkManager->SelectDlChannel ());
516 m_uplinkScheduler->InitOnce ();
520 BaseStationNetDevice::Stop (
void)
525 BaseStationNetDevice::StartFrame (
void)
528 uint32_t symbolsPerFrame =
GetPhy ()->GetSymbolsPerFrame ();
534 NS_LOG_INFO (
"----------------------frame" << GetNrFrames () + 1 <<
"----------------------");
540 BaseStationNetDevice::StartDlSubFrame (
void)
544 NS_LOG_DEBUG (
"DL frame started : " << m_frameStartTime.GetSeconds ());
546 SetNrFrames (GetNrFrames () + 1);
547 SetState (BS_STATE_DL_SUB_FRAME);
548 m_direction = DIRECTION_DOWNLINK;
549 m_uplinkScheduler->Schedule ();
551 m_scheduler->Schedule ();
554 &BaseStationNetDevice::EndDlSubFrame,
559 BaseStationNetDevice::EndDlSubFrame (
void)
562 SetState (BS_STATE_TTG);
567 BaseStationNetDevice::StartUlSubFrame (
void)
573 SetState (BS_STATE_UL_SUB_FRAME);
574 m_direction = DIRECTION_UPLINK;
575 MarkUplinkAllocations ();
577 &BaseStationNetDevice::EndUlSubFrame,
582 BaseStationNetDevice::EndUlSubFrame (
void)
585 SetState (BS_STATE_RTG);
590 BaseStationNetDevice::EndFrame (
void)
596 BaseStationNetDevice::DoSend (Ptr<Packet> packet,
597 const Mac48Address &source,
598 const Mac48Address &dest,
599 uint16_t protocolNumber)
601 Ptr<PacketBurst> burst = Create<PacketBurst> ();
602 ServiceFlow *serviceFlow = 0;
607 NS_LOG_INFO (
"\t\tPaket Size: " << packet->GetSize ());
611 if (protocolNumber == 2048)
613 serviceFlow = m_bsClassifier->Classify (packet, GetServiceFlowManager (), ServiceFlow::SF_DIRECTION_DOWN);
616 if (protocolNumber != 2048 || serviceFlow == 0)
618 serviceFlow = *GetServiceFlowManager ()->GetServiceFlows (ServiceFlow::SF_TYPE_ALL).begin ();
621 if (serviceFlow == 0)
627 if (serviceFlow->GetIsEnabled ())
629 if (!
Enqueue (packet, MacHeaderType (), serviceFlow->GetConnection ()))
651 "BS: Can not enqueue packet on the selected connection: the connection is not initialized");
656 hdr.SetCid (connection->GetCid ());
658 return connection->Enqueue (packet, hdrType, hdr);
662 BaseStationNetDevice::DoReceive (
Ptr<Packet> packet)
675 bool fragmentation =
false;
678 if (gnrcMacHdr.GetHt () == MacHeaderType::HEADER_TYPE_GENERIC)
680 if (gnrcMacHdr.check_hcs () ==
false)
688 cid = gnrcMacHdr.GetCid ();
691 type = gnrcMacHdr.GetType ();
700 uint8_t tmpType = type;
701 if (((tmpType >> 2) & 1) == 1)
704 NS_LOG_INFO (
"FRAG_DEBUG: DoReceive -> the packet is a fragment" << std::endl);
705 fragmentation =
true;
712 switch (msgType.GetType ())
714 case ManagementMessageType::MESSAGE_TYPE_RNG_REQ:
717 m_linkManager->ProcessRangingRequest (cid, rngReq);
720 case ManagementMessageType::MESSAGE_TYPE_RNG_RSP:
727 else if (m_cidFactory->IsBasic (cid))
729 source = m_ssManager->GetMacAddress (cid);
730 m_traceBSRx (packet, source, cid);
732 switch (msgType.GetType ())
734 case ManagementMessageType::MESSAGE_TYPE_RNG_REQ:
737 m_linkManager->ProcessRangingRequest (cid, rngReq);
740 case ManagementMessageType::MESSAGE_TYPE_RNG_RSP:
747 else if (m_cidFactory->IsPrimary (cid))
749 source = m_ssManager->GetMacAddress (cid);
750 m_traceBSRx (packet, source, cid);
752 switch (msgType.GetType ())
754 case ManagementMessageType::MESSAGE_TYPE_REG_REQ:
757 case ManagementMessageType::MESSAGE_TYPE_REG_RSP:
760 case ManagementMessageType::MESSAGE_TYPE_DSA_REQ:
764 GetServiceFlowManager ()->AllocateServiceFlows (dsaReq, cid);
767 case ManagementMessageType::MESSAGE_TYPE_DSA_RSP:
772 case ManagementMessageType::MESSAGE_TYPE_DSA_ACK:
777 GetServiceFlowManager ()->ProcessDsaAck (dsaAck, cid);
793 Ptr<Packet> C_Packet = packet->
Copy ();
797 source = m_ssManager->GetMacAddress (cid);
799 ForwardUp (packet->
Copy (), source, Mac48Address (
"ff:ff:ff:ff:ff:ff"));
803 NS_LOG_INFO (
"FRAG_DEBUG: BS DoReceive, the Packet is a fragment" << std::endl);
805 uint32_t fc = fragSubhdr.GetFc ();
811 NS_LOG_INFO (
"\t Received the latest fragment" << std::endl);
813 ->FragmentEnqueue (packet);
815 GetConnection (cid)->GetFragmentsQueue ();
816 Ptr<Packet> fullPacket = Create<Packet> ();
819 NS_LOG_INFO (
"\t BS PACKET DEFRAGMENTATION" << std::endl);
820 for (std::list<Ptr<const Packet> >::const_iterator iter = fragmentsQueue.begin ();
821 iter != fragmentsQueue.end (); ++iter)
824 fullPacket->AddAtEnd (*iter);
827 ->ClearFragmentsQueue ();
829 NS_LOG_INFO (
"\t fullPacket size = " << fullPacket->GetSize () << std::endl);
830 source = m_ssManager->GetMacAddress (cid);
832 ForwardUp (fullPacket->Copy (), source, Mac48Address (
"ff:ff:ff:ff:ff:ff"));
838 NS_LOG_INFO (
"\t Received the first or the middle fragment" << std::endl);
840 ->FragmentEnqueue (packet);
850 NS_ASSERT_MSG (bwRequestHdr.GetHt () == MacHeaderType::HEADER_TYPE_BANDWIDTH,
851 "A bandwidth request should be carried by a bandwidth header type");
852 if (bwRequestHdr.check_hcs () ==
false)
858 cid = bwRequestHdr.GetCid ();
859 source = m_ssManager->GetMacAddress (cid);
860 m_traceBSRx (packet, source, cid);
870 bool sendDcd =
false, sendUcd =
false, updateDcd =
false, updateUcd =
false;
872 uint16_t currentNrSsRegistered = m_ssManager->GetNRegisteredSSs ();
874 if (m_nrSsRegistered == currentNrSsRegistered)
876 m_uplinkScheduler->GetChannelDescriptorsToUpdate (updateDcd, updateUcd, sendDcd, sendUcd);
880 sendDcd = sendUcd =
true;
883 m_nrSsRegistered = currentNrSsRegistered;
891 m_dcdConfigChangeCount += 1 % 256;
896 m_ucdConfigChangeCount += 1 % 256;
899 dlmap = CreateDlMap ();
903 ulmap = CreateUlMap ();
920 m_framesSinceLastDcd = 0;
924 m_framesSinceLastDcd++;
932 m_framesSinceLastUcd = 0;
936 m_framesSinceLastUcd++;
945 BaseStationNetDevice::SendBursts (
void)
948 std::pair<OfdmDlMapIe*, Ptr<PacketBurst> > pair;
949 WimaxPhy::ModulationType modulationType = WimaxPhy::MODULATION_TYPE_BPSK_12;
950 std::list<std::pair<OfdmDlMapIe*, Ptr<PacketBurst> > > *downlinkBursts = m_scheduler->GetDownlinkBursts ();
955 while (downlinkBursts->size ())
957 pair = downlinkBursts->front ();
959 dlMapIe = pair.first;
960 cid = dlMapIe->GetCid ();
961 uint8_t diuc = dlMapIe->GetDiuc ();
965 if (m_serviceFlowManager->GetServiceFlow (cid) != 0)
976 modulationType = WimaxPhy::MODULATION_TYPE_BPSK_12;
980 txTime +=
GetPhy ()->GetTransmissionTime (burst->GetSize (), modulationType);
981 downlinkBursts->pop_front ();
987 BaseStationNetDevice::CreateDlMap (
void)
989 m_nrDlAllocations = 0;
992 dlmap.SetDcdCount (m_dcdConfigChangeCount);
995 std::list<std::pair<OfdmDlMapIe*, Ptr<PacketBurst> > > *downlinkBursts = m_scheduler->GetDownlinkBursts ();
997 for (std::list<std::pair<OfdmDlMapIe*, Ptr<PacketBurst> > >::iterator iter = downlinkBursts->begin (); iter
998 != downlinkBursts->end (); ++iter)
1000 iter->first->SetPreamblePresent (0);
1001 iter->first->SetStartTime (0);
1002 dlmap.AddDlMapElement (*(iter->first));
1005 OfdmDlMapIe dlMapIeEnd;
1008 dlMapIeEnd.SetDiuc (OfdmDlBurstProfile::DIUC_END_OF_MAP);
1009 dlMapIeEnd.SetPreamblePresent (0);
1010 dlMapIeEnd.SetStartTime (0);
1012 dlmap.AddDlMapElement (dlMapIeEnd);
1013 m_nrDlAllocations = downlinkBursts->size ();
1015 Ptr<Packet> p = Create<Packet> ();
1016 p->AddHeader (dlmap);
1017 p->AddHeader (ManagementMessageType (ManagementMessageType::MESSAGE_TYPE_DL_MAP));
1022 BaseStationNetDevice::CreateDcd (
void)
1025 OfdmDcdChannelEncodings chnlEncodings;
1027 chnlEncodings.SetBsEirp (0);
1028 chnlEncodings.SetEirxPIrMax (0);
1029 chnlEncodings.SetFrequency (
GetPhy ()->GetFrequency ());
1030 chnlEncodings.SetChannelNr (0);
1031 chnlEncodings.SetTtg (
GetTtg ());
1032 chnlEncodings.SetRtg (
GetRtg ());
1034 chnlEncodings.SetFrameDurationCode (
GetPhy ()->GetFrameDurationCode ());
1035 chnlEncodings.SetFrameNumber (GetNrFrames ());
1037 dcd.SetConfigurationChangeCount (m_dcdConfigChangeCount);
1038 dcd.SetChannelEncodings (chnlEncodings);
1040 SetDlBurstProfiles (&dcd);
1041 SetCurrentDcd (dcd);
1043 Ptr<Packet> p = Create<Packet> ();
1045 p->AddHeader (ManagementMessageType (ManagementMessageType::MESSAGE_TYPE_DCD));
1050 BaseStationNetDevice::CreateUlMap (
void)
1052 m_ulAllocationNumber = 0;
1053 m_rangingOppNumber = 0;
1054 m_nrUlAllocations = 0;
1057 ulmap.SetUcdCount (m_ucdConfigChangeCount);
1058 ulmap.SetAllocationStartTime (m_uplinkScheduler->CalculateAllocationStartTime ());
1060 std::list<OfdmUlMapIe> uplinkAllocations = m_uplinkScheduler->GetUplinkAllocations ();
1062 for (std::list<OfdmUlMapIe>::iterator iter = uplinkAllocations.begin (); iter != uplinkAllocations.end (); ++iter)
1064 ulmap.AddUlMapElement (*iter);
1067 m_nrUlAllocations = uplinkAllocations.size ();
1069 Ptr<Packet> p = Create<Packet> ();
1070 p->AddHeader (ulmap);
1071 p->AddHeader (ManagementMessageType (ManagementMessageType::MESSAGE_TYPE_UL_MAP));
1076 BaseStationNetDevice::CreateUcd (
void)
1079 ucd.SetConfigurationChangeCount (m_ucdConfigChangeCount);
1080 ucd.SetRangingBackoffStart (3);
1081 ucd.SetRangingBackoffEnd (6);
1082 ucd.SetRequestBackoffStart (3);
1083 ucd.SetRequestBackoffEnd (6);
1085 OfdmUcdChannelEncodings chnlEncodings;
1087 chnlEncodings.SetBwReqOppSize (m_bwReqOppSize *
GetPhy ()->GetPsPerSymbol ());
1088 chnlEncodings.SetRangReqOppSize (m_rangReqOppSize *
GetPhy ()->GetPsPerSymbol ());
1090 chnlEncodings.SetFrequency (
GetPhy ()->GetFrequency ());
1091 chnlEncodings.SetSbchnlReqRegionFullParams (0);
1092 chnlEncodings.SetSbchnlFocContCodes (0);
1094 ucd.SetChannelEncodings (chnlEncodings);
1096 SetUlBurstProfiles (&ucd);
1097 SetCurrentUcd (ucd);
1099 Ptr<Packet> p = Create<Packet> ();
1101 p->AddHeader (ManagementMessageType (ManagementMessageType::MESSAGE_TYPE_UCD));
1106 BaseStationNetDevice::SetDlBurstProfiles (Dcd *dcd)
1110 OfdmDlBurstProfile brstProfile;
1111 brstProfile.SetType (0);
1112 brstProfile.SetLength (0);
1113 brstProfile.SetDiuc (i + 1);
1114 brstProfile.SetFecCodeType (i);
1115 dcd->AddDlBurstProfile (brstProfile);
1120 BaseStationNetDevice::SetUlBurstProfiles (Ucd *ucd)
1124 OfdmUlBurstProfile brstProfile;
1125 brstProfile.SetType (0);
1126 brstProfile.SetLength (0);
1128 brstProfile.SetUiuc (i + 5);
1129 brstProfile.SetFecCodeType (i);
1131 ucd->AddUlBurstProfile (brstProfile);
1135 Ptr<WimaxConnection>
1136 BaseStationNetDevice::GetConnection (Cid cid)
1138 Ptr<WimaxConnection> connection = 0;
1139 if (cid.IsInitialRanging ())
1143 else if (cid.IsBroadcast ())
1152 NS_ASSERT_MSG (connection != 0,
"BS: Invalid connection=0");
1157 BaseStationNetDevice::MarkUplinkAllocations (
void)
1159 uint16_t symbolsToAllocation = 0;
1160 std::list<OfdmUlMapIe> uplinkAllocations = m_uplinkScheduler->GetUplinkAllocations ();
1161 for (std::list<OfdmUlMapIe>::iterator iter = uplinkAllocations.begin (); iter != uplinkAllocations.end (); ++iter)
1163 OfdmUlMapIe uplinkAllocation = *iter;
1165 if (uplinkAllocation.GetUiuc () == OfdmUlBurstProfile::UIUC_END_OF_MAP)
1170 symbolsToAllocation = uplinkAllocation.GetStartTime ();
1171 MarkUplinkAllocationStart (
Seconds (symbolsToAllocation * m_symbolDuration.
GetSeconds ()));
1172 MarkUplinkAllocationEnd (
Seconds ((symbolsToAllocation + uplinkAllocation.GetDuration ())
1173 * m_symbolDuration.
GetSeconds ()), uplinkAllocation.GetCid (), uplinkAllocation.GetUiuc ());
1178 BaseStationNetDevice::MarkUplinkAllocationStart (Time allocationStartTime)
1180 Simulator::Schedule (allocationStartTime, &BaseStationNetDevice::UplinkAllocationStart,
this);
1184 BaseStationNetDevice::MarkUplinkAllocationEnd (Time allocationEndTime, Cid cid, uint8_t uiuc)
1186 Simulator::Schedule (allocationEndTime, &BaseStationNetDevice::UplinkAllocationEnd,
this, cid, uiuc);
1190 BaseStationNetDevice::UplinkAllocationStart (
void)
1192 m_ulAllocationNumber++;
1194 NS_LOG_DEBUG (
"--UL allocation " << (uint32_t) m_ulAllocationNumber <<
" started : "
1200 BaseStationNetDevice::UplinkAllocationEnd (Cid cid, uint8_t uiuc)
1204 if (m_cidFactory->IsBasic (cid))
1206 m_linkManager->VerifyInvitedRanging (cid, uiuc);
1211 BaseStationNetDevice::MarkRangingOppStart (Time rangingOppStartTime)
1217 BaseStationNetDevice::RangingOppStart (
void)
1219 m_rangingOppNumber++;
void SetUcdInterval(Time ucdInterval)
uint32_t RemoveHeader(Header &header)
void SetRtg(uint16_t rtg)
Time GetIntervalT8(void) const
void SetNrDlSymbols(uint32_t dlSymbols)
uint16_t GetRtg(void) const
uint32_t GetNrDcdSent(void) const
void SetLinkManager(Ptr< BSLinkManager > linkManager)
#define NS_LOG_COMPONENT_DEFINE(name)
Ptr< WimaxConnection > GetBroadcastConnection(void) const
uint32_t GetSize(void) const
Ptr< BSScheduler > GetBSScheduler(void) const
TracedCallback< Ptr< const Packet > > m_bsRxTrace
uint8_t GetMaxRangingCorrectionRetries(void) const
bool IsBroadcast(void) const
static void Cancel(const EventId &id)
void SetBSScheduler(Ptr< BSScheduler > bsSchedule)
Ptr< ConnectionManager > GetConnectionManager(void) const
uint8_t GetRangReqOppSize(void) const
static EventId Schedule(Time const &time, MEM mem_ptr, OBJ obj)
void SetMaxInvitedRangRetries(uint8_t maxInvitedRangRetries)
void SetIntervalT8(Time interval)
void SetBsClassifier(Ptr< IpcsClassifier > classifier)
#define NS_FATAL_ERROR(msg)
fatal error handling
Time GetDcdInterval(void) const
double GetSeconds(void) const
uint8_t GetMaxInvitedRangRetries(void) const
TracedCallback< Ptr< const Packet > > m_bsRxDropTrace
bool Enqueue(Ptr< Packet > packet, const MacHeaderType &hdrType, Ptr< WimaxConnection > connection)
Enqueue a packet into a connection queue.
uint16_t GetTtg(void) const
void SetRangReqOppSize(uint8_t rangReqOppSize)
void SetTtg(uint16_t ttg)
TracedCallback< Ptr< const Packet > > m_bsTxDropTrace
Time GetInitialRangingInterval(void) const
static Cid InitialRanging(void)
bool IsInitialRanging(void) const
Ptr< UplinkScheduler > GetUplinkScheduler(void) const
void SetInitialRangingInterval(Time initialRangInterval)
Ptr< IpcsClassifier > GetBsClassifier(void) const
Ptr< WimaxConnection > GetInitialRangingConnection(void) const
Ptr< BandwidthManager > GetBandwidthManager(void) const
Mac48Address GetMacAddress(void) const
virtual void DoDispose(void)
Ptr< Packet > Copy(void) const
uint8_t GetBwReqOppSize(void) const
this class implements the bandwidth-request mac Header as described by IEEE Standard for Local and me...
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
static EventId ScheduleNow(MEM mem_ptr, OBJ obj)
void SetDcdInterval(Time dcdInterval)
TracedCallback< Ptr< const Packet > > m_bsPromiscRxTrace
void SetPhy(Ptr< WimaxPhy > phy)
void CreateMapMessages(void)
creates the MAC management messages DL-MAP and UL-MAP
TracedCallback< Ptr< const Packet > > m_bsTxTrace
void SetUplinkScheduler(Ptr< UplinkScheduler > ulScheduler)
uint32_t GetNrDlSymbols(void) const
#define NS_ASSERT_MSG(condition, message)
void CreateDescriptorMessages(bool sendDcd, bool senUcd)
creates the channel descriptor MAC management messages DCD and UCD
Ptr< BurstProfileManager > GetBurstProfileManager(void) const
Time Seconds(double seconds)
create ns3::Time instances in units of seconds.
uint32_t GetNrUlSymbols(void) const
void SetMaxRangingCorrectionRetries(uint8_t maxRangCorrectionRetries)
Ptr< BSLinkManager > GetLinkManager(void) const
Ptr< WimaxPhy > GetPhy(void) const
Time GetUcdInterval(void) const
void SetBwReqOppSize(uint8_t bwReqOppSize)
#define NS_LOG_DEBUG(msg)
Ptr< SSManager > GetSSManager(void) const
void SetSSManager(Ptr< SSManager > ssManager)
Time MilliSeconds(uint64_t ms)
create ns3::Time instances in units of milliseconds.
void InitBaseStationNetDevice(void)
initializes the BS net device and sets its parameters to the default values
void SetNrUlSymbols(uint32_t ulSymbols)
virtual void SetNode(Ptr< Node > node)
uint32_t GetNrUcdSent(void) const
void AddHeader(const Header &header)