A Discrete-Event Network Simulator
API
lte-test-entities.cc
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation;
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16  *
17  * Author: Manuel Requena <manuel.requena@cttc.es>
18  */
19 
20 #include "lte-test-entities.h"
21 
22 #include "ns3/log.h"
23 #include "ns3/lte-pdcp-header.h"
24 #include "ns3/lte-rlc-am-header.h"
25 #include "ns3/lte-rlc-header.h"
26 #include "ns3/node.h"
27 #include "ns3/simulator.h"
28 
29 namespace ns3
30 {
31 
32 NS_LOG_COMPONENT_DEFINE("LteTestEntities");
33 
35 
36 TypeId
38 {
39  static TypeId tid = TypeId("ns3::LteTestRrc").SetParent<Object>().AddConstructor<LteTestRrc>();
40 
41  return tid;
42 }
43 
45 {
46  NS_LOG_FUNCTION(this);
47 
48  m_txPdus = 0;
49  m_txBytes = 0;
50  m_rxPdus = 0;
51  m_rxBytes = 0;
52  m_txLastTime = Time(0);
53  m_rxLastTime = Time(0);
54 
56  // Simulator::ScheduleNow (&LteTestRrc::Start, this);
57 }
58 
60 {
61  NS_LOG_FUNCTION(this);
62 }
63 
64 void
66 {
67  NS_LOG_FUNCTION(this);
68  delete m_pdcpSapUser;
69 }
70 
71 void
73 {
74  m_device = device;
75 }
76 
77 void
79 {
81 }
82 
85 {
86  return m_pdcpSapUser;
87 }
88 
89 std::string
91 {
92  NS_LOG_FUNCTION(this);
93  return m_receivedData;
94 }
95 
96 // Stats
97 uint32_t
99 {
100  NS_LOG_FUNCTION(this << m_txPdus);
101  return m_txPdus;
102 }
103 
104 uint32_t
106 {
107  NS_LOG_FUNCTION(this << m_txBytes);
108  return m_txBytes;
109 }
110 
111 uint32_t
113 {
114  NS_LOG_FUNCTION(this << m_rxPdus);
115  return m_rxPdus;
116 }
117 
118 uint32_t
120 {
121  NS_LOG_FUNCTION(this << m_rxBytes);
122  return m_rxBytes;
123 }
124 
125 Time
127 {
128  NS_LOG_FUNCTION(this << m_txLastTime);
129  return m_txLastTime;
130 }
131 
132 Time
134 {
135  NS_LOG_FUNCTION(this << m_rxLastTime);
136  return m_rxLastTime;
137 }
138 
139 void
141 {
142  NS_LOG_FUNCTION(this << arrivalTime);
143  m_arrivalTime = arrivalTime;
144 }
145 
146 void
147 LteTestRrc::SetPduSize(uint32_t pduSize)
148 {
149  NS_LOG_FUNCTION(this << pduSize);
150  m_pduSize = pduSize;
151 }
152 
157 void
159 {
160  NS_LOG_FUNCTION(this << params.pdcpSdu->GetSize());
161  Ptr<Packet> p = params.pdcpSdu;
162  // NS_LOG_LOGIC ("PDU received = " << (*p));
163 
164  uint32_t dataLen = p->GetSize();
165  auto buf = new uint8_t[dataLen];
166 
167  // Stats
168  m_rxPdus++;
169  m_rxBytes += dataLen;
171 
172  p->CopyData(buf, dataLen);
173  m_receivedData = std::string((char*)buf, dataLen);
174 
175  // NS_LOG_LOGIC (m_receivedData);
176 
177  delete[] buf;
178 }
179 
184 void
186 {
187  NS_LOG_FUNCTION(this);
188  NS_ASSERT_MSG(m_arrivalTime != Time(0), "Arrival time must be different from 0");
189 
190  // Stats
191  m_txPdus++;
192  m_txBytes += m_pduSize;
194 
196  p.rnti = 1111;
197  p.lcid = 222;
198  p.pdcpSdu = Create<Packet>(m_pduSize);
199 
200  bool haveContext = false;
201  Ptr<Node> node;
202  if (m_device)
203  {
204  node = m_device->GetNode();
205  if (node)
206  {
207  haveContext = true;
208  }
209  }
210  if (haveContext)
211  {
213  Seconds(0),
216  p);
217  }
218  else
219  {
221  }
222 
224  // Simulator::Run ();
225 }
226 
227 void
229 {
230  NS_LOG_FUNCTION(this);
231  m_nextPdu.Cancel();
232 }
233 
234 void
235 LteTestRrc::SendData(Time at, std::string dataToSend)
236 {
237  NS_LOG_FUNCTION(this << at << dataToSend.length() << dataToSend);
238 
239  // Stats
240  m_txPdus++;
241  m_txBytes += dataToSend.length();
242 
244  p.rnti = 1111;
245  p.lcid = 222;
246 
247  NS_LOG_LOGIC("Data(" << dataToSend.length() << ") = " << dataToSend.data());
248  p.pdcpSdu = Create<Packet>((uint8_t*)dataToSend.data(), dataToSend.length());
249 
250  NS_LOG_LOGIC("Packet(" << p.pdcpSdu->GetSize() << ")");
252 }
253 
255 
256 TypeId
258 {
259  static TypeId tid =
260  TypeId("ns3::LteTestPdcp").SetParent<Object>().AddConstructor<LteTestPdcp>();
261 
262  return tid;
263 }
264 
266 {
267  NS_LOG_FUNCTION(this);
270 }
271 
273 {
274  NS_LOG_FUNCTION(this);
275 }
276 
277 void
279 {
280  NS_LOG_FUNCTION(this);
281  delete m_rlcSapUser;
282 }
283 
284 void
286 {
287  m_rlcSapProvider = s;
288 }
289 
292 {
293  return m_rlcSapUser;
294 }
295 
296 std::string
298 {
299  NS_LOG_FUNCTION(this);
300 
301  return m_receivedData;
302 }
303 
308 void
310 {
311  NS_LOG_FUNCTION(this << p->GetSize());
312  NS_LOG_LOGIC("Data = " << (*p));
313 
314  uint32_t dataLen = p->GetSize();
315  auto buf = new uint8_t[dataLen];
316  p->CopyData(buf, dataLen);
317  m_receivedData = std::string((char*)buf, dataLen);
318 
320 
321  delete[] buf;
322 }
323 
328 void
330 {
331  NS_LOG_FUNCTION(this);
332 }
333 
334 void
335 LteTestPdcp::SendData(Time time, std::string dataToSend)
336 {
337  NS_LOG_FUNCTION(this << time << dataToSend.length() << dataToSend);
338 
340  p.rnti = 1111;
341  p.lcid = 222;
342 
343  NS_LOG_LOGIC("Data(" << dataToSend.length() << ") = " << dataToSend.data());
344  p.pdcpPdu = Create<Packet>((uint8_t*)dataToSend.data(), dataToSend.length());
345 
346  NS_LOG_LOGIC("Packet(" << p.pdcpPdu->GetSize() << ")");
348 }
349 
351 
352 TypeId
354 {
355  static TypeId tid = TypeId("ns3::LteTestMac").SetParent<Object>().AddConstructor<LteTestMac>();
356 
357  return tid;
358 }
359 
361 {
362  NS_LOG_FUNCTION(this);
363  m_device = nullptr;
365  m_macSapUser = nullptr;
366  m_macLoopback = nullptr;
367  m_pdcpHeaderPresent = false;
370  m_txOppTime = Seconds(0.001);
371  m_txOppSize = 0;
372 
373  m_txPdus = 0;
374  m_txBytes = 0;
375  m_rxPdus = 0;
376  m_rxBytes = 0;
377 
378  // m_cmacSapProvider = new EnbMacMemberLteEnbCmacSapProvider (this);
379  // m_schedSapUser = new EnbMacMemberFfMacSchedSapUser (this);
380  // m_cschedSapUser = new EnbMacMemberFfMacCschedSapUser (this);
381  // m_enbPhySapUser = new EnbMacMemberLteEnbPhySapUser (this);
382 }
383 
385 {
386  NS_LOG_FUNCTION(this);
387 }
388 
389 void
391 {
392  NS_LOG_FUNCTION(this);
393  delete m_macSapProvider;
394  // delete m_cmacSapProvider;
395  // delete m_schedSapUser;
396  // delete m_cschedSapUser;
397  // delete m_enbPhySapUser;
398 
399  m_device = nullptr;
400 }
401 
402 void
404 {
405  m_device = device;
406 }
407 
408 void
410 {
411  m_macSapUser = s;
412 }
413 
416 {
417  return m_macSapProvider;
418 }
419 
420 void
422 {
423  m_macLoopback = s;
424 }
425 
426 std::string
428 {
429  NS_LOG_FUNCTION(this);
430  return m_receivedData;
431 }
432 
433 // Stats
434 uint32_t
436 {
437  NS_LOG_FUNCTION(this << m_txPdus);
438  return m_txPdus;
439 }
440 
441 uint32_t
443 {
444  NS_LOG_FUNCTION(this << m_txBytes);
445  return m_txBytes;
446 }
447 
448 uint32_t
450 {
451  NS_LOG_FUNCTION(this << m_rxPdus);
452  return m_rxPdus;
453 }
454 
455 uint32_t
457 {
458  NS_LOG_FUNCTION(this << m_rxBytes);
459  return m_rxBytes;
460 }
461 
462 void
463 LteTestMac::SendTxOpportunity(Time time, uint32_t bytes)
464 {
465  NS_LOG_FUNCTION(this << time << bytes);
466  bool haveContext = false;
467  Ptr<Node> node;
468  if (m_device)
469  {
470  node = m_device->GetNode();
471  if (node)
472  {
473  haveContext = true;
474  }
475  }
477  txOpParams.bytes = bytes;
478  txOpParams.layer = 0;
479  txOpParams.componentCarrierId = 0;
480  txOpParams.harqId = 0;
481  txOpParams.rnti = 0;
482  txOpParams.lcid = 0;
483 
484  if (haveContext)
485  {
487  time,
489  m_macSapUser,
490  txOpParams);
491  }
492  else
493  {
495  }
496 
498  {
499  if (m_txOppTime != Seconds(0))
500  {
503  this,
504  m_txOppTime,
505  m_txOppSize);
506  }
507  }
508 }
509 
510 void
512 {
513  NS_LOG_FUNCTION(this << present);
514  m_pdcpHeaderPresent = present;
515 }
516 
517 void
518 LteTestMac::SetRlcHeaderType(uint8_t rlcHeaderType)
519 {
520  NS_LOG_FUNCTION(this << rlcHeaderType);
521  m_rlcHeaderType = rlcHeaderType;
522 }
523 
524 void
526 {
527  NS_LOG_FUNCTION(this << (uint32_t)mode);
528  m_txOpportunityMode = mode;
529 
531  {
532  if (m_txOppTime != Seconds(0.0))
533  {
535  }
536  }
537 }
538 
539 void
541 {
542  NS_LOG_FUNCTION(this << txOppTime);
543  m_txOppTime = txOppTime;
544 }
545 
546 void
547 LteTestMac::SetTxOppSize(uint32_t txOppSize)
548 {
549  NS_LOG_FUNCTION(this << txOppSize);
550  m_txOppSize = txOppSize;
551 }
552 
557 void
559 {
560  NS_LOG_FUNCTION(this << params.pdu->GetSize());
561 
562  m_txPdus++;
563  m_txBytes += params.pdu->GetSize();
564 
566  rxPduParams.p = params.pdu;
567  rxPduParams.rnti = params.rnti;
568  rxPduParams.lcid = params.lcid;
569 
570  if (m_device)
571  {
572  m_device->Send(params.pdu, m_device->GetBroadcast(), 0);
573  }
574  else if (m_macLoopback)
575  {
579  rxPduParams);
580  }
581  else
582  {
583  LtePdcpHeader pdcpHeader;
584 
586  {
587  // Remove AM RLC header
588  LteRlcAmHeader rlcAmHeader;
589  params.pdu->RemoveHeader(rlcAmHeader);
590  NS_LOG_LOGIC("AM RLC header: " << rlcAmHeader);
591  }
592  else // if (m_rlcHeaderType == UM_RLC_HEADER)
593  {
594  // Remove UM RLC header
595  LteRlcHeader rlcHeader;
596  params.pdu->RemoveHeader(rlcHeader);
597  NS_LOG_LOGIC("UM RLC header: " << rlcHeader);
598  }
599 
600  // Remove PDCP header, if present
602  {
603  params.pdu->RemoveHeader(pdcpHeader);
604  NS_LOG_LOGIC("PDCP header: " << pdcpHeader);
605  }
606 
607  // Copy data to a string
608  uint32_t dataLen = params.pdu->GetSize();
609  auto buf = new uint8_t[dataLen];
610  params.pdu->CopyData(buf, dataLen);
611  m_receivedData = std::string((char*)buf, dataLen);
612 
613  NS_LOG_LOGIC("Data (" << dataLen << ") = " << m_receivedData);
614  delete[] buf;
615  }
616 }
617 
618 void
620 {
621  NS_LOG_FUNCTION(this << params.txQueueSize << params.retxQueueSize << params.statusPduSize);
622 
624  {
625  // cancel all previously scheduled TxOpps
626  for (auto it = m_nextTxOppList.begin(); it != m_nextTxOppList.end(); ++it)
627  {
628  it->Cancel();
629  }
630  m_nextTxOppList.clear();
631 
632  int32_t size = params.statusPduSize + params.txQueueSize + params.retxQueueSize;
633  Time time = m_txOppTime;
635  txOpParams.bytes = m_txOppSize;
636  txOpParams.layer = 0;
637  txOpParams.componentCarrierId = 0;
638  txOpParams.harqId = 0;
639  txOpParams.rnti = params.rnti;
640  txOpParams.lcid = params.lcid;
641  while (size > 0)
642  {
643  EventId e = Simulator::Schedule(time,
645  m_macSapUser,
646  txOpParams);
647  m_nextTxOppList.push_back(e);
648  size -= m_txOppSize;
649  time += m_txOppTime;
650  }
651  }
652 }
653 
654 bool
655 LteTestMac::Receive(Ptr<NetDevice> nd, Ptr<const Packet> p, uint16_t protocol, const Address& addr)
656 {
657  NS_LOG_FUNCTION(this << addr << protocol << p->GetSize());
658 
659  m_rxPdus++;
660  m_rxBytes += p->GetSize();
661 
662  Ptr<Packet> packet = p->Copy();
664  rxPduParams.p = packet;
665  rxPduParams.rnti = 0;
666  rxPduParams.lcid = 0;
667  m_macSapUser->ReceivePdu(rxPduParams);
668  return true;
669 }
670 
672 
674  : m_s1SapProvider(nullptr)
675 {
676  NS_LOG_FUNCTION(this);
678 }
679 
681 {
682  NS_LOG_FUNCTION(this);
683 }
684 
685 void
687 {
688  NS_LOG_FUNCTION(this);
689  delete m_s1SapUser;
690 }
691 
692 TypeId
694 {
695  NS_LOG_FUNCTION("EpcTestRrc::GetTypeId");
696  static TypeId tid = TypeId("ns3::EpcTestRrc").SetParent<Object>().AddConstructor<EpcTestRrc>();
697  return tid;
698 }
699 
700 void
702 {
703  m_s1SapProvider = s;
704 }
705 
708 {
709  return m_s1SapUser;
710 }
711 
712 void
715 {
716 }
717 
718 void
721 {
722 }
723 
724 void
727 {
728 }
729 
730 } // namespace ns3
a polymophic address class
Definition: address.h:101
This class implements the Service Access Point (SAP) between the LteEnbRrc and the EpcEnbApplication.
This class implements the Service Access Point (SAP) between the LteEnbRrc and the EpcEnbApplication.
RRC stub providing a testing S1 SAP user to be used with the EpcEnbApplication.
EpcEnbS1SapUser * m_s1SapUser
S1 SAP user.
static TypeId GetTypeId()
Get the type ID.
void SetS1SapProvider(EpcEnbS1SapProvider *s)
Set the S1 SAP Provider.
friend class MemberEpcEnbS1SapUser< EpcTestRrc >
allow MemberEpcEnbS1SapUser<EpcTestRrc> class friend access
void DoPathSwitchRequestAcknowledge(EpcEnbS1SapUser::PathSwitchRequestAcknowledgeParameters params)
Path switch request acknowledge function.
void DoDispose() override
Destructor implementation.
EpcEnbS1SapProvider * m_s1SapProvider
S1 SAP provider.
EpcEnbS1SapUser * GetS1SapUser()
void DoInitialContextSetupRequest(EpcEnbS1SapUser::InitialContextSetupRequestParameters params)
Initial context setup request.
void DoDataRadioBearerSetupRequest(EpcEnbS1SapUser::DataRadioBearerSetupRequestParameters params)
Data radio bearer setup request.
An identifier for simulation events.
Definition: event-id.h:55
void Cancel()
This method is syntactic sugar for the ns3::Simulator::Cancel method.
Definition: event-id.cc:55
Service Access Point (SAP) offered by the MAC to the RLC See Femto Forum MAC Scheduler Interface Spec...
Definition: lte-mac-sap.h:36
Service Access Point (SAP) offered by the MAC to the RLC See Femto Forum MAC Scheduler Interface Spec...
Definition: lte-mac-sap.h:96
virtual void NotifyTxOpportunity(TxOpportunityParameters params)=0
Called by the MAC to notify the RLC that the scheduler granted a transmission opportunity to this RLC...
virtual void ReceivePdu(ReceivePduParameters params)=0
Called by the MAC to notify the RLC of the reception of a new PDU.
The packet header for the Packet Data Convergence Protocol (PDCP) packets.
Service Access Point (SAP) offered by the PDCP entity to the RRC entity See 3GPP 36....
Definition: lte-pdcp-sap.h:36
virtual void TransmitPdcpSdu(TransmitPdcpSduParameters params)=0
Send RRC PDU parameters to the PDCP for transmission.
Service Access Point (SAP) offered by the PDCP entity to the RRC entity See 3GPP 36....
Definition: lte-pdcp-sap.h:69
The packet header for the AM Radio Link Control (RLC) protocol packets.
The packet header for the Radio Link Control (RLC) protocol packets.
Service Access Point (SAP) offered by the UM-RLC and AM-RLC entities to the PDCP entity See 3GPP 36....
Definition: lte-rlc-sap.h:36
virtual void TransmitPdcpPdu(TransmitPdcpPduParameters params)=0
Send a PDCP PDU to the RLC for transmission This method is to be called when upper PDCP entity has a ...
Service Access Point (SAP) offered by the UM-RLC and AM-RLC entities to the PDCP entity See 3GPP 36....
Definition: lte-rlc-sap.h:67
uint32_t GetTxPdus()
Get the transmit PDUs.
void SendTxOpportunity(Time time, uint32_t bytes)
Send transmit opportunity function.
uint8_t m_txOpportunityMode
transmit opportunity mode
void SetLteMacSapUser(LteMacSapUser *s)
Set the MAC SAP user.
uint32_t GetRxPdus()
Get the receive PDUs.
uint32_t m_txOppSize
transmit opportunity size
void SetPdcpHeaderPresent(bool present)
Set PDCP header present function.
uint32_t m_rxBytes
the number of receive bytes
void SetLteMacLoopback(Ptr< LteTestMac > s)
Set the other side of the MAC Loopback.
uint32_t GetRxBytes()
Get the receive bytes.
void DoTransmitPdu(LteMacSapProvider::TransmitPduParameters params)
Transmit PDU.
void SetTxOppSize(uint32_t txOppSize)
Set transmit opportunity time.
void DoReportBufferStatus(LteMacSapProvider::ReportBufferStatusParameters params)
Report buffer status function.
std::list< EventId > m_nextTxOppList
next transmit opportunity list
Time m_txOppTime
transmit opportunity time
LteMacSapProvider * GetLteMacSapProvider()
Get the MAC SAP provider.
std::string GetDataReceived()
Get data received function.
std::string m_receivedData
the received data string
bool m_pdcpHeaderPresent
PDCP header present?
LteMacSapUser * m_macSapUser
MAC SAP user.
bool Receive(Ptr< NetDevice > nd, Ptr< const Packet > p, uint16_t protocol, const Address &addr)
the Receive function
void SetDevice(Ptr< NetDevice > device)
Set the device function.
void SetRlcHeaderType(uint8_t rlcHeaderType)
Set RLC header type.
uint8_t m_rlcHeaderType
RLC header type.
uint32_t m_rxPdus
the number of receive PDUs
static TypeId GetTypeId()
Get the type ID.
void DoDispose() override
Destructor implementation.
friend class EnbMacMemberLteMacSapProvider< LteTestMac >
allow EnbMacMemberLteMacSapProvider<LteTestMac> class friend access
void SetTxOppTime(Time txOppTime)
Set transmit opportunity time.
LteMacSapProvider * m_macSapProvider
MAC SAP provider.
uint32_t m_txPdus
the number of transmit PDUs
void SetTxOpportunityMode(uint8_t mode)
Set transmit opportunity mode.
Ptr< LteTestMac > m_macLoopback
MAC loopback.
uint32_t m_txBytes
the number of transmit bytes
uint32_t GetTxBytes()
Get the transmit bytes.
Ptr< NetDevice > m_device
the device
std::string GetDataReceived()
Get data received function.
friend class LteRlcSpecificLteRlcSapUser< LteTestPdcp >
allow LteRlcSpecificLteRlcSapUser<LteTestPdcp> class friend access
LteRlcSapProvider * m_rlcSapProvider
RLC SAP provider.
void SetLteRlcSapProvider(LteRlcSapProvider *s)
Set the RLC SAP provider.
virtual void DoReceivePdcpPdu(Ptr< Packet > p)
Interface forwarded by LteRlcSapUser.
void DoDispose() override
Destructor implementation.
LteRlcSapUser * m_rlcSapUser
RLC SAP user.
LteRlcSapUser * GetLteRlcSapUser()
Get the RLC SAP user.
void Start()
Start function.
void SendData(Time time, std::string dataToSend)
Send data function.
std::string m_receivedData
the received data
static TypeId GetTypeId()
Get the type ID.
~LteTestRrc() override
void SendData(Time at, std::string dataToSend)
Send data function.
uint32_t GetTxPdus()
Get the transmit PDUs.
uint32_t GetRxPdus()
Get the receive PDUs.
uint32_t m_rxPdus
number of receive PDUs
uint32_t m_pduSize
PDU size.
static TypeId GetTypeId()
Get the type ID.
void SetDevice(Ptr< NetDevice > device)
Set the device.
Time m_arrivalTime
next arrival time
LtePdcpSapUser * m_pdcpSapUser
PDCP SAP user.
void SetLtePdcpSapProvider(LtePdcpSapProvider *s)
Set the PDCP SAP provider.
void DoDispose() override
Destructor implementation.
void Stop()
Stop function.
Time m_rxLastTime
last reeive time
uint32_t m_rxBytes
number of receive bytes
uint32_t m_txBytes
number of transmit bytes
void Start()
Start function.
friend class LtePdcpSpecificLtePdcpSapUser< LteTestRrc >
allow LtePdcpSpecificLtePdcpSapUser<LteTestRrc> class friend access
Time m_txLastTime
last transmit time
void SetArrivalTime(Time arrivalTime)
Set the arrival time.
std::string m_receivedData
the received data
uint32_t m_txPdus
number of transmit PDUs
uint32_t GetTxBytes()
Get the transmit bytes.
LtePdcpSapUser * GetLtePdcpSapUser()
Get the PDCP SAP user.
void SetPduSize(uint32_t pduSize)
Set the PDU size.
Time GetRxLastTime()
Get the last receive time.
virtual void DoReceivePdcpSdu(LtePdcpSapUser::ReceivePdcpSduParameters params)
Interface forwarded by LtePdcpSapUser.
EventId m_nextPdu
next PDU event
std::string GetDataReceived()
Get data received function.
LtePdcpSapProvider * m_pdcpSapProvider
PDCP SAP provider.
Time GetTxLastTime()
Get the last transmit time.
Ptr< NetDevice > m_device
the device
uint32_t GetRxBytes()
Get the receive bytes.
uint32_t GetId() const
Definition: node.cc:117
A base class which provides memory management and object aggregation.
Definition: object.h:89
uint32_t GetSize() const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
Definition: packet.h:861
uint32_t CopyData(uint8_t *buffer, uint32_t size) const
Copy the packet contents to a byte buffer.
Definition: packet.cc:400
Ptr< Packet > Copy() const
performs a COW copy of the packet.
Definition: packet.cc:131
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
static EventId Schedule(const Time &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
Definition: simulator.h:571
static void ScheduleWithContext(uint32_t context, const Time &delay, FUNC f, Ts &&... args)
Schedule an event with the given context.
Definition: simulator.h:588
static Time Now()
Return the current simulation virtual time.
Definition: simulator.cc:208
static EventId ScheduleNow(FUNC f, Ts &&... args)
Schedule an event to expire Now.
Definition: simulator.h:605
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
a unique identifier for an interface.
Definition: type-id.h:59
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition: type-id.cc:931
#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:86
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:202
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
Definition: log.h:282
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition: object-base.h:46
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:1326
void(* Time)(Time oldValue, Time newValue)
TracedValue callback signature for Time.
Definition: nstime.h:839
Every class exported by the ns3 library is enclosed in the ns3 namespace.
params
Fit Fluctuating Two Ray model to the 3GPP TR 38.901 using the Anderson-Darling goodness-of-fit ##.
Parameters passed to DataRadioBearerSetupRequest ()
Parameters passed to InitialContextSetupRequest ()
PathSwitchRequestAcknowledgeParameters structure.
Parameters for LteMacSapProvider::ReportBufferStatus.
Definition: lte-mac-sap.h:69
Parameters for LteMacSapProvider::TransmitPdu.
Definition: lte-mac-sap.h:45
Parameters for LteMacSapUser::ReceivePdu.
Definition: lte-mac-sap.h:166
Ptr< Packet > p
the RLC PDU to be received
Definition: lte-mac-sap.h:187
uint8_t lcid
the logical channel id
Definition: lte-mac-sap.h:189
uint16_t rnti
the C-RNTI identifying the UE
Definition: lte-mac-sap.h:188
Parameters for LteMacSapUser::NotifyTxOpportunity.
Definition: lte-mac-sap.h:105
uint16_t rnti
the C-RNTI identifying the UE
Definition: lte-mac-sap.h:141
uint32_t bytes
the number of bytes to transmit
Definition: lte-mac-sap.h:137
uint8_t componentCarrierId
the component carrier id
Definition: lte-mac-sap.h:140
uint8_t layer
the layer of transmission (MIMO)
Definition: lte-mac-sap.h:138
uint8_t lcid
the logical channel id
Definition: lte-mac-sap.h:142
Parameters for LtePdcpSapProvider::TransmitPdcpSdu.
Definition: lte-pdcp-sap.h:44
uint8_t lcid
the logical channel id corresponding to the sending RLC instance
Definition: lte-pdcp-sap.h:47
uint16_t rnti
the C-RNTI identifying the UE
Definition: lte-pdcp-sap.h:46
Parameters for LtePdcpSapUser::ReceivePdcpSdu.
Definition: lte-pdcp-sap.h:77
Parameters for LteRlcSapProvider::TransmitPdcpPdu.
Definition: lte-rlc-sap.h:44
uint8_t lcid
the logical channel id corresponding to the sending RLC instance
Definition: lte-rlc-sap.h:47
uint16_t rnti
the C-RNTI identifying the UE
Definition: lte-rlc-sap.h:46