A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ss-net-device.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2007,2008,2009 INRIA, UDcast
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Authors: Jahanzeb Farooq <jahanzeb.farooq@sophia.inria.fr>
7 * Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
8 * <amine.ismail@UDcast.com>
9 */
10
11#include "ss-net-device.h"
12
13#include "bandwidth-manager.h"
15#include "connection-manager.h"
16#include "dl-mac-messages.h"
18#include "service-flow-record.h"
19#include "service-flow.h"
20#include "ss-link-manager.h"
21#include "ss-scheduler.h"
22#include "ul-mac-messages.h"
23#include "wimax-mac-queue.h"
24#include "wimax-phy.h"
25
26#include "ns3/config.h"
27#include "ns3/enum.h"
28#include "ns3/node.h"
29#include "ns3/packet-burst.h"
30#include "ns3/pointer.h"
31#include "ns3/simulator.h"
32#include "ns3/trace-source-accessor.h"
33
34#include <algorithm>
35
36namespace ns3
37{
38
39NS_LOG_COMPONENT_DEFINE("SubscriberStationNetDevice");
40
41NS_OBJECT_ENSURE_REGISTERED(SubscriberStationNetDevice);
42
43Time
48
51{
52 static TypeId tid =
53 TypeId("ns3::SubscriberStationNetDevice")
54
56 .SetGroupName("Wimax")
57
58 .AddConstructor<SubscriberStationNetDevice>()
59
60 .AddAttribute("BasicConnection",
61 "Basic connection",
65
66 .AddAttribute("PrimaryConnection",
67 "Primary connection",
71
72 .AddAttribute("LostDlMapInterval",
73 "Time since last received DL-MAP message before downlink synchronization "
74 "is considered lost. Maximum is 600ms",
75 TimeValue(Seconds(0.5)),
79
80 .AddAttribute("LostUlMapInterval",
81 "Time since last received UL-MAP before uplink synchronization is "
82 "considered lost, maximum is 600.",
87
88 .AddAttribute("MaxDcdInterval",
89 "Maximum time between transmission of DCD messages. Maximum is 10s",
90 TimeValue(Seconds(10)),
94
95 .AddAttribute("MaxUcdInterval",
96 "Maximum time between transmission of UCD messages. Maximum is 10s",
97 TimeValue(Seconds(10)),
101
102 .AddAttribute("IntervalT1",
103 "Wait for DCD timeout. Maximum is 5*maxDcdInterval",
104 TimeValue(Seconds(50)),
108
109 .AddAttribute("IntervalT2",
110 "Wait for broadcast ranging timeout, i.e., wait for initial ranging "
111 "opportunity. Maximum is 5*Ranging interval",
112 TimeValue(Seconds(10)),
116
117 .AddAttribute("IntervalT3",
118 "ranging Response reception timeout following the transmission of a "
119 "ranging request. Maximum is 200ms",
120 TimeValue(Seconds(0.2)),
124
125 .AddAttribute("IntervalT7",
126 "wait for DSA/DSC/DSD Response timeout. Maximum is 1s",
127 TimeValue(Seconds(0.1)),
131
132 .AddAttribute("IntervalT12",
133 "Wait for UCD descriptor.Maximum is 5*MaxUcdInterval",
134 TimeValue(Seconds(10)),
138
139 .AddAttribute(
140 "IntervalT20",
141 "Time the SS searches for preambles on a given channel. Minimum is 2 MAC frames",
142 TimeValue(Seconds(0.5)),
146
147 .AddAttribute("IntervalT21",
148 "time the SS searches for (decodable) DL-MAP on a given channel",
149 TimeValue(Seconds(10)),
153
154 .AddAttribute(
155 "MaxContentionRangingRetries",
156 "Number of retries on contention Ranging Requests",
157 UintegerValue(16),
161
162 .AddAttribute("SSScheduler",
163 "The ss scheduler attached to this device.",
164 PointerValue(),
168
169 .AddAttribute("LinkManager",
170 "The ss link manager attached to this device.",
171 PointerValue(),
175
176 .AddAttribute("Classifier",
177 "The ss classifier attached to this device.",
178 PointerValue(),
182
183 .AddTraceSource(
184 "SSTxDrop",
185 "A packet has been dropped in the MAC layer before being queued for transmission.",
187 "ns3::Packet::TracedCallback")
188
189 .AddTraceSource(
190 "SSPromiscRx",
191 "A packet has been received by this device, has been passed up from the physical "
192 "layer "
193 "and is being forwarded up the local protocol stack. This is a promiscuous trace,",
195 "ns3::Packet::TracedCallback")
196
197 .AddTraceSource("SSRx",
198 "A packet has been received by this device, has been passed up from "
199 "the physical layer "
200 "and is being forwarded up the local protocol stack. This is a "
201 "non-promiscuous trace,",
203 "ns3::Packet::TracedCallback")
204
205 .AddTraceSource("SSRxDrop",
206 "A packet has been dropped in the MAC layer after it has been passed "
207 "up from the physical "
208 "layer.",
210 "ns3::Packet::TracedCallback");
211 return tid;
212}
213
218
219void
221{
227 m_intervalT2 = Seconds(5 * 2); // shall be 5 * RangingInterval, if ranging interval=see T2 at
228 // page 638) means Initial Ranging Interval=see page 637)
230 m_intervalT7 = Seconds(0.1); // maximum is 1
234 m_dcdCount = 0;
235 m_baseStationId = Mac48Address("00:00:00:00:00:00");
236 m_ucdCount = 0;
240 m_nrDlMapRecvd = 0;
241 m_nrUlMapRecvd = 0;
242 m_nrDcdRecvd = 0;
243 m_nrUcdRecvd = 0;
247
248 m_basicConnection = nullptr;
249 m_primaryConnection = nullptr;
250
257}
258
265
269
270void
272{
273 delete m_dlBurstProfile;
274 delete m_ulBurstProfile;
275 m_scheduler = nullptr;
276 m_serviceFlowManager = nullptr;
277 m_basicConnection = nullptr;
278 m_primaryConnection = nullptr;
279 m_classifier = nullptr;
280 m_dlBurstProfile = nullptr;
281 m_ulBurstProfile = nullptr;
282
283 m_linkManager = nullptr;
284
288
290}
291
292void
294{
295 m_lostDlMapInterval = lostDlMapInterval;
296}
297
298Time
303
304void
306{
307 m_lostUlMapInterval = lostUlMapInterval;
308}
309
310Time
315
316void
318{
319 m_maxDcdInterval = maxDcdInterval;
320}
321
322Time
327
328void
330{
331 m_maxUcdInterval = maxUcdInterval;
332}
333
334Time
339
340void
345
346Time
351
352void
357
358Time
363
364void
369
370Time
375
376void
381
382Time
387
388void
393
394Time
399
400void
405
406Time
411
412void
417
418Time
423
424void
426{
427 m_maxContentionRangingRetries = maxContentionRangingRetries;
428}
429
430uint8_t
435
436void
438{
439 m_basicConnection = basicConnection;
440 uint32_t nodeId = GetNode()->GetId();
441 uint32_t ifaceId = GetIfIndex();
442
444 {
445 std::ostringstream oss;
446 oss << "/NodeList/" << nodeId << "/DeviceList/" << ifaceId
447 << "/$ns3::SubscriberStationNetDevice/BasicConnection/TxQueue/Enqueue";
449 }
451 {
452 std::ostringstream oss;
453 oss << "/NodeList/" << nodeId << "/DeviceList/" << ifaceId
454 << "/$ns3::SubscriberStationNetDevice/BasicConnection/TxQueue/Dequeue";
456 }
458 {
459 std::ostringstream oss;
460 oss << "/NodeList/" << nodeId << "/DeviceList/" << ifaceId
461 << "/$ns3::SubscriberStationNetDevice/BasicConnection/TxQueue/Drop";
463 }
464}
465
471
472void
474{
475 m_primaryConnection = primaryConnection;
476
477 uint32_t nodeId = GetNode()->GetId();
478 uint32_t ifaceId = GetIfIndex();
479
481 {
482 std::ostringstream oss;
483 oss << "/NodeList/" << nodeId << "/DeviceList/" << ifaceId
484 << "/$ns3::SubscriberStationNetDevice/PrimaryConnection/TxQueue/Enqueue";
486 }
488 {
489 std::ostringstream oss;
490 oss << "/NodeList/" << nodeId << "/DeviceList/" << ifaceId
491 << "/$ns3::SubscriberStationNetDevice/PrimaryConnection/TxQueue/Dequeue";
493 }
495 {
496 std::ostringstream oss;
497 oss << "/NodeList/" << nodeId << "/DeviceList/" << ifaceId
498 << "/$ns3::SubscriberStationNetDevice/PrimaryConnection/TxQueue/Drop";
500 }
501}
502
508
509Cid
511{
512 return m_basicConnection->GetCid();
513}
514
515Cid
520
521void
526
532
533void
535 bool areManagementConnectionsAllocated)
536{
537 m_areManagementConnectionsAllocated = areManagementConnectionsAllocated;
538}
539
540bool
545
546void
548{
549 m_areServiceFlowsAllocated = areServiceFlowsAllocated;
550}
551
552bool
557
563
564void
569
570bool
572{
573 return !GetServiceFlowManager()->GetServiceFlows(ServiceFlow::SF_TYPE_ALL).empty();
574}
575
581
582void
587
593
594void
599
605
606void
611
612void
614{
616
617 GetPhy()->SetPhyParameters();
618 GetPhy()->SetDataRates();
619 m_intervalT20 = Seconds(4 * GetPhy()->GetFrameDuration().GetSeconds());
620
623}
624
625void
630
631void
636
637void
642
643bool
645 const Mac48Address& source,
646 const Mac48Address& dest,
647 uint16_t protocolNumber)
648{
649 NS_LOG_INFO("SS (" << source << "):");
650 NS_LOG_INFO("\tSending packet...");
651 NS_LOG_INFO("\t\tDestination: " << dest);
652 NS_LOG_INFO("\t\tPacket Size: " << packet->GetSize());
653 NS_LOG_INFO("\t\tProtocol: " << protocolNumber);
654
655 ServiceFlow* serviceFlow = nullptr;
656
657 if (IsRegistered())
658 {
659 NS_LOG_DEBUG("SS (Basic CID: " << m_basicConnection->GetCid() << ")");
660 }
661 else
662 {
663 NS_LOG_DEBUG("SS (" << GetMacAddress() << ")");
664 NS_LOG_INFO("\tCan't send packet! (NotRegistered with the network)");
665 return false;
666 }
667
668 NS_LOG_DEBUG("packet to send, size : " << packet->GetSize() << ", destination : " << dest);
669
670 if (GetServiceFlowManager()->GetNrServiceFlows() == 0)
671 {
672 NS_LOG_INFO("\tCan't send packet! (No service Flow)");
673 return false;
674 }
675
676 if (protocolNumber == 2048)
677 {
678 serviceFlow =
680 }
681
682 if ((protocolNumber != 2048) || (serviceFlow == nullptr))
683 {
684 serviceFlow = *GetServiceFlowManager()->GetServiceFlows(ServiceFlow::SF_TYPE_ALL).begin();
685 NS_LOG_INFO("\tNo service flows matches...using the default one.");
686 }
687
688 NS_LOG_INFO("\tPacket classified in the service flow SFID = "
689 << serviceFlow->GetSfid() << " CID = " << serviceFlow->GetCid());
690 if (serviceFlow->GetIsEnabled())
691 {
692 if (!Enqueue(packet, MacHeaderType(), serviceFlow->GetConnection()))
693 {
694 NS_LOG_INFO("\tEnqueue ERROR!!");
695 m_ssTxDropTrace(packet);
696 return false;
697 }
698 else
699 {
700 m_ssTxTrace(packet);
701 }
702 }
703 else
704 {
705 NS_LOG_INFO("Error!! The Service Flow is not enabled");
706 m_ssTxDropTrace(packet);
707 return false;
708 }
709
710 return true;
711}
712
713bool
715 const MacHeaderType& hdrType,
716 Ptr<WimaxConnection> connection)
717{
718 NS_ASSERT_MSG(connection,
719 "SS: Can not enqueue the packet: the selected connection is nor initialized");
720
722
724 {
725 hdr.SetLen(packet->GetSize() + hdr.GetSerializedSize());
726 hdr.SetCid(connection->GetCid());
727 }
728
729 if (connection->GetType() == Cid::TRANSPORT)
730 {
731 if (connection->GetSchedulingType() == ServiceFlow::SF_TYPE_UGS && m_scheduler->GetPollMe())
732 {
734 "Error while enqueuing packet: incorrect header type");
735
736 GrantManagementSubheader grantMgmntSubhdr;
737 grantMgmntSubhdr.SetPm(1);
738 packet->AddHeader(grantMgmntSubhdr);
739 }
740 }
741 NS_LOG_INFO("ServiceFlowManager: enqueuing packet");
742 return connection->Enqueue(packet, hdrType, hdr);
743}
744
745void
747 uint16_t nrSymbols,
748 Ptr<WimaxConnection> connection,
749 MacHeaderType::HeaderType packetType)
750{
751 WimaxPhy::ModulationType modulationType;
752
755 {
756 modulationType = WimaxPhy::MODULATION_TYPE_BPSK_12;
757 }
758 else
759 {
760 modulationType = GetBurstProfileManager()->GetModulationType(uiuc, DIRECTION_UPLINK);
761 }
762 Ptr<PacketBurst> burst =
763 m_scheduler->Schedule(nrSymbols, modulationType, packetType, connection);
764
765 if (burst->GetNPackets() == 0)
766 {
767 return;
768 }
769
770 if (IsRegistered())
771 {
772 NS_LOG_DEBUG("SS (Basic CID: " << m_basicConnection->GetCid() << ")");
773 }
774 else
775 {
776 NS_LOG_DEBUG("SS (" << GetMacAddress() << ")");
777 }
778
779 if (connection->GetType() == Cid::TRANSPORT)
780 {
781 ServiceFlowRecord* record = connection->GetServiceFlow()->GetRecord();
782 record->UpdatePktsSent(burst->GetNPackets());
783 record->UpdateBytesSent(burst->GetSize());
784
785 NS_LOG_DEBUG(" sending burst"
786 << ", SFID: " << connection->GetServiceFlow()->GetSfid() << ", pkts sent: "
787 << record->GetPktsSent() << ", pkts rcvd: " << record->GetPktsRcvd()
788 << ", bytes sent: " << record->GetBytesSent()
789 << ", bytes rcvd: " << record->GetBytesRcvd());
790 }
791 else
792 {
793 }
794 ForwardDown(burst, modulationType);
795}
796
797void
799{
800 GenericMacHeader gnrcMacHdr;
801 ManagementMessageType msgType;
802 RngRsp rngrsp;
803 Cid cid;
804 uint32_t pktSize = packet->GetSize();
805 packet->RemoveHeader(gnrcMacHdr);
806 FragmentationSubheader fragSubhdr;
807 bool fragmentation = false; // it becomes true when there is a fragmentation subheader
808
809 if (gnrcMacHdr.GetHt() == MacHeaderType::HEADER_TYPE_GENERIC)
810 {
811 if (!gnrcMacHdr.check_hcs())
812 {
813 // The header is noisy
814 NS_LOG_INFO("Header HCS ERROR");
815 m_ssRxDropTrace(packet);
816 return;
817 }
818
819 cid = gnrcMacHdr.GetCid();
820
821 // checking for subheaders
822 uint8_t type = gnrcMacHdr.GetType();
823 if (type)
824 {
825 // Check if there is a fragmentation Subheader
826 uint8_t tmpType = type;
827 if (((tmpType >> 2) & 1) == 1)
828 {
829 // a TRANSPORT packet with fragmentation subheader has been received!
830 fragmentation = true;
831 NS_LOG_INFO("SS DoReceive -> the packet is a fragment" << std::endl);
832 }
833 }
834
835 if (cid == GetBroadcastConnection()->GetCid() && !fragmentation)
836 {
837 packet->RemoveHeader(msgType);
838 switch (msgType.GetType())
839 {
842 {
843 Simulator::Cancel(m_linkManager->GetDlMapSyncTimeoutEvent());
844 }
845
847 {
849 }
850
851 m_linkManager->ScheduleScanningRestart(m_lostDlMapInterval,
853 false,
855
857 {
859 }
860
861 m_linkManager->ScheduleScanningRestart(m_intervalT1,
863 false,
865
867 {
869 }
870
871 m_linkManager->ScheduleScanningRestart(m_intervalT12,
873 true,
875
876 DlMap dlmap;
877 packet->RemoveHeader(dlmap);
878 ProcessDlMap(dlmap);
879 break;
880 }
883 {
885 m_linkManager->ScheduleScanningRestart(m_lostUlMapInterval,
887 true,
889 }
890
891 UlMap ulmap;
892 packet->RemoveHeader(ulmap);
893
894 ProcessUlMap(ulmap);
895
897 {
898 if (m_linkManager->GetRangingIntervalFound())
899 {
901 {
903 }
904 m_linkManager->PerformBackoff();
905 }
906 }
907 break;
908 }
911 {
913 }
914
916 {
918 m_linkManager->ScheduleScanningRestart(m_intervalT1,
920 false,
922 }
923
924 Dcd dcd;
925 // number of burst profiles is set to number of DL-MAP IEs after processing DL-MAP,
926 // not a very good solution dcd.SetNrDlBurstProfiles (m_nrDlMapElements);
928 packet->RemoveHeader(dcd);
929
930 ProcessDcd(dcd);
931 break;
932 }
934 Ucd ucd;
935 // number of burst profiles is set to number of UL-MAP IEs after processing UL-MAP,
936 // not a very good solution ucd.SetNrUlBurstProfiles (m_nrUlMapElements);
938 packet->RemoveHeader(ucd);
939
940 ProcessUcd(ucd);
941
943 {
945 m_linkManager->ScheduleScanningRestart(m_intervalT12,
947 true,
949 }
950
952 {
953 /*state indicating that SS has completed scanning, synchronization and parameter
954 acquisition successfully and now waiting for UL-MAP to start initial ranging.*/
956
957 m_linkManager->ScheduleScanningRestart(m_intervalT2,
959 false,
961 m_linkManager->ScheduleScanningRestart(m_lostUlMapInterval,
963 true,
965 }
966 break;
967 }
968 default:
969 NS_FATAL_ERROR("Invalid management message type");
970 }
971 }
972 else if (GetInitialRangingConnection() && cid == GetInitialRangingConnection()->GetCid() &&
973 !fragmentation)
974 {
975 m_traceSSRx(packet, GetMacAddress(), cid);
976 packet->RemoveHeader(msgType);
977 switch (msgType.GetType())
978 {
980 // intended for base station, ignore
981 break;
984 "SS: Error while receiving a ranging response message: SS state "
985 "should be at least SS_STATE_WAITING_REG_RANG_INTRVL");
986 packet->RemoveHeader(rngrsp);
987 m_linkManager->PerformRanging(cid, rngrsp);
988 break;
989 default:
990 NS_LOG_ERROR("Invalid management message type");
991 }
992 }
993 else if (m_basicConnection && cid == m_basicConnection->GetCid() && !fragmentation)
994 {
995 m_traceSSRx(packet, GetMacAddress(), cid);
996 packet->RemoveHeader(msgType);
997 switch (msgType.GetType())
998 {
1000 // intended for base station, ignore
1001 break;
1004 "SS: Error while receiving a ranging response message: SS state "
1005 "should be SS_STATE_WAITING_RNG_RSP");
1006 packet->RemoveHeader(rngrsp);
1007 m_linkManager->PerformRanging(cid, rngrsp);
1008 break;
1009 default:
1010 NS_LOG_ERROR("Invalid management message type");
1011 }
1012 }
1013 else if (m_primaryConnection && cid == m_primaryConnection->GetCid() && !fragmentation)
1014 {
1015 m_traceSSRx(packet, GetMacAddress(), cid);
1016 packet->RemoveHeader(msgType);
1017 switch (msgType.GetType())
1018 {
1020 // not yet implemented
1022 // intended for base station, ignore
1024 /*from other station as DSA initiation
1025 by BS is not supported, ignore*/
1026 break;
1028 Simulator::Cancel(GetServiceFlowManager()->GetDsaRspTimeoutEvent());
1029 DsaRsp dsaRsp;
1030 packet->RemoveHeader(dsaRsp);
1031 GetServiceFlowManager()->ProcessDsaRsp(dsaRsp);
1032 break;
1033 }
1035 /*from other station as DSA initiation
1036 by BS is not supported, ignore*/
1037 break;
1038 default:
1039 NS_LOG_ERROR("Invalid management message type");
1040 }
1041 }
1042 else if (GetConnectionManager()->GetConnection(cid)) // transport connection
1043 {
1044 ServiceFlow* serviceFlow = GetConnectionManager()->GetConnection(cid)->GetServiceFlow();
1045 ServiceFlowRecord* record = serviceFlow->GetRecord();
1046
1047 record->UpdatePktsRcvd(1);
1048 record->UpdateBytesRcvd(pktSize);
1049
1050 // If fragmentation is true, the packet is a fragment.
1051 if (!fragmentation)
1052 {
1053 m_ssRxTrace(packet);
1054 ForwardUp(packet,
1056 GetMacAddress()); // source shall be BS's address or sender SS's?
1057 }
1058 else
1059 {
1060 NS_LOG_INFO("FRAG_DEBUG: SS DoReceive, the Packet is a fragment" << std::endl);
1061 packet->RemoveHeader(fragSubhdr);
1062 uint32_t fc = fragSubhdr.GetFc();
1063 NS_LOG_INFO("\t fragment size = " << packet->GetSize() << std::endl);
1064
1065 if (fc == 2)
1066 {
1067 // This is the latest fragment.
1068 // Take the fragment queue, defragment a packet and send it to the upper layer
1069 NS_LOG_INFO("\t Received the latest fragment" << std::endl);
1070 GetConnectionManager()->GetConnection(cid)->FragmentEnqueue(packet);
1071
1072 WimaxConnection::FragmentsQueue fragmentsQueue =
1073 GetConnectionManager()->GetConnection(cid)->GetFragmentsQueue();
1074
1075 Ptr<Packet> fullPacket = Create<Packet>();
1076
1077 // DEFRAGMENTATION
1078 NS_LOG_INFO("\t SS PACKET DEFRAGMENTATION" << std::endl);
1079 for (auto iter = fragmentsQueue.begin(); iter != fragmentsQueue.end(); ++iter)
1080 {
1081 // Create the whole Packet
1082 fullPacket->AddAtEnd(*iter);
1083 }
1084 GetConnectionManager()->GetConnection(cid)->ClearFragmentsQueue();
1085 NS_LOG_INFO("\t fullPacket size = " << fullPacket->GetSize() << std::endl);
1086
1087 m_ssRxTrace(fullPacket);
1088 ForwardUp(fullPacket,
1090 GetMacAddress()); // source shall be BS's address or sender SS's?
1091 }
1092 else
1093 {
1094 // This is the first or middle fragment.
1095 // Take the fragment queue, store the fragment into the queue
1096 NS_LOG_INFO("\t Received the first or the middle fragment" << std::endl);
1097 GetConnectionManager()->GetConnection(cid)->FragmentEnqueue(packet);
1098 }
1099 }
1100 }
1101 else if (cid.IsMulticast())
1102 {
1103 m_traceSSRx(packet, GetMacAddress(), cid);
1104 ForwardUp(packet,
1106 GetMacAddress()); // source shall be BS's address or sender SS's?
1107 }
1108 else if (IsPromisc())
1109 {
1110 NotifyPromiscTrace(packet);
1111 m_ssPromiscRxTrace(packet);
1112
1113 // not for me, ignore
1114 }
1115 else
1116 {
1117 // not for me drop
1118 }
1119 }
1120 else
1121 {
1122 // from other SS, ignore
1123 }
1124}
1125
1126void
1128{
1130 m_dcdCount = dlmap.GetDcdCount();
1132 std::list<OfdmDlMapIe> dlMapElements = dlmap.GetDlMapElements();
1133
1134 for (auto iter = dlMapElements.begin(); iter != dlMapElements.end(); ++iter)
1135 {
1136 if (iter->GetDiuc() == OfdmDlBurstProfile::DIUC_END_OF_MAP)
1137 {
1138 break;
1139 }
1140
1141 if (iter->GetCid() == m_basicConnection->GetCid())
1142 {
1143 /*here the SS shall actually acquire the start time it shall start receiving the burst
1144 at. start time is used for power saving which is not implemented here, furthermore
1145 there is no need since the simulator architecture automatically callbacks the receive
1146 function. shall acquire the DIUC (burst profile) as well to decode the burst, again not
1147 required again because the callback mechanism automatically passes it as parameter.*/
1148 }
1149
1150#if 0 /* a template for future implementation following */
1151 uint8_t temp = iter->GetDiuc ();
1152 temp = iter->GetPreamblePresent ();
1153 temp = iter->GetStartTime ();
1154#endif
1155 }
1156}
1157
1158void
1160{
1162 m_ucdCount = ulmap.GetUcdCount();
1164 std::list<OfdmUlMapIe> ulMapElements = ulmap.GetUlMapElements();
1165 m_linkManager->SetRangingIntervalFound(false);
1166
1167 for (auto iter = ulMapElements.begin(); iter != ulMapElements.end(); ++iter)
1168 {
1169 OfdmUlMapIe ulMapIe = *iter;
1170
1172 {
1173 break;
1174 }
1175
1176 Cid cid = ulMapIe.GetCid();
1177
1179 cid == GetBroadcastConnection()->GetCid())
1180 {
1181 m_linkManager->SetRangingIntervalFound(true);
1182 }
1183
1185 {
1186 Time timeToAllocation = GetTimeToAllocation(
1187 Seconds(ulMapIe.GetStartTime() * GetPhy()->GetSymbolDuration().GetSeconds()));
1188
1189 if (ulMapIe.GetUiuc() ==
1190 OfdmUlBurstProfile::UIUC_INITIAL_RANGING) // invited ranging interval
1191
1192 {
1193 m_linkManager->IncrementNrInvitedPollsRecvd();
1195 "SS: Error while processing UL MAP: SS state should be "
1196 "SS_STATE_WAITING_INV_RANG_INTRVL");
1197 Simulator::Schedule(timeToAllocation,
1200 ulMapIe.GetUiuc(),
1201 ulMapIe.GetDuration());
1202 }
1203 else if (ulMapIe.GetUiuc() == OfdmUlBurstProfile::UIUC_REQ_REGION_FULL) // unicast poll
1204
1205 {
1206 Simulator::Schedule(timeToAllocation,
1209 ulMapIe.GetUiuc(),
1210 ulMapIe.GetDuration());
1211 }
1212 else // regular allocation/grant for data, for UGS flows or in response of requests for
1213 // non-UGS flows
1214
1215 {
1216 Ptr<WimaxConnection> connection = nullptr;
1217 Simulator::Schedule(timeToAllocation,
1219 this,
1220 ulMapIe.GetUiuc(),
1221 ulMapIe.GetDuration(),
1222 connection,
1224 }
1225 }
1226 else
1227 {
1229 cid == GetBroadcastConnection()->GetCid()) // regular ranging interval
1230
1231 {
1232 if (GetCurrentUcd().GetChannelEncodings().GetRangReqOppSize() != 0)
1233 {
1234 m_linkManager->SetNrRangingTransOpps(
1235 (ulMapIe.GetDuration() * GetPhy()->GetPsPerSymbol()) /
1236 GetCurrentUcd().GetChannelEncodings().GetRangReqOppSize());
1237 }
1238
1241 {
1242 m_linkManager->StartContentionResolution();
1243 }
1244 }
1245 }
1246 }
1247}
1248
1249void
1251{
1252 m_nrDcdRecvd++;
1253 if (dcd.GetConfigurationChangeCount() == GetCurrentDcd().GetConfigurationChangeCount())
1254 {
1255 return; // nothing new in DCD so don't read
1256 }
1257 SetCurrentDcd(dcd);
1258 OfdmDcdChannelEncodings dcdChnlEncodings = dcd.GetChannelEncodings();
1259
1260 // parameters for initial ranging
1261 m_linkManager->SetBsEirp(dcdChnlEncodings.GetBsEirp());
1262 m_linkManager->SetEirXPIrMax(dcdChnlEncodings.GetEirxPIrMax());
1263
1264 GetPhy()->GetFrameDuration(dcdChnlEncodings.GetFrameDurationCode());
1265
1266 std::vector<OfdmDlBurstProfile> dlBurstProfiles = dcd.GetDlBurstProfiles();
1267
1268 for (auto iter = dlBurstProfiles.begin(); iter != dlBurstProfiles.end(); ++iter)
1269 {
1270 OfdmDlBurstProfile brstProfile = *iter;
1271
1272 /*NS-2 does this, may be not correct, assumes DIUC/UIUC to
1273 modulation type mapping in DCD/UCD may change over time*/
1274 if (brstProfile.GetFecCodeType() == m_modulationType)
1275 {
1277 m_dlBurstProfile->SetDiuc(brstProfile.GetDiuc());
1278 }
1279 }
1280}
1281
1282void
1284{
1285 m_nrUcdRecvd++;
1286 if (!m_linkManager->IsUlChannelUsable())
1287 {
1288 m_linkManager->StartScanning(EVENT_NONE, false);
1289 return;
1290 }
1291
1292 if (ucd.GetConfigurationChangeCount() == GetCurrentUcd().GetConfigurationChangeCount())
1293 {
1294 return; // nothing new in UCD so don't read
1295 }
1296 SetCurrentUcd(ucd);
1297 m_linkManager->SetRangingCW((uint8_t)std::pow(2.0, (double)ucd.GetRangingBackoffStart()) -
1298 1); // initializing ranging CW
1299 OfdmUcdChannelEncodings ucdChnlEncodings = ucd.GetChannelEncodings();
1300
1301 std::vector<OfdmUlBurstProfile> ulBurstProfiles = ucd.GetUlBurstProfiles();
1302
1303 for (auto iter = ulBurstProfiles.begin(); iter != ulBurstProfiles.end(); ++iter)
1304 {
1305 OfdmUlBurstProfile brstProfile = *iter;
1306
1307 /*NS-2 does this, may be not correct, assumes DIUC/UIUC to
1308 modulation type mapping in DCD/UCD may change over time*/
1309 if (brstProfile.GetFecCodeType() == m_modulationType)
1310 {
1312 m_ulBurstProfile->SetUiuc(brstProfile.GetUiuc());
1313 }
1314 }
1315}
1316
1317/*temporarily assuming registered if ranging is complete,
1318 shall actually consider the registration step also */
1319bool
1324
1325Time
1327{
1328 Time timeAlreadyElapsed = Simulator::Now() - m_frameStartTime;
1329 Time timeToUlSubframe =
1330 Seconds(m_allocationStartTime * GetPhy()->GetPsDuration().GetSeconds()) -
1331 timeAlreadyElapsed;
1332 return timeToUlSubframe + deferTime;
1333}
1334
1335void
1337{
1338 if (GetState() == SS_STATE_STOPPED)
1339 {
1340 Simulator::Cancel(eventId); // cancelling this event (already scheduled in function call)
1341 return;
1342 }
1343
1344 event = eventId;
1345}
1346
1347void
1352
1353void
1358
1359void
1364
1365} // namespace ns3
void SendBandwidthRequest(uint8_t uiuc, uint16_t allocationSize)
Send bandwidth request.
void Nullify()
Discard the implementation, set it to null.
Definition callback.h:561
bool IsNull() const
Check for null implementation.
Definition callback.h:555
Cid class.
Definition cid.h:26
@ TRANSPORT
Definition cid.h:35
bool IsMulticast() const
Definition cid.cc:40
uint16_t GetEirxPIrMax() const
Get EIRX IR MAX field.
uint16_t GetBsEirp() const
Get BS EIRP field.
void SetBsEirp(uint16_t bs_eirp)
Set BS EIRP field.
This class implements Downlink channel descriptor as described by "IEEE Standard forLocal and metropo...
void SetNrDlBurstProfiles(uint8_t nrDlBurstProfiles)
Set number DL burst profile field.
std::vector< OfdmDlBurstProfile > GetDlBurstProfiles() const
Get DL burst profile field.
OfdmDcdChannelEncodings GetChannelEncodings() const
Get channel encodings field.
uint8_t GetConfigurationChangeCount() const
Get configuration change count field.
This class implements DL-MAP as described by "IEEE Standard forLocal and metropolitan area networks P...
Mac48Address GetBaseStationId() const
Get base station ID field.
std::list< OfdmDlMapIe > GetDlMapElements() const
Get DL Map elements field.
uint8_t GetDcdCount() const
Get DCD count field.
This class implements the DSA-RSP message described by "IEEE Standard forLocal and metropolitan area ...
An identifier for simulation events.
Definition event-id.h:45
bool IsPending() const
This method is syntactic sugar for !IsExpired().
Definition event-id.cc:65
This class implements the fragmentation sub-header as described by IEEE Standard for Local and metrop...
uint8_t GetFc() const
Get FC field.
This class implements the Generic mac Header as described by IEEE Standard for Local and metropolitan...
uint8_t GetType() const
Get type field.
bool check_hcs() const
Check HCS.
uint8_t GetHt() const
Get HT field.
uint32_t GetSerializedSize() const override
void SetLen(uint16_t len)
Set length field.
void SetCid(Cid cid)
Set CID field.
Cid GetCid() const
Get CID field.
This class implements the grant management sub-header as described by IEEE Standard for Local and met...
void SetPm(uint8_t pm)
Set PM field.
an EUI-48 address
This class Represents the HT (Header Type) field of generic MAC and bandwidth request headers.
HeaderType
Header type enumeration.
uint8_t GetType() const
Get type field.
Mac Management messages Section 6.3.2.3 MAC Management messages page 42, Table 14 page 43.
uint8_t GetType() const
Get type field.
uint32_t GetId() const
Definition node.cc:106
This class implements the OFDM DCD channel encodings as described by "IEEE Standard forLocal and metr...
uint8_t GetFrameDurationCode() const
Get frame duration code field.
This class implements the OFDM Downlink burst profile descriptor as described by "IEEE Standardfor Lo...
uint8_t GetFecCodeType() const
void SetFecCodeType(uint8_t fecCodeType)
Set FEC code type.
void SetDiuc(uint8_t diuc)
Set DIUC field.
This class implements the OFDM UCD channel encodings as described by "IEEE Standard forLocal and metr...
This class implements the UL burst profile as described by "IEEE Standard forLocal and metropolitan a...
void SetUiuc(uint8_t uiuc)
Set UIUC.
void SetFecCodeType(uint8_t fecCodeType)
Set FEC code type.
uint8_t GetFecCodeType() const
Get FEC code type.
uint8_t GetUiuc() const
Get UIUC.
This class implements the UL-MAP_IE message as described by "IEEE Standard forLocal and metropolitan ...
uint16_t GetDuration() const
Get duration.
Cid GetCid() const
Get CID.
uint8_t GetUiuc() const
Get UIUC.
uint16_t GetStartTime() const
Get start time.
AttributeValue implementation for Pointer.
Smart pointer class similar to boost::intrusive_ptr.
This class implements the ranging response message described by "IEEE Standard forLocal and metropoli...
This class implements service flows as described by the IEEE-802.16 standard.
uint32_t GetSfid() const
Get SFID.
uint16_t GetCid() const
Get CID.
bool GetIsEnabled() const
Get is enabled flag.
ServiceFlowRecord * GetRecord() const
Get service flow record.
Ptr< WimaxConnection > GetConnection() const
Can return a null connection is this service flow has not been associated yet to a connection.
this class implements a structure to manage some parameters and statistics related to a service flow
void UpdateBytesRcvd(uint32_t bytesRcvd)
update the number of received bytes by adding bytesRcvd
void UpdatePktsSent(uint32_t pktsSent)
update the number of sent packets by adding pktsSent
void UpdateBytesSent(uint32_t bytesSent)
update the number of sent bytes by adding bytesSent
void UpdatePktsRcvd(uint32_t pktsRcvd)
update the number of received packets by adding pktsRcvd
static EventId Schedule(const Time &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
Definition simulator.h:560
static void Cancel(const EventId &id)
Set the cancel bit on this event: the event's associated function will not be invoked when it expires...
Definition simulator.cc:274
static Time Now()
Return the current simulation virtual time.
Definition simulator.cc:197
static EventId ScheduleNow(FUNC f, Ts &&... args)
Schedule an event to expire Now.
Definition simulator.h:594
SubscriberStationNetDevice subclass of WimaxNetDevice.
void Start() override
Start the device.
Time m_intervalT2
in seconds, wait for broadcast ranging timeout, i.e., wait for initial ranging opportunity
Time m_lostDlMapInterval
in milliseconds, time since last received DL-MAP before downlink synchronization is considered lost,...
Time m_lostUlMapInterval
in milliseconds, time since last received UL-MAP before uplink synchronization is considered lost,...
void DoReceive(Ptr< Packet > packet) override
Receive a packet.
Ptr< SSLinkManager > m_linkManager
link manager
Ptr< WimaxConnection > m_primaryConnection
primary connection
void SetAsciiTxQueueDropCallback(AsciiTraceCallback cb)
Set the Drop callback for ASCII tracing.
TracedCallback< Ptr< const Packet > > m_ssPromiscRxTrace
The trace source fired for packets successfully received by the device immediately before being forwa...
double m_allocationStartTime
allocation start time
EventId m_dcdWaitTimeoutEvent
DCD wait timeout event.
void SetIntervalT21(Time interval21)
OfdmUlBurstProfile * m_ulBurstProfile
UL burst profile.
void SetIntervalT20(Time interval20)
Ptr< SSScheduler > m_scheduler
the scheduler
void SetIpcsPacketClassifier(Ptr< IpcsClassifier > classifier)
Sets the packet classifier to be used.
void SetIntervalT1(Time interval1)
void AddServiceFlow(ServiceFlow *sf) const
adds a new service flow
Time m_intervalT21
in seconds, time the SS searches for (decodable) DL-MAP on a given channel
void SetMaxDcdInterval(Time maxDcdInterval)
void SetAreManagementConnectionsAllocated(bool areManagementConnectionsAllocated)
Ptr< IpcsClassifier > m_classifier
the classifier
uint32_t m_nrUlMapRecvd
number UL map received
AsciiTraceCallback m_asciiTxQueueDropCb
Bound callback to perform ASCII logging for Drop events.
WimaxPhy::ModulationType m_modulationType
modulation type
uint8_t GetMaxContentionRangingRetries() const
uint32_t m_nrDcdRecvd
number DCD received
void SetAsciiTxQueueDequeueCallback(AsciiTraceCallback cb)
Set the Dequeue callback for ASCII tracing.
void SetScheduler(Ptr< SSScheduler > ssScheduler)
AsciiTraceCallback m_asciiTxQueueEnqueueCb
Bound callback to perform ASCII logging for Enqueue events.
bool DoSend(Ptr< Packet > packet, const Mac48Address &source, const Mac48Address &dest, uint16_t protocolNumber) override
Send a packet.
Ptr< SSScheduler > GetScheduler() const
void SetBasicConnection(Ptr< WimaxConnection > basicConnection)
AsciiTraceCallback m_asciiTxQueueDequeueCb
Bound callback to perform ASCII logging for Dequeue events.
bool m_areManagementConnectionsAllocated
are management connections allocated
Time m_intervalT20
in seconds, time the SS searches for preambles on a given channel
Ptr< IpcsClassifier > GetIpcsClassifier() const
void SetLostUlMapInterval(Time lostUlMapInterval)
Time m_intervalT1
in seconds, wait for DCD timeout
void SetPrimaryConnection(Ptr< WimaxConnection > primaryConnection)
void ProcessUcd(const Ucd &ucd)
Process UCD.
void SetTimer(EventId eventId, EventId &event)
Set timer.
Ptr< WimaxConnection > GetBasicConnection() const
uint8_t m_maxContentionRangingRetries
maximum contention ranging retries
static TypeId GetTypeId()
Get the type ID.
EventId m_ucdWaitTimeoutEvent
UCD wait timeout event.
TracedCallback< Ptr< const Packet > > m_ssRxTrace
The trace source fired for packets successfully received by the device immediately before being forwa...
EventId m_rangOppWaitTimeoutEvent
range opp wait timeout event
TracedCallback< Ptr< const Packet > > m_ssTxDropTrace
The trace source fired when packets coming into the "top" of the device are dropped at the MAC layer ...
Mac48Address m_baseStationId
base station ID
void SetMaxContentionRangingRetries(uint8_t maxContentionRangingRetries)
void ProcessDlMap(const DlMap &dlmap)
Process DL map.
void ProcessDcd(const Dcd &dcd)
Process DCD.
void SetIntervalT2(Time interval2)
Time m_maxUcdInterval
in seconds, maximum time between transmission of UCD messages
Time GetTimeToAllocation(Time deferTime)
Get time to allocation.
static Time GetDefaultLostDlMapInterval()
Get default lost DL map interval.
void SetIntervalT12(Time interval12)
void SetIntervalT3(Time interval3)
TracedCallback< Ptr< const Packet > > m_ssRxDropTrace
The trace source fired when packets coming into the "top" of the device are dropped at the MAC layer ...
bool m_areServiceFlowsAllocated
are service flows allocated
void SetAsciiTxQueueEnqueueCallback(AsciiTraceCallback cb)
Set the Enqueue callback for ASCII tracing.
bool GetAreManagementConnectionsAllocated() const
bool Enqueue(Ptr< Packet > packet, const MacHeaderType &hdrType, Ptr< WimaxConnection > connection) override
Enqueue a packet into a connection queue.
EventId m_lostDlMapEvent
lost DL map event
void SetLostDlMapInterval(Time lostDlMapInterval)
Ptr< SsServiceFlowManager > m_serviceFlowManager
the service flow manager
Time m_intervalT12
in seconds, wait for UCD descriptor
void SetLinkManager(Ptr< SSLinkManager > linkManager)
sets the link manager to be used
void SetIntervalT7(Time interval7)
Time m_maxDcdInterval
in seconds, maximum time between transmission of DCD messages
TracedCallback< Ptr< const Packet >, Mac48Address, const Cid & > m_traceSSRx
trace SS receive callback
Time m_intervalT3
in milliseconds, ranging Response reception timeout following the transmission of a ranging request
Ptr< SSLinkManager > GetLinkManager() const
void Stop() override
Stop the device.
WimaxPhy::ModulationType GetModulationType() const
void SetServiceFlowManager(Ptr< SsServiceFlowManager > sfm)
Sets the service flow manager to be installed on the device.
uint32_t m_nrDlMapRecvd
number DL map received
void SetAreServiceFlowsAllocated(bool areServiceFlowsAllocated)
void ProcessUlMap(const UlMap &ulmap)
Process UL map.
Ptr< WimaxConnection > m_basicConnection
basic connection
Ptr< SsServiceFlowManager > GetServiceFlowManager() const
OfdmDlBurstProfile * m_dlBurstProfile
DL burst profile.
uint16_t m_nrDlMapElements
number DL Map elements
TracedCallback< Ptr< const Packet > > m_ssTxTrace
The trace source fired when packets come into the "top" of the device at the L3/L2 transition,...
uint32_t m_nrUcdRecvd
number UCD received
void InitSubscriberStationNetDevice()
initializes the net device and sets the parameters to the default values
Ptr< WimaxConnection > GetPrimaryConnection() const
void SetModulationType(WimaxPhy::ModulationType modulationType)
Set the most efficient modulation and coding scheme (MCS) supported by the device.
void DoDispose() override
Destructor implementation.
void SendBurst(uint8_t uiuc, uint16_t nrSymbols, Ptr< WimaxConnection > connection, MacHeaderType::HeaderType packetType=MacHeaderType::HEADER_TYPE_GENERIC)
Sends a burst on the uplink frame.
uint16_t m_nrUlMapElements
number UL Map elements
Time m_intervalT7
in seconds, wait for DSA/DSC/DSD Response timeout
void SetMaxUcdInterval(Time maxUcdInterval)
EventId m_lostUlMapEvent
lost UL map event
Simulation virtual time values and global simulation resolution.
Definition nstime.h:94
double GetSeconds() const
Get an approximation of the time stored in this instance in the indicated unit.
Definition nstime.h:392
a unique identifier for an interface.
Definition type-id.h:48
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition type-id.cc:1001
This class implements the UCD message as described by "IEEE Standard forLocal and metropolitan area n...
void SetNrUlBurstProfiles(uint8_t nrUlBurstProfiles)
Set NR UL burst profiles.
std::vector< OfdmUlBurstProfile > GetUlBurstProfiles() const
Get UL burst profiles.
uint8_t GetConfigurationChangeCount() const
Get configuration change count.
OfdmUcdChannelEncodings GetChannelEncodings() const
Get channel encodings.
uint8_t GetRangingBackoffStart() const
Get ranging backoff start.
Hold an unsigned integer type.
Definition uinteger.h:34
This class implements the UL-MAP_IE message as described by "IEEE Standard forLocal and metropolitan ...
std::list< OfdmUlMapIe > GetUlMapElements() const
Get UL map elements.
uint32_t GetAllocationStartTime() const
Get allocation start time.
uint8_t GetUcdCount() const
Get UCD count.
std::list< Ptr< const Packet > > FragmentsQueue
Definition of Fragments Queue data type.
Hold together all WiMAX-related objects in a NetDevice.
void DoDispose() override
Destructor implementation.
Ptr< ConnectionManager > GetConnectionManager() const
Get the connection manager of the device.
uint32_t GetIfIndex() const override
Get interface index.
Ucd GetCurrentUcd() const
Get the current UCD.
void SetPhy(Ptr< WimaxPhy > phy)
Set the physical layer object.
uint8_t GetState() const
Get the device state.
void SetCurrentUcd(Ucd ucd)
Set the current UCD.
Ptr< Node > GetNode() const override
Get node pointer.
static Time m_frameStartTime
temp, to determine the frame start time at SS side, shall actually be determined by frame start pream...
void SetState(uint8_t state)
Set the device state.
Ptr< WimaxConnection > GetInitialRangingConnection() const
Get the initial ranging connection.
Ptr< WimaxPhy > GetPhy() const
Get the physical layer object.
Ptr< BandwidthManager > GetBandwidthManager() const
Get the bandwidth manager on the device.
Ptr< WimaxConnection > GetBroadcastConnection() const
Get the broadcast connection.
bool IsPromisc()
Check if device is promiscuous.
void CreateDefaultConnections()
Creates the initial ranging and broadcast connections.
void SetCurrentDcd(Dcd dcd)
Set the current DCD.
void SetReceiveCallback()
Set receive callback function.
Mac48Address GetMacAddress() const
Get the MAC address.
void SetNode(Ptr< Node > node) override
Set node pointer.
void NotifyPromiscTrace(Ptr< Packet > p)
Notify promiscuous trace of a packet arrival.
void ForwardUp(Ptr< Packet > packet, const Mac48Address &source, const Mac48Address &dest)
Forward a packet to the next layer above the device.
Ptr< BurstProfileManager > GetBurstProfileManager() const
Get the burst profile manager.
Dcd GetCurrentDcd() const
Get the current DCD.
void ForwardDown(Ptr< PacketBurst > burst, WimaxPhy::ModulationType modulationType)
Forward a packet down the stack.
ModulationType
ModulationType enumeration.
Definition wimax-phy.h:43
@ MODULATION_TYPE_BPSK_12
Definition wimax-phy.h:44
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
Definition assert.h:75
Ptr< const AttributeAccessor > MakePointerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Definition pointer.h:248
Ptr< AttributeChecker > MakePointerChecker()
Create a PointerChecker for a type.
Definition pointer.h:269
void Connect(std::string path, const CallbackBase &cb)
Definition config.cc:967
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
#define NS_LOG_ERROR(msg)
Use NS_LOG to output a message of level LOG_ERROR.
Definition log.h:243
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition log.h:191
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Definition log.h:257
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
Definition log.h:264
Ptr< T > CreateObject(Args &&... args)
Create an object by type, with varying number of constructor parameters.
Definition object.h:619
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition object-base.h:35
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
Definition ptr.h:436
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition nstime.h:1332
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition nstime.h:1308
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition nstime.h:1320
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Create a TraceSourceAccessor which will control access to the underlying trace source.
void(* Time)(Time oldValue, Time newValue)
TracedValue callback signature for Time.
Definition nstime.h:828
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ptr< const AttributeChecker > MakeUintegerChecker()
Definition uinteger.h:85
Ptr< const AttributeAccessor > MakeTimeAccessor(T1 a1)
Definition nstime.h:1396
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Definition uinteger.h:35
Ptr< const AttributeChecker > MakeTimeChecker()
Helper to make an unbounded Time checker.
Definition nstime.h:1416
uint32_t pktSize
packet size used for the simulation (in bytes)