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 
31 namespace ns3 {
32 
33 NS_LOG_COMPONENT_DEFINE ("LteTestEntities");
34 
36 
37 TypeId
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 
68 void
70 {
71  NS_LOG_FUNCTION (this);
72  delete m_pdcpSapUser;
73 }
74 
75 void
77 {
78  m_device = device;
79 }
80 
81 void
83 {
85 }
86 
89 {
90  return m_pdcpSapUser;
91 }
92 
93 
94 std::string
96 {
97  NS_LOG_FUNCTION (this);
98  return m_receivedData;
99 }
100 
101 // Stats
102 uint32_t
104 {
105  NS_LOG_FUNCTION (this << m_txPdus);
106  return m_txPdus;
107 }
108 
109 uint32_t
111 {
112  NS_LOG_FUNCTION (this << m_txBytes);
113  return m_txBytes;
114 }
115 
116 uint32_t
118 {
119  NS_LOG_FUNCTION (this << m_rxPdus);
120  return m_rxPdus;
121 }
122 
123 uint32_t
125 {
126  NS_LOG_FUNCTION (this << m_rxBytes);
127  return m_rxBytes;
128 }
129 
130 Time
132 {
133  NS_LOG_FUNCTION (this << m_txLastTime);
134  return m_txLastTime;
135 }
136 
137 Time
139 {
140  NS_LOG_FUNCTION (this << m_rxLastTime);
141  return m_rxLastTime;
142 }
143 
144 
145 void
147 {
148  NS_LOG_FUNCTION (this << arrivalTime);
149  m_arrivalTime = arrivalTime;
150 }
151 
152 void
153 LteTestRrc::SetPduSize (uint32_t pduSize)
154 {
155  NS_LOG_FUNCTION (this << pduSize);
156  m_pduSize = pduSize;
157 }
158 
159 
164 void
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 
191 void
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++;
199  m_txBytes += m_pduSize;
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 
230 void
232 {
233  NS_LOG_FUNCTION (this);
234  m_nextPdu.Cancel ();
235 }
236 
237 void
238 LteTestRrc::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 
259 TypeId
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 
282 void
284 {
285  NS_LOG_FUNCTION (this);
286  delete m_rlcSapUser;
287 }
288 
289 void
291 {
292  m_rlcSapProvider = s;
293 }
294 
297 {
298  return m_rlcSapUser;
299 }
300 
301 
302 std::string
304 {
305  NS_LOG_FUNCTION (this);
306 
307  return m_receivedData;
308 }
309 
310 
315 void
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 
335 void
337 {
338  NS_LOG_FUNCTION (this);
339 }
340 
341 void
342 LteTestPdcp::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 
359 TypeId
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 
399 void
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 
412 void
414 {
415  m_device = device;
416 }
417 
418 void
420 {
421  m_macSapUser = s;
422 }
423 
426 {
427  return m_macSapProvider;
428 }
429 
430 void
432 {
433  m_macLoopback = s;
434 }
435 
436 std::string
438 {
439  NS_LOG_FUNCTION (this);
440  return m_receivedData;
441 }
442 
443 // Stats
444 uint32_t
446 {
447  NS_LOG_FUNCTION (this << m_txPdus);
448  return m_txPdus;
449 }
450 
451 uint32_t
453 {
454  NS_LOG_FUNCTION (this << m_txBytes);
455  return m_txBytes;
456 }
457 
458 uint32_t
460 {
461  NS_LOG_FUNCTION (this << m_rxPdus);
462  return m_rxPdus;
463 }
464 
465 uint32_t
467 {
468  NS_LOG_FUNCTION (this << m_rxBytes);
469  return m_rxBytes;
470 }
471 
472 
473 void
474 LteTestMac::SendTxOpportunity (Time time, uint32_t bytes)
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  }
487  if (haveContext)
488  {
490  }
491  else
492  {
494  }
495 
497  {
498  if (m_txOppTime != Seconds (0))
499  {
501  }
502  }
503 }
504 
505 void
507 {
508  NS_LOG_FUNCTION (this << present);
509  m_pdcpHeaderPresent = present;
510 }
511 
512 void
513 LteTestMac::SetRlcHeaderType (uint8_t rlcHeaderType)
514 {
515  NS_LOG_FUNCTION (this << rlcHeaderType);
516  m_rlcHeaderType = rlcHeaderType;
517 }
518 
519 void
521 {
522  NS_LOG_FUNCTION (this << (uint32_t)mode);
523  m_txOpportunityMode = mode;
524 
526  {
527  if (m_txOppTime != Seconds (0.0))
528  {
530  }
531  }
532 }
533 
534 void
536 {
537  NS_LOG_FUNCTION (this << txOppTime);
538  m_txOppTime = txOppTime;
539 }
540 
541 void
542 LteTestMac::SetTxOppSize (uint32_t txOppSize)
543 {
544  NS_LOG_FUNCTION (this << txOppSize);
545  m_txOppSize = txOppSize;
546 }
547 
548 
553 void
555 {
556  NS_LOG_FUNCTION (this << params.pdu->GetSize ());
557 
558  m_txPdus++;
559  m_txBytes += params.pdu->GetSize ();
560 
561  if (m_device)
562  {
563  m_device->Send (params.pdu, m_device->GetBroadcast (), 0);
564  }
565  else if (m_macLoopback)
566  {
568  m_macLoopback->m_macSapUser, params.pdu, params.rnti, params.lcid);
569  }
570  else
571  {
572  LtePdcpHeader pdcpHeader;
573 
575  {
576  // Remove AM RLC header
577  LteRlcAmHeader rlcAmHeader;
578  params.pdu->RemoveHeader (rlcAmHeader);
579  NS_LOG_LOGIC ("AM RLC header: " << rlcAmHeader);
580  }
581  else // if (m_rlcHeaderType == UM_RLC_HEADER)
582  {
583  // Remove UM RLC header
584  LteRlcHeader rlcHeader;
585  params.pdu->RemoveHeader (rlcHeader);
586  NS_LOG_LOGIC ("UM RLC header: " << rlcHeader);
587  }
588 
589  // Remove PDCP header, if present
591  {
592  params.pdu->RemoveHeader (pdcpHeader);
593  NS_LOG_LOGIC ("PDCP header: " << pdcpHeader);
594  }
595 
596  // Copy data to a string
597  uint32_t dataLen = params.pdu->GetSize ();
598  uint8_t *buf = new uint8_t[dataLen];
599  params.pdu->CopyData (buf, dataLen);
600  m_receivedData = std::string ((char *)buf, dataLen);
601 
602  NS_LOG_LOGIC ("Data (" << dataLen << ") = " << m_receivedData);
603  delete [] buf;
604  }
605 }
606 
607 void
609 {
610  NS_LOG_FUNCTION (this << params.txQueueSize << params.retxQueueSize << params.statusPduSize);
611 
613  {
614  // cancel all previously scheduled TxOpps
615  for (std::list<EventId>::iterator it = m_nextTxOppList.begin ();
616  it != m_nextTxOppList.end ();
617  ++it)
618  {
619  it->Cancel ();
620  }
621  m_nextTxOppList.clear ();
622 
623  int32_t size = params.statusPduSize + params.txQueueSize + params.retxQueueSize;
624  Time time = m_txOppTime;
625  while (size > 0)
626  {
627  EventId e = Simulator::Schedule (time,
629  m_macSapUser, m_txOppSize, 0, 0, 0, params.rnti, params.lcid);
630  m_nextTxOppList.push_back (e);
631  size -= m_txOppSize;
632  time += m_txOppTime;
633  }
634  }
635 }
636 
637 
638 bool
639 LteTestMac::Receive (Ptr<NetDevice> nd, Ptr<const Packet> p, uint16_t protocol, const Address& addr)
640 {
641  NS_LOG_FUNCTION (this << addr << protocol << p->GetSize ());
642 
643  m_rxPdus++;
644  m_rxBytes += p->GetSize ();
645 
646  Ptr<Packet> packet = p->Copy ();
647  m_macSapUser->ReceivePdu (packet, 0, 0);
648  return true;
649 }
650 
651 
652 
653 
654 
655 
656 
657 
659 
661  : m_s1SapProvider (0)
662 {
663  NS_LOG_FUNCTION (this);
665 }
666 
667 
669 {
670  NS_LOG_FUNCTION (this);
671 }
672 
673 
674 void
676 {
677  NS_LOG_FUNCTION (this);
678  delete m_s1SapUser;
679 }
680 
681 TypeId
683 {
684  NS_LOG_FUNCTION ("EpcTestRrc::GetTypeId");
685  static TypeId tid = TypeId ("ns3::EpcTestRrc")
686  .SetParent<Object> ()
687  .AddConstructor<EpcTestRrc> ()
688  ;
689  return tid;
690 }
691 void
693 {
694  m_s1SapProvider = s;
695 }
696 
697 
700 {
701  return m_s1SapUser;
702 }
703 
704 void
706 {
707 
708 }
709 
710 void
712 {
713 
714 }
715 
716 
717 } // namespace ns3
718 
Time GetTxLastTime(void)
Get the last transmit time.
uint32_t RemoveHeader(Header &header)
Deserialize and remove the header from the internal buffer.
Definition: packet.cc:280
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
Time GetRxLastTime(void)
Get the last receive time.
Parameters passed to DataRadioBearerSetupRequest ()
Template for the implementation of the EpcEnbS1SapUser as a member of an owner class of type C to whi...
This class implements the Service Access Point (SAP) between the LteEnbRrc and the EpcEnbApplication...
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:102
EnbMacMemberLteMacSapProvider class.
Definition: lte-mac-sap.h:134
LteRlcSapUser * m_rlcSapUser
RLC SAP user.
uint32_t GetTxBytes(void)
Get the transmit bytes.
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:73
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
void SetPduSize(uint32_t pduSize)
Set the PDU size.
std::string m_receivedData
the received data string
static TypeId GetTypeId(void)
Get the type ID.
uint32_t GetId(void) const
Definition: node.cc:107
This class implements the Service Access Point (SAP) between the LteEnbRrc and the EpcEnbApplication...
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:35
static TypeId GetTypeId(void)
Get the type ID.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition: object-base.h:45
uint32_t GetSize(void) const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
Definition: packet.h:831
NS_ASSERT_MSG(false, "Ipv4AddressGenerator::MaskToIndex(): Impossible")
uint32_t m_rxBytes
number of receive bytes
LteRlcSpecificLteRlcSapUser class.
Definition: lte-rlc-sap.h:124
virtual void DoDispose(void)
Destructor implementation.
LteMacSapProvider * m_macSapProvider
MAC SAP provider.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:202
virtual void DoDispose(void)
Destructor implementation.
uint32_t retxQueueSize
the current size of the RLC retransmission queue in bytes
Definition: lte-mac-sap.h:73
void SetTxOpportunityMode(uint8_t mode)
Set transmit opportunity mode.
void(* Time)(Time oldValue, Time newValue)
TracedValue callback signature for Time.
Definition: nstime.h:740
void SetLteMacLoopback(Ptr< LteTestMac > s)
Set the other side of the MAC Loopback.
virtual void DoReceivePdcpSdu(LtePdcpSapUser::ReceivePdcpSduParameters params)
Interface forwarded by LtePdcpSapUser.
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 ...
uint8_t m_txOpportunityMode
transmit opportunity mode
uint8_t lcid
the logical channel id corresponding to the sending RLC instance
Definition: lte-mac-sap.h:49
EpcEnbS1SapUser * m_s1SapUser
S1 SAP user.
Time m_arrivalTime
next arrival time
uint16_t rnti
the C-RNTI identifying the UE
Definition: lte-mac-sap.h:69
a polymophic address class
Definition: address.h:90
The packet header for the Radio Link Control (RLC) protocol packets.
virtual ~LteTestPdcp(void)
EpcEnbS1SapProvider * m_s1SapProvider
S1 SAP provider.
Parameters for LteMacSapProvider::ReportBufferStatus.
Definition: lte-mac-sap.h:67
void DoReportBufferStatus(LteMacSapProvider::ReportBufferStatusParameters params)
Report buffer status function.
void SendTxOpportunity(Time time, uint32_t bytes)
Send transmit opportunity function.
virtual void ReceivePdu(Ptr< Packet > p, uint16_t rnti, uint8_t lcid)=0
Called by the MAC to notify the RLC of the reception of a new PDU.
Parameters for LtePdcpSapUser::ReceivePdcpSdu.
Definition: lte-pdcp-sap.h:76
Time m_rxLastTime
last reeive time
void SetLteMacSapUser(LteMacSapUser *s)
Set the MAC SAP user.
static EventId Schedule(Time const &delay, MEM mem_ptr, OBJ obj)
Schedule an event to expire after delay.
Definition: simulator.h:1381
LtePdcpSapUser * m_pdcpSapUser
PDCP SAP user.
LtePdcpSapProvider * m_pdcpSapProvider
PDCP SAP provider.
static TypeId GetTypeId(void)
Get the type ID.
LtePdcpSapUser * GetLtePdcpSapUser(void)
Get the PDCP SAP user.
void Start()
Start function.
uint16_t rnti
the C-RNTI identifying the UE
Definition: lte-mac-sap.h:48
void SendData(Time at, std::string dataToSend)
Send data function.
void SetLteRlcSapProvider(LteRlcSapProvider *s)
Set the RLC SAP provider.
uint16_t rnti
the C-RNTI identifying the UE
Definition: lte-pdcp-sap.h:46
Parameters for LtePdcpSapProvider::TransmitPdcpSdu.
Definition: lte-pdcp-sap.h:43
Ptr< NetDevice > m_device
the device
uint32_t GetTxBytes(void)
Get the transmit bytes.
uint32_t m_txBytes
number of transmit bytes
void DoTransmitPdu(LteMacSapProvider::TransmitPduParameters params)
Transmit PDU.
void SetS1SapProvider(EpcEnbS1SapProvider *s)
Set the S1 SAP Provider.
uint32_t GetRxPdus(void)
Get the receive PDUs.
void Stop()
Stop function.
void SetTxOppTime(Time txOppTime)
Set transmit opportunity time.
uint32_t GetRxPdus(void)
Get the receive PDUs.
EpcEnbS1SapUser * GetS1SapUser()
LteRlcSapProvider * m_rlcSapProvider
RLC SAP provider.
RRC stub providing a testing S1 SAP user to be used with the EpcEnbApplication.
The packet header for the AM Radio Link Control (RLC) protocol packets.
uint32_t GetTxPdus(void)
Get the transmit PDUs.
virtual ~LteTestRrc(void)
LteMacSapProvider * GetLteMacSapProvider(void)
Get the MAC SAP provider.
virtual void DoDispose(void)
Destructor implementation.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint32_t m_txPdus
number of transmit PDUs
Ptr< Packet > Copy(void) const
performs a COW copy of the packet.
Definition: packet.cc:121
bool m_pdcpHeaderPresent
PDCP header present?
std::string m_receivedData
the received data
void SetArrivalTime(Time arrivalTime)
Set the arrival time.
static EventId ScheduleNow(MEM mem_ptr, OBJ obj)
Schedule an event to expire Now.
Definition: simulator.h:1570
LtePdcpSpecificLtePdcpSapUser class.
Definition: lte-pdcp-sap.h:132
uint32_t GetTxPdus(void)
Get the transmit PDUs.
PathSwitchRequestAcknowledgeParameters structure.
uint32_t m_pduSize
PDU size.
uint8_t lcid
the logical channel id corresponding to the sending RLC instance
Definition: lte-mac-sap.h:70
void Start()
Start function.
uint32_t txQueueSize
the current size of the RLC transmission queue
Definition: lte-mac-sap.h:71
static Time Now(void)
Return the current simulation virtual time.
Definition: simulator.cc:249
std::string m_receivedData
the received data
std::string GetDataReceived(void)
Get data received function.
NS_LOG_LOGIC("Net device "<< nd<< " is not bridged")
virtual void TransmitPdcpSdu(TransmitPdcpSduParameters params)=0
Send a RRC PDU to the RDCP for transmission This method is to be called when upper RRC entity has a R...
void SetTxOppSize(uint32_t txOppSize)
Set transmit opportunity time.
virtual void DoDispose(void)
Destructor implementation.
uint32_t m_txPdus
the number of transmit PDUs
Ptr< NetDevice > m_device
the device
void DoPathSwitchRequestAcknowledge(EpcEnbS1SapUser::PathSwitchRequestAcknowledgeParameters params)
Path switch request acknowledge function.
Parameters for LteRlcSapProvider::TransmitPdcpPdu.
Definition: lte-rlc-sap.h:43
uint8_t m_rlcHeaderType
RLC header type.
static void ScheduleWithContext(uint32_t context, Time const &delay, MEM mem_ptr, OBJ obj)
Schedule an event with the given context.
Definition: simulator.h:1475
Service Access Point (SAP) offered by the PDCP entity to the RRC entity See 3GPP 36.323 Packet Data Convergence Protocol (PDCP) specification.
Definition: lte-pdcp-sap.h:35
uint16_t statusPduSize
the current size of the pending STATUS RLC PDU message in bytes
Definition: lte-mac-sap.h:75
An identifier for simulation events.
Definition: event-id.h:53
std::string GetDataReceived(void)
Get data received function.
Service Access Point (SAP) offered by the MAC to the RLC See Femto Forum MAC Scheduler Interface Spec...
Definition: lte-mac-sap.h:95
Service Access Point (SAP) offered by the PDCP entity to the RRC entity See 3GPP 36.323 Packet Data Convergence Protocol (PDCP) specification.
Definition: lte-pdcp-sap.h:68
uint32_t CopyData(uint8_t *buffer, uint32_t size) const
Copy the packet contents to a byte buffer.
Definition: packet.cc:378
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:1014
void SetDevice(Ptr< NetDevice > device)
Set the device function.
std::list< EventId > m_nextTxOppList
next transmit opportunity list
uint32_t m_rxPdus
number of receive PDUs
void SendData(Time time, std::string dataToSend)
Send data function.
void Cancel(void)
This method is syntactic sugar for the ns3::Simulator::Cancel method.
Definition: event-id.cc:53
uint32_t m_txBytes
the number of transmit bytes
Service Access Point (SAP) offered by the MAC to the RLC See Femto Forum MAC Scheduler Interface Spec...
Definition: lte-mac-sap.h:36
std::string GetDataReceived(void)
Get data received function.
uint32_t GetRxBytes(void)
Get the receive bytes.
uint32_t m_txOppSize
transmit opportunity size
uint16_t rnti
the C-RNTI identifying the UE
Definition: lte-rlc-sap.h:46
uint32_t GetRxBytes(void)
Get the receive bytes.
The packet header for the Packet Data Convergence Protocol (PDCP) packets.
A base class which provides memory management and object aggregation.
Definition: object.h:87
void DoDataRadioBearerSetupRequest(EpcEnbS1SapUser::DataRadioBearerSetupRequestParameters params)
Data radio bearer setup request.
virtual ~LteTestMac(void)
uint8_t lcid
the logical channel id corresponding to the sending RLC instance
Definition: lte-pdcp-sap.h:47
uint32_t m_rxPdus
the number of receive PDUs
void SetPdcpHeaderPresent(bool present)
Set PDCP header present function.
Ptr< LteTestMac > m_macLoopback
MAC loopback.
a unique identifier for an interface.
Definition: type-id.h:58
uint32_t m_rxBytes
the number of receive bytes
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition: type-id.cc:915
void SetDevice(Ptr< NetDevice > device)
Set the device.
Time m_txLastTime
last transmit time
LteMacSapUser * m_macSapUser
MAC SAP user.
virtual void DoReceivePdcpPdu(Ptr< Packet > p)
Interface forwarded by LteRlcSapUser.
Time m_txOppTime
transmit opportunity time
virtual void NotifyTxOpportunity(uint32_t bytes, uint8_t layer, uint8_t harqId, uint8_t componentCarrierId, uint16_t rnti, uint8_t lcid)=0
Called by the MAC to notify the RLC that the scheduler granted a transmission opportunity to this RLC...
void SetLtePdcpSapProvider(LtePdcpSapProvider *s)
Set the PDCP SAP provider.
static TypeId GetTypeId(void)
Get the type ID.
void SetRlcHeaderType(uint8_t rlcHeaderType)
Set RLC header type.
EventId m_nextPdu
next PDU event
bool Receive(Ptr< NetDevice > nd, Ptr< const Packet > p, uint16_t protocol, const Address &addr)
the Receive function
LteRlcSapUser * GetLteRlcSapUser(void)
Get the RLC SAP user.
Parameters for LteMacSapProvider::TransmitPdu.
Definition: lte-mac-sap.h:45