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, SFID: " << connection->GetServiceFlow()->GetSfid()
786 << ", pkts sent: " << record->GetPktsSent()
787 << ", pkts rcvd: " << record->GetPktsRcvd()
788 << ", bytes sent: " << record->GetBytesSent()
789 << ", bytes rcvd: " << record->GetBytesRcvd());
790 }
791
792 ForwardDown(burst, modulationType);
793}
794
795void
797{
798 GenericMacHeader gnrcMacHdr;
799 ManagementMessageType msgType;
800 RngRsp rngrsp;
801 Cid cid;
802 uint32_t pktSize = packet->GetSize();
803 packet->RemoveHeader(gnrcMacHdr);
804 FragmentationSubheader fragSubhdr;
805 bool fragmentation = false; // it becomes true when there is a fragmentation subheader
806
807 if (gnrcMacHdr.GetHt() == MacHeaderType::HEADER_TYPE_GENERIC)
808 {
809 if (!gnrcMacHdr.check_hcs())
810 {
811 // The header is noisy
812 NS_LOG_INFO("Header HCS ERROR");
813 m_ssRxDropTrace(packet);
814 return;
815 }
816
817 cid = gnrcMacHdr.GetCid();
818
819 // checking for subheaders
820 uint8_t type = gnrcMacHdr.GetType();
821 if (type)
822 {
823 // Check if there is a fragmentation Subheader
824 uint8_t tmpType = type;
825 if (((tmpType >> 2) & 1) == 1)
826 {
827 // a TRANSPORT packet with fragmentation subheader has been received!
828 fragmentation = true;
829 NS_LOG_INFO("SS DoReceive -> the packet is a fragment" << std::endl);
830 }
831 }
832
833 if (cid == GetBroadcastConnection()->GetCid() && !fragmentation)
834 {
835 packet->RemoveHeader(msgType);
836 switch (msgType.GetType())
837 {
840 {
841 Simulator::Cancel(m_linkManager->GetDlMapSyncTimeoutEvent());
842 }
843
845 {
847 }
848
849 m_linkManager->ScheduleScanningRestart(m_lostDlMapInterval,
851 false,
853
855 {
857 }
858
859 m_linkManager->ScheduleScanningRestart(m_intervalT1,
861 false,
863
865 {
867 }
868
869 m_linkManager->ScheduleScanningRestart(m_intervalT12,
871 true,
873
874 DlMap dlmap;
875 packet->RemoveHeader(dlmap);
876 ProcessDlMap(dlmap);
877 break;
878 }
881 {
883 m_linkManager->ScheduleScanningRestart(m_lostUlMapInterval,
885 true,
887 }
888
889 UlMap ulmap;
890 packet->RemoveHeader(ulmap);
891
892 ProcessUlMap(ulmap);
893
895 {
896 if (m_linkManager->GetRangingIntervalFound())
897 {
899 {
901 }
902 m_linkManager->PerformBackoff();
903 }
904 }
905 break;
906 }
909 {
911 }
912
914 {
916 m_linkManager->ScheduleScanningRestart(m_intervalT1,
918 false,
920 }
921
922 Dcd dcd;
923 // number of burst profiles is set to number of DL-MAP IEs after processing DL-MAP,
924 // not a very good solution dcd.SetNrDlBurstProfiles (m_nrDlMapElements);
926 packet->RemoveHeader(dcd);
927
928 ProcessDcd(dcd);
929 break;
930 }
932 Ucd ucd;
933 // number of burst profiles is set to number of UL-MAP IEs after processing UL-MAP,
934 // not a very good solution ucd.SetNrUlBurstProfiles (m_nrUlMapElements);
936 packet->RemoveHeader(ucd);
937
938 ProcessUcd(ucd);
939
941 {
943 m_linkManager->ScheduleScanningRestart(m_intervalT12,
945 true,
947 }
948
950 {
951 /*state indicating that SS has completed scanning, synchronization and parameter
952 acquisition successfully and now waiting for UL-MAP to start initial ranging.*/
954
955 m_linkManager->ScheduleScanningRestart(m_intervalT2,
957 false,
959 m_linkManager->ScheduleScanningRestart(m_lostUlMapInterval,
961 true,
963 }
964 break;
965 }
966 default:
967 NS_FATAL_ERROR("Invalid management message type");
968 }
969 }
970 else if (GetInitialRangingConnection() && cid == GetInitialRangingConnection()->GetCid() &&
971 !fragmentation)
972 {
973 m_traceSSRx(packet, GetMacAddress(), cid);
974 packet->RemoveHeader(msgType);
975 switch (msgType.GetType())
976 {
978 // intended for base station, ignore
979 break;
982 "SS: Error while receiving a ranging response message: SS state "
983 "should be at least SS_STATE_WAITING_REG_RANG_INTRVL");
984 packet->RemoveHeader(rngrsp);
985 m_linkManager->PerformRanging(cid, rngrsp);
986 break;
987 default:
988 NS_LOG_ERROR("Invalid management message type");
989 }
990 }
991 else if (m_basicConnection && cid == m_basicConnection->GetCid() && !fragmentation)
992 {
993 m_traceSSRx(packet, GetMacAddress(), cid);
994 packet->RemoveHeader(msgType);
995 switch (msgType.GetType())
996 {
998 // intended for base station, ignore
999 break;
1002 "SS: Error while receiving a ranging response message: SS state "
1003 "should be SS_STATE_WAITING_RNG_RSP");
1004 packet->RemoveHeader(rngrsp);
1005 m_linkManager->PerformRanging(cid, rngrsp);
1006 break;
1007 default:
1008 NS_LOG_ERROR("Invalid management message type");
1009 }
1010 }
1011 else if (m_primaryConnection && cid == m_primaryConnection->GetCid() && !fragmentation)
1012 {
1013 m_traceSSRx(packet, GetMacAddress(), cid);
1014 packet->RemoveHeader(msgType);
1015 switch (msgType.GetType())
1016 {
1018 // not yet implemented
1020 // intended for base station, ignore
1022 /*from other station as DSA initiation
1023 by BS is not supported, ignore*/
1024 break;
1026 Simulator::Cancel(GetServiceFlowManager()->GetDsaRspTimeoutEvent());
1027 DsaRsp dsaRsp;
1028 packet->RemoveHeader(dsaRsp);
1029 GetServiceFlowManager()->ProcessDsaRsp(dsaRsp);
1030 break;
1031 }
1033 /*from other station as DSA initiation
1034 by BS is not supported, ignore*/
1035 break;
1036 default:
1037 NS_LOG_ERROR("Invalid management message type");
1038 }
1039 }
1040 else if (GetConnectionManager()->GetConnection(cid)) // transport connection
1041 {
1042 ServiceFlow* serviceFlow = GetConnectionManager()->GetConnection(cid)->GetServiceFlow();
1043 ServiceFlowRecord* record = serviceFlow->GetRecord();
1044
1045 record->UpdatePktsRcvd(1);
1046 record->UpdateBytesRcvd(pktSize);
1047
1048 // If fragmentation is true, the packet is a fragment.
1049 if (!fragmentation)
1050 {
1051 m_ssRxTrace(packet);
1052 ForwardUp(packet,
1054 GetMacAddress()); // source shall be BS's address or sender SS's?
1055 }
1056 else
1057 {
1058 NS_LOG_INFO("FRAG_DEBUG: SS DoReceive, the Packet is a fragment" << std::endl);
1059 packet->RemoveHeader(fragSubhdr);
1060 uint32_t fc = fragSubhdr.GetFc();
1061 NS_LOG_INFO("\t fragment size = " << packet->GetSize() << std::endl);
1062
1063 if (fc == 2)
1064 {
1065 // This is the latest fragment.
1066 // Take the fragment queue, defragment a packet and send it to the upper layer
1067 NS_LOG_INFO("\t Received the latest fragment" << std::endl);
1068 GetConnectionManager()->GetConnection(cid)->FragmentEnqueue(packet);
1069
1070 WimaxConnection::FragmentsQueue fragmentsQueue =
1071 GetConnectionManager()->GetConnection(cid)->GetFragmentsQueue();
1072
1073 Ptr<Packet> fullPacket = Create<Packet>();
1074
1075 // DEFRAGMENTATION
1076 NS_LOG_INFO("\t SS PACKET DEFRAGMENTATION" << std::endl);
1077 for (auto iter = fragmentsQueue.begin(); iter != fragmentsQueue.end(); ++iter)
1078 {
1079 // Create the whole Packet
1080 fullPacket->AddAtEnd(*iter);
1081 }
1082 GetConnectionManager()->GetConnection(cid)->ClearFragmentsQueue();
1083 NS_LOG_INFO("\t fullPacket size = " << fullPacket->GetSize() << std::endl);
1084
1085 m_ssRxTrace(fullPacket);
1086 ForwardUp(fullPacket,
1088 GetMacAddress()); // source shall be BS's address or sender SS's?
1089 }
1090 else
1091 {
1092 // This is the first or middle fragment.
1093 // Take the fragment queue, store the fragment into the queue
1094 NS_LOG_INFO("\t Received the first or the middle fragment" << std::endl);
1095 GetConnectionManager()->GetConnection(cid)->FragmentEnqueue(packet);
1096 }
1097 }
1098 }
1099 else if (cid.IsMulticast())
1100 {
1101 m_traceSSRx(packet, GetMacAddress(), cid);
1102 ForwardUp(packet,
1104 GetMacAddress()); // source shall be BS's address or sender SS's?
1105 }
1106 else if (IsPromisc())
1107 {
1108 NotifyPromiscTrace(packet);
1109 m_ssPromiscRxTrace(packet);
1110
1111 // not for me, ignore
1112 }
1113 else
1114 {
1115 // not for me drop
1116 }
1117 }
1118 else
1119 {
1120 // from other SS, ignore
1121 }
1122}
1123
1124void
1126{
1128 m_dcdCount = dlmap.GetDcdCount();
1130 std::list<OfdmDlMapIe> dlMapElements = dlmap.GetDlMapElements();
1131
1132 for (auto iter = dlMapElements.begin(); iter != dlMapElements.end(); ++iter)
1133 {
1134 if (iter->GetDiuc() == OfdmDlBurstProfile::DIUC_END_OF_MAP)
1135 {
1136 break;
1137 }
1138
1139 if (iter->GetCid() == m_basicConnection->GetCid())
1140 {
1141 /*here the SS shall actually acquire the start time it shall start receiving the burst
1142 at. start time is used for power saving which is not implemented here, furthermore
1143 there is no need since the simulator architecture automatically callbacks the receive
1144 function. shall acquire the DIUC (burst profile) as well to decode the burst, again not
1145 required again because the callback mechanism automatically passes it as parameter.*/
1146 }
1147
1148#if 0 /* a template for future implementation following */
1149 uint8_t temp = iter->GetDiuc ();
1150 temp = iter->GetPreamblePresent ();
1151 temp = iter->GetStartTime ();
1152#endif
1153 }
1154}
1155
1156void
1158{
1160 m_ucdCount = ulmap.GetUcdCount();
1162 const auto& ulMapElements = ulmap.GetUlMapElements();
1163 m_linkManager->SetRangingIntervalFound(false);
1164
1165 for (const auto& ulMapIe : ulMapElements)
1166 {
1167 if (ulMapIe.GetUiuc() == OfdmUlBurstProfile::UIUC_END_OF_MAP)
1168 {
1169 break;
1170 }
1171
1172 Cid cid = ulMapIe.GetCid();
1173
1174 if (ulMapIe.GetUiuc() == OfdmUlBurstProfile::UIUC_INITIAL_RANGING &&
1175 cid == GetBroadcastConnection()->GetCid())
1176 {
1177 m_linkManager->SetRangingIntervalFound(true);
1178 }
1179
1181 {
1182 Time timeToAllocation = GetTimeToAllocation(
1183 Seconds(ulMapIe.GetStartTime() * GetPhy()->GetSymbolDuration().GetSeconds()));
1184
1185 if (ulMapIe.GetUiuc() ==
1186 OfdmUlBurstProfile::UIUC_INITIAL_RANGING) // invited ranging interval
1187
1188 {
1189 m_linkManager->IncrementNrInvitedPollsRecvd();
1191 "SS: Error while processing UL MAP: SS state should be "
1192 "SS_STATE_WAITING_INV_RANG_INTRVL");
1193 Simulator::Schedule(timeToAllocation,
1196 ulMapIe.GetUiuc(),
1197 ulMapIe.GetDuration());
1198 }
1199 else if (ulMapIe.GetUiuc() == OfdmUlBurstProfile::UIUC_REQ_REGION_FULL) // unicast poll
1200
1201 {
1202 Simulator::Schedule(timeToAllocation,
1205 ulMapIe.GetUiuc(),
1206 ulMapIe.GetDuration());
1207 }
1208 else // regular allocation/grant for data, for UGS flows or in response of requests for
1209 // non-UGS flows
1210
1211 {
1212 Ptr<WimaxConnection> connection = nullptr;
1213 Simulator::Schedule(timeToAllocation,
1215 this,
1216 ulMapIe.GetUiuc(),
1217 ulMapIe.GetDuration(),
1218 connection,
1220 }
1221 }
1222 else
1223 {
1224 if (ulMapIe.GetUiuc() == OfdmUlBurstProfile::UIUC_INITIAL_RANGING &&
1225 cid == GetBroadcastConnection()->GetCid()) // regular ranging interval
1226
1227 {
1228 if (GetCurrentUcd().GetChannelEncodings().GetRangReqOppSize() != 0)
1229 {
1230 m_linkManager->SetNrRangingTransOpps(
1231 (ulMapIe.GetDuration() * GetPhy()->GetPsPerSymbol()) /
1232 GetCurrentUcd().GetChannelEncodings().GetRangReqOppSize());
1233 }
1234
1237 {
1238 m_linkManager->StartContentionResolution();
1239 }
1240 }
1241 }
1242 }
1243}
1244
1245void
1247{
1248 m_nrDcdRecvd++;
1249 if (dcd.GetConfigurationChangeCount() == GetCurrentDcd().GetConfigurationChangeCount())
1250 {
1251 return; // nothing new in DCD so don't read
1252 }
1253 SetCurrentDcd(dcd);
1254 OfdmDcdChannelEncodings dcdChnlEncodings = dcd.GetChannelEncodings();
1255
1256 // parameters for initial ranging
1257 m_linkManager->SetBsEirp(dcdChnlEncodings.GetBsEirp());
1258 m_linkManager->SetEirXPIrMax(dcdChnlEncodings.GetEirxPIrMax());
1259
1260 GetPhy()->GetFrameDuration(dcdChnlEncodings.GetFrameDurationCode());
1261
1262 const auto& dlBurstProfiles = dcd.GetDlBurstProfiles();
1263
1264 for (const auto& brstProfile : dlBurstProfiles)
1265 {
1266 /*NS-2 does this, may be not correct, assumes DIUC/UIUC to
1267 modulation type mapping in DCD/UCD may change over time*/
1268 if (brstProfile.GetFecCodeType() == m_modulationType)
1269 {
1270 m_dlBurstProfile->SetFecCodeType(brstProfile.GetFecCodeType());
1271 m_dlBurstProfile->SetDiuc(brstProfile.GetDiuc());
1272 }
1273 }
1274}
1275
1276void
1278{
1279 m_nrUcdRecvd++;
1280 if (!m_linkManager->IsUlChannelUsable())
1281 {
1282 m_linkManager->StartScanning(EVENT_NONE, false);
1283 return;
1284 }
1285
1286 if (ucd.GetConfigurationChangeCount() == GetCurrentUcd().GetConfigurationChangeCount())
1287 {
1288 return; // nothing new in UCD so don't read
1289 }
1290 SetCurrentUcd(ucd);
1291 m_linkManager->SetRangingCW((uint8_t)std::pow(2.0, (double)ucd.GetRangingBackoffStart()) -
1292 1); // initializing ranging CW
1293 OfdmUcdChannelEncodings ucdChnlEncodings = ucd.GetChannelEncodings();
1294
1295 const auto& ulBurstProfiles = ucd.GetUlBurstProfiles();
1296 for (const auto& brstProfile : ulBurstProfiles)
1297 {
1298 /*NS-2 does this, may be not correct, assumes DIUC/UIUC to
1299 modulation type mapping in DCD/UCD may change over time*/
1300 if (brstProfile.GetFecCodeType() == m_modulationType)
1301 {
1302 m_ulBurstProfile->SetFecCodeType(brstProfile.GetFecCodeType());
1303 m_ulBurstProfile->SetUiuc(brstProfile.GetUiuc());
1304 }
1305 }
1306}
1307
1308/*temporarily assuming registered if ranging is complete,
1309 shall actually consider the registration step also */
1310bool
1315
1316Time
1318{
1319 Time timeAlreadyElapsed = Simulator::Now() - m_frameStartTime;
1320 Time timeToUlSubframe =
1321 Seconds(m_allocationStartTime * GetPhy()->GetPsDuration().GetSeconds()) -
1322 timeAlreadyElapsed;
1323 return timeToUlSubframe + deferTime;
1324}
1325
1326void
1328{
1329 if (GetState() == SS_STATE_STOPPED)
1330 {
1331 Simulator::Cancel(eventId); // cancelling this event (already scheduled in function call)
1332 return;
1333 }
1334
1335 event = eventId;
1336}
1337
1338void
1343
1344void
1349
1350void
1355
1356} // 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...
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.
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:561
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:595
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
AttributeValue implementation for Time.
Definition nstime.h:1432
a unique identifier for an interface.
Definition type-id.h:49
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
Ptr< const AttributeAccessor > MakeTimeAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Definition nstime.h:1433
Ptr< const AttributeChecker > MakeTimeChecker()
Helper to make an unbounded Time checker.
Definition nstime.h:1453
Ptr< const AttributeChecker > MakeUintegerChecker()
Definition uinteger.h:85
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Definition uinteger.h:35
void Connect(std::string path, const CallbackBase &cb)
Definition config.cc:970
#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:1369
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition nstime.h:1345
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition nstime.h:1357
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:865
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint32_t pktSize
packet size used for the simulation (in bytes)