A Discrete-Event Network Simulator
API
lte-test-entities.cc
Go to the documentation of this file.
1/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2/*
3 * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation;
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * Author: Manuel Requena <manuel.requena@cttc.es>
19 */
20
21#include "ns3/simulator.h"
22#include "ns3/log.h"
23#include "ns3/node.h"
24
25#include "ns3/lte-rlc-header.h"
26#include "ns3/lte-rlc-am-header.h"
27#include "ns3/lte-pdcp-header.h"
28
29#include "lte-test-entities.h"
30
31namespace ns3 {
32
33NS_LOG_COMPONENT_DEFINE ("LteTestEntities");
34
36
37TypeId
39{
40 static TypeId tid = TypeId ("ns3::LteTestRrc")
41 .SetParent<Object> ()
42 .AddConstructor<LteTestRrc> ()
43 ;
44
45 return tid;
46}
47
49{
50 NS_LOG_FUNCTION (this);
51
52 m_txPdus = 0;
53 m_txBytes = 0;
54 m_rxPdus = 0;
55 m_rxBytes = 0;
56 m_txLastTime = Time (0);
57 m_rxLastTime = Time (0);
58
60// Simulator::ScheduleNow (&LteTestRrc::Start, this);
61}
62
64{
65 NS_LOG_FUNCTION (this);
66}
67
68void
70{
71 NS_LOG_FUNCTION (this);
72 delete m_pdcpSapUser;
73}
74
75void
77{
78 m_device = device;
79}
80
81void
83{
85}
86
89{
90 return m_pdcpSapUser;
91}
92
93
94std::string
96{
97 NS_LOG_FUNCTION (this);
98 return m_receivedData;
99}
100
101// Stats
104{
105 NS_LOG_FUNCTION (this << m_txPdus);
106 return m_txPdus;
107}
108
111{
112 NS_LOG_FUNCTION (this << m_txBytes);
113 return m_txBytes;
114}
115
118{
119 NS_LOG_FUNCTION (this << m_rxPdus);
120 return m_rxPdus;
121}
122
125{
126 NS_LOG_FUNCTION (this << m_rxBytes);
127 return m_rxBytes;
128}
129
130Time
132{
134 return m_txLastTime;
135}
136
137Time
139{
141 return m_rxLastTime;
142}
143
144
145void
147{
148 NS_LOG_FUNCTION (this << arrivalTime);
149 m_arrivalTime = arrivalTime;
150}
151
152void
154{
155 NS_LOG_FUNCTION (this << pduSize);
156 m_pduSize = pduSize;
157}
158
159
164void
166{
167 NS_LOG_FUNCTION (this << params.pdcpSdu->GetSize ());
168 Ptr<Packet> p = params.pdcpSdu;
169// NS_LOG_LOGIC ("PDU received = " << (*p));
170
171 uint32_t dataLen = p->GetSize ();
172 uint8_t *buf = new uint8_t[dataLen];
173
174 // Stats
175 m_rxPdus++;
176 m_rxBytes += dataLen;
178
179 p->CopyData (buf, dataLen);
180 m_receivedData = std::string ((char *)buf, dataLen);
181
182// NS_LOG_LOGIC (m_receivedData);
183
184 delete [] buf;
185}
186
191void
193{
194 NS_LOG_FUNCTION (this);
195 NS_ASSERT_MSG (m_arrivalTime != Time (0), "Arrival time must be different from 0");
196
197 // Stats
198 m_txPdus++;
201
203 p.rnti = 1111;
204 p.lcid = 222;
205 p.pdcpSdu = Create<Packet> (m_pduSize);
206
207 bool haveContext = false;
208 Ptr<Node> node;
209 if (m_device != 0)
210 {
211 node = m_device->GetNode ();
212 if (node != 0)
213 {
214 haveContext = true;
215 }
216 }
217 if (haveContext)
218 {
220 }
221 else
222 {
224 }
225
227// Simulator::Run ();
228}
229
230void
232{
233 NS_LOG_FUNCTION (this);
234 m_nextPdu.Cancel ();
235}
236
237void
238LteTestRrc::SendData (Time at, std::string dataToSend)
239{
240 NS_LOG_FUNCTION (this << at << dataToSend.length () << dataToSend);
241
242 // Stats
243 m_txPdus++;
244 m_txBytes += dataToSend.length ();
245
247 p.rnti = 1111;
248 p.lcid = 222;
249
250 NS_LOG_LOGIC ("Data(" << dataToSend.length () << ") = " << dataToSend.data ());
251 p.pdcpSdu = Create<Packet> ((uint8_t *) dataToSend.data (), dataToSend.length ());
252
253 NS_LOG_LOGIC ("Packet(" << p.pdcpSdu->GetSize () << ")");
255}
256
258
259TypeId
261{
262 static TypeId tid = TypeId ("ns3::LteTestPdcp")
263 .SetParent<Object> ()
264 .AddConstructor<LteTestPdcp> ()
265 ;
266
267 return tid;
268}
269
271{
272 NS_LOG_FUNCTION (this);
275}
276
278{
279 NS_LOG_FUNCTION (this);
280}
281
282void
284{
285 NS_LOG_FUNCTION (this);
286 delete m_rlcSapUser;
287}
288
289void
291{
293}
294
297{
298 return m_rlcSapUser;
299}
300
301
302std::string
304{
305 NS_LOG_FUNCTION (this);
306
307 return m_receivedData;
308}
309
310
315void
317{
318 NS_LOG_FUNCTION (this << p->GetSize ());
319 NS_LOG_LOGIC ("Data = " << (*p));
320
321 uint32_t dataLen = p->GetSize ();
322 uint8_t *buf = new uint8_t[dataLen];
323 p->CopyData (buf, dataLen);
324 m_receivedData = std::string ((char *)buf, dataLen);
325
327
328 delete [] buf;
329}
330
335void
337{
338 NS_LOG_FUNCTION (this);
339}
340
341void
342LteTestPdcp::SendData (Time time, std::string dataToSend)
343{
344 NS_LOG_FUNCTION (this << time << dataToSend.length () << dataToSend);
345
347 p.rnti = 1111;
348 p.lcid = 222;
349
350 NS_LOG_LOGIC ("Data(" << dataToSend.length () << ") = " << dataToSend.data ());
351 p.pdcpPdu = Create<Packet> ((uint8_t *) dataToSend.data (), dataToSend.length ());
352
353 NS_LOG_LOGIC ("Packet(" << p.pdcpPdu->GetSize () << ")");
355}
356
358
359TypeId
361{
362 static TypeId tid = TypeId ("ns3::LteTestMac")
363 .SetParent<Object> ()
364 .AddConstructor<LteTestMac> ()
365 ;
366
367 return tid;
368}
369
371{
372 NS_LOG_FUNCTION (this);
373 m_device = 0;
375 m_macSapUser = 0;
376 m_macLoopback = 0;
377 m_pdcpHeaderPresent = false;
380 m_txOppTime = Seconds (0.001);
381 m_txOppSize = 0;
382
383 m_txPdus = 0;
384 m_txBytes = 0;
385 m_rxPdus = 0;
386 m_rxBytes = 0;
387
388// m_cmacSapProvider = new EnbMacMemberLteEnbCmacSapProvider (this);
389// m_schedSapUser = new EnbMacMemberFfMacSchedSapUser (this);
390// m_cschedSapUser = new EnbMacMemberFfMacCschedSapUser (this);
391// m_enbPhySapUser = new EnbMacMemberLteEnbPhySapUser (this);
392}
393
395{
396 NS_LOG_FUNCTION (this);
397}
398
399void
401{
402 NS_LOG_FUNCTION (this);
403 delete m_macSapProvider;
404// delete m_cmacSapProvider;
405// delete m_schedSapUser;
406// delete m_cschedSapUser;
407// delete m_enbPhySapUser;
408
409 m_device = 0;
410}
411
412void
414{
415 m_device = device;
416}
417
418void
420{
421 m_macSapUser = s;
422}
423
426{
427 return m_macSapProvider;
428}
429
430void
432{
433 m_macLoopback = s;
434}
435
436std::string
438{
439 NS_LOG_FUNCTION (this);
440 return m_receivedData;
441}
442
443// Stats
446{
447 NS_LOG_FUNCTION (this << m_txPdus);
448 return m_txPdus;
449}
450
453{
454 NS_LOG_FUNCTION (this << m_txBytes);
455 return m_txBytes;
456}
457
460{
461 NS_LOG_FUNCTION (this << m_rxPdus);
462 return m_rxPdus;
463}
464
467{
468 NS_LOG_FUNCTION (this << m_rxBytes);
469 return m_rxBytes;
470}
471
472
473void
475{
476 NS_LOG_FUNCTION (this << time << bytes);
477 bool haveContext = false;
478 Ptr<Node> node;
479 if (m_device != 0)
480 {
481 node = m_device->GetNode ();
482 if (node != 0)
483 {
484 haveContext = true;
485 }
486 }
488 txOpParmas.bytes = bytes;
489 txOpParmas.layer = 0;
490 txOpParmas.componentCarrierId = 0;
491 txOpParmas.harqId = 0;
492 txOpParmas.rnti = 0;
493 txOpParmas.lcid = 0;
494
495 if (haveContext)
496 {
498 }
499 else
500 {
502 }
503
505 {
506 if (m_txOppTime != Seconds (0))
507 {
509 }
510 }
511}
512
513void
515{
516 NS_LOG_FUNCTION (this << present);
517 m_pdcpHeaderPresent = present;
518}
519
520void
521LteTestMac::SetRlcHeaderType (uint8_t rlcHeaderType)
522{
523 NS_LOG_FUNCTION (this << rlcHeaderType);
524 m_rlcHeaderType = rlcHeaderType;
525}
526
527void
529{
530 NS_LOG_FUNCTION (this << (uint32_t)mode);
531 m_txOpportunityMode = mode;
532
534 {
535 if (m_txOppTime != Seconds (0.0))
536 {
538 }
539 }
540}
541
542void
544{
545 NS_LOG_FUNCTION (this << txOppTime);
546 m_txOppTime = txOppTime;
547}
548
549void
551{
552 NS_LOG_FUNCTION (this << txOppSize);
553 m_txOppSize = txOppSize;
554}
555
556
561void
563{
564 NS_LOG_FUNCTION (this << params.pdu->GetSize ());
565
566 m_txPdus++;
567 m_txBytes += params.pdu->GetSize ();
568
570 rxPduParams.p = params.pdu;
571 rxPduParams.rnti = params.rnti;
572 rxPduParams.lcid = params.lcid;
573
574 if (m_device)
575 {
576 m_device->Send (params.pdu, m_device->GetBroadcast (), 0);
577 }
578 else if (m_macLoopback)
579 {
581 m_macLoopback->m_macSapUser, rxPduParams);
582 }
583 else
584 {
585 LtePdcpHeader pdcpHeader;
586
588 {
589 // Remove AM RLC header
590 LteRlcAmHeader rlcAmHeader;
591 params.pdu->RemoveHeader (rlcAmHeader);
592 NS_LOG_LOGIC ("AM RLC header: " << rlcAmHeader);
593 }
594 else // if (m_rlcHeaderType == UM_RLC_HEADER)
595 {
596 // Remove UM RLC header
597 LteRlcHeader rlcHeader;
598 params.pdu->RemoveHeader (rlcHeader);
599 NS_LOG_LOGIC ("UM RLC header: " << rlcHeader);
600 }
601
602 // Remove PDCP header, if present
604 {
605 params.pdu->RemoveHeader (pdcpHeader);
606 NS_LOG_LOGIC ("PDCP header: " << pdcpHeader);
607 }
608
609 // Copy data to a string
610 uint32_t dataLen = params.pdu->GetSize ();
611 uint8_t *buf = new uint8_t[dataLen];
612 params.pdu->CopyData (buf, dataLen);
613 m_receivedData = std::string ((char *)buf, dataLen);
614
615 NS_LOG_LOGIC ("Data (" << dataLen << ") = " << m_receivedData);
616 delete [] buf;
617 }
618}
619
620void
622{
623 NS_LOG_FUNCTION (this << params.txQueueSize << params.retxQueueSize << params.statusPduSize);
624
626 {
627 // cancel all previously scheduled TxOpps
628 for (std::list<EventId>::iterator it = m_nextTxOppList.begin ();
629 it != m_nextTxOppList.end ();
630 ++it)
631 {
632 it->Cancel ();
633 }
634 m_nextTxOppList.clear ();
635
636 int32_t size = params.statusPduSize + params.txQueueSize + params.retxQueueSize;
637 Time time = m_txOppTime;
639 txOpParmas.bytes = m_txOppSize;
640 txOpParmas.layer = 0;
641 txOpParmas.componentCarrierId = 0;
642 txOpParmas.harqId = 0;
643 txOpParmas.rnti = params.rnti;
644 txOpParmas.lcid = params.lcid;
645 while (size > 0)
646 {
647 EventId e = Simulator::Schedule (time,
649 m_macSapUser, txOpParmas);
650 m_nextTxOppList.push_back (e);
651 size -= m_txOppSize;
652 time += m_txOppTime;
653 }
654 }
655}
656
657
658bool
659LteTestMac::Receive (Ptr<NetDevice> nd, Ptr<const Packet> p, uint16_t protocol, const Address& addr)
660{
661 NS_LOG_FUNCTION (this << addr << protocol << p->GetSize ());
662
663 m_rxPdus++;
664 m_rxBytes += p->GetSize ();
665
666 Ptr<Packet> packet = p->Copy ();
668 rxPduParams.p = packet;
669 rxPduParams.rnti = 0;
670 rxPduParams.lcid = 0;
671 m_macSapUser->ReceivePdu (rxPduParams);
672 return true;
673}
674
675
676
677
678
679
680
681
683
685 : m_s1SapProvider (0)
686{
687 NS_LOG_FUNCTION (this);
689}
690
691
693{
694 NS_LOG_FUNCTION (this);
695}
696
697
698void
700{
701 NS_LOG_FUNCTION (this);
702 delete m_s1SapUser;
703}
704
705TypeId
707{
708 NS_LOG_FUNCTION ("EpcTestRrc::GetTypeId");
709 static TypeId tid = TypeId ("ns3::EpcTestRrc")
710 .SetParent<Object> ()
711 .AddConstructor<EpcTestRrc> ()
712 ;
713 return tid;
714}
715void
717{
718 m_s1SapProvider = s;
719}
720
721
724{
725 return m_s1SapUser;
726}
727
728void
730{
731
732}
733
734void
736{
737
738}
739
740void
742{
743
744}
745
746
747} // namespace ns3
748
a polymophic address class
Definition: address.h:91
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.
virtual void DoDispose(void)
Destructor implementation.
static TypeId GetTypeId(void)
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.
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:54
void Cancel(void)
This method is syntactic sugar for the ns3::Simulator::Cancel method.
Definition: event-id.cc:53
Service Access Point (SAP) offered by the MAC to the RLC See Femto Forum MAC Scheduler Interface Spec...
Definition: lte-mac-sap.h:37
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:70
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:68
uint32_t GetTxPdus(void)
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.
virtual void DoDispose(void)
Destructor implementation.
uint32_t GetRxBytes(void)
Get the receive bytes.
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.
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
static TypeId GetTypeId(void)
Get the type ID.
std::string m_receivedData
the received data string
bool m_pdcpHeaderPresent
PDCP header present?
uint32_t GetRxPdus(void)
Get the receive PDUs.
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.
LteMacSapProvider * GetLteMacSapProvider(void)
Get the MAC SAP provider.
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
friend class EnbMacMemberLteMacSapProvider< LteTestMac >
allow EnbMacMemberLteMacSapProvider<LteTestMac> class friend access
std::string GetDataReceived(void)
Get data received function.
void SetTxOppTime(Time txOppTime)
Set transmit opportunity time.
uint32_t GetTxBytes(void)
Get the transmit bytes.
LteMacSapProvider * m_macSapProvider
MAC SAP provider.
uint32_t m_txPdus
the number of transmit PDUs
void SetTxOpportunityMode(uint8_t mode)
Set transmit opportunity mode.
virtual ~LteTestMac(void)
Ptr< LteTestMac > m_macLoopback
MAC loopback.
uint32_t m_txBytes
the number of transmit bytes
Ptr< NetDevice > m_device
the device
friend class LteRlcSpecificLteRlcSapUser< LteTestPdcp >
allow LteRlcSpecificLteRlcSapUser<LteTestPdcp> class friend access
LteRlcSapProvider * m_rlcSapProvider
RLC SAP provider.
LteRlcSapUser * GetLteRlcSapUser(void)
Get the RLC SAP user.
virtual ~LteTestPdcp(void)
void SetLteRlcSapProvider(LteRlcSapProvider *s)
Set the RLC SAP provider.
virtual void DoReceivePdcpPdu(Ptr< Packet > p)
Interface forwarded by LteRlcSapUser.
LteRlcSapUser * m_rlcSapUser
RLC SAP user.
void Start()
Start function.
virtual void DoDispose(void)
Destructor implementation.
static TypeId GetTypeId(void)
Get the type ID.
std::string GetDataReceived(void)
Get data received function.
void SendData(Time time, std::string dataToSend)
Send data function.
std::string m_receivedData
the received data
static TypeId GetTypeId(void)
Get the type ID.
uint32_t GetTxBytes(void)
Get the transmit bytes.
void SendData(Time at, std::string dataToSend)
Send data function.
Time GetRxLastTime(void)
Get the last receive time.
uint32_t m_rxPdus
number of receive PDUs
uint32_t m_pduSize
PDU size.
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 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
uint32_t GetRxBytes(void)
Get the receive bytes.
Time GetTxLastTime(void)
Get the last transmit time.
Time m_txLastTime
last transmit time
std::string GetDataReceived(void)
Get data received function.
void SetArrivalTime(Time arrivalTime)
Set the arrival time.
std::string m_receivedData
the received data
uint32_t m_txPdus
number of transmit PDUs
void SetPduSize(uint32_t pduSize)
Set the PDU size.
virtual void DoDispose(void)
Destructor implementation.
virtual void DoReceivePdcpSdu(LtePdcpSapUser::ReceivePdcpSduParameters params)
Interface forwarded by LtePdcpSapUser.
LtePdcpSapUser * GetLtePdcpSapUser(void)
Get the PDCP SAP user.
uint32_t GetTxPdus(void)
Get the transmit PDUs.
EventId m_nextPdu
next PDU event
uint32_t GetRxPdus(void)
Get the receive PDUs.
LtePdcpSapProvider * m_pdcpSapProvider
PDCP SAP provider.
Ptr< NetDevice > m_device
the device
virtual ~LteTestRrc(void)
virtual Address GetBroadcast(void) const =0
virtual bool Send(Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber)=0
virtual Ptr< Node > GetNode(void) const =0
uint32_t GetId(void) const
Definition: node.cc:109
A base class which provides memory management and object aggregation.
Definition: object.h:88
uint32_t RemoveHeader(Header &header)
Deserialize and remove the header from the internal buffer.
Definition: packet.cc:280
uint32_t CopyData(uint8_t *buffer, uint32_t size) const
Copy the packet contents to a byte buffer.
Definition: packet.cc:378
Ptr< Packet > Copy(void) const
performs a COW copy of the packet.
Definition: packet.cc:121
uint32_t GetSize(void) const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
Definition: packet.h:856
static EventId Schedule(Time const &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
Definition: simulator.h:556
static void ScheduleWithContext(uint32_t context, Time const &delay, FUNC f, Ts &&... args)
Schedule an event with the given context.
Definition: simulator.h:571
static EventId ScheduleNow(FUNC f, Ts &&... args)
Schedule an event to expire Now.
Definition: simulator.h:587
static Time Now(void)
Return the current simulation virtual time.
Definition: simulator.cc:195
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:103
a unique identifier for an interface.
Definition: type-id.h:59
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition: type-id.cc:922
#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:88
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:205
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
Definition: log.h:289
#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:45
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:1244
void(* Time)(Time oldValue, Time newValue)
TracedValue callback signature for Time.
Definition: nstime.h:793
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Parameters passed to DataRadioBearerSetupRequest ()
Parameters passed to InitialContextSetupRequest ()
PathSwitchRequestAcknowledgeParameters structure.
Parameters for LteMacSapProvider::ReportBufferStatus.
Definition: lte-mac-sap.h:68
uint32_t txQueueSize
the current size of the RLC transmission queue
Definition: lte-mac-sap.h:71
uint32_t retxQueueSize
the current size of the RLC retransmission queue in bytes
Definition: lte-mac-sap.h:73
uint8_t lcid
the logical channel id corresponding to the sending RLC instance
Definition: lte-mac-sap.h:70
uint16_t rnti
the C-RNTI identifying the UE
Definition: lte-mac-sap.h:69
uint16_t statusPduSize
the current size of the pending STATUS RLC PDU message in bytes
Definition: lte-mac-sap.h:75
Parameters for LteMacSapProvider::TransmitPdu.
Definition: lte-mac-sap.h:46
uint16_t rnti
the C-RNTI identifying the UE
Definition: lte-mac-sap.h:48
uint8_t lcid
the logical channel id corresponding to the sending RLC instance
Definition: lte-mac-sap.h:49
Parameters for LteMacSapUser::ReceivePdu.
Definition: lte-mac-sap.h:157
Ptr< Packet > p
the RLC PDU to be received
Definition: lte-mac-sap.h:175
uint8_t lcid
the logical channel id
Definition: lte-mac-sap.h:177
uint16_t rnti
the C-RNTI identifying the UE
Definition: lte-mac-sap.h:176
Parameters for LteMacSapUser::NotifyTxOpportunity.
Definition: lte-mac-sap.h:104
uint16_t rnti
the C-RNTI identifying the UE
Definition: lte-mac-sap.h:133
uint32_t bytes
the number of bytes to transmit
Definition: lte-mac-sap.h:129
uint8_t componentCarrierId
the component carrier id
Definition: lte-mac-sap.h:132
uint8_t layer
the layer of transmission (MIMO)
Definition: lte-mac-sap.h:130
uint8_t lcid
the logical channel id
Definition: lte-mac-sap.h:134
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:78
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