21 #include "ns3/simulator.h" 25 #include "ns3/lte-rlc-header.h" 26 #include "ns3/lte-rlc-am-header.h" 27 #include "ns3/lte-pdcp-header.h" 42 .AddConstructor<LteTestRrc> ()
171 uint32_t dataLen = p->
GetSize ();
172 uint8_t *buf =
new uint8_t[dataLen];
179 p->CopyData (buf, dataLen);
207 bool haveContext =
false;
250 NS_LOG_LOGIC (
"Data(" << dataToSend.length () <<
") = " << dataToSend.data ());
251 p.
pdcpSdu = Create<Packet> ((uint8_t *) dataToSend.data (), dataToSend.length ());
264 .AddConstructor<LteTestPdcp> ()
321 uint32_t dataLen = p->
GetSize ();
322 uint8_t *buf =
new uint8_t[dataLen];
350 NS_LOG_LOGIC (
"Data(" << dataToSend.length () <<
") = " << dataToSend.data ());
351 p.pdcpPdu = Create<Packet> ((uint8_t *) dataToSend.data (), dataToSend.length ());
353 NS_LOG_LOGIC (
"Packet(" << p.pdcpPdu->GetSize () <<
")");
364 .AddConstructor<LteTestMac> ()
477 bool haveContext =
false;
598 uint8_t *buf =
new uint8_t[dataLen];
661 : m_s1SapProvider (0)
687 .AddConstructor<EpcTestRrc> ()
Time GetTxLastTime(void)
Get the last transmit time.
uint32_t RemoveHeader(Header &header)
Deserialize and remove the header from the internal buffer.
Service Access Point (SAP) offered by the UM-RLC and AM-RLC entities to the PDCP entity See 3GPP 36...
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.
EnbMacMemberLteMacSapProvider class.
LteRlcSapUser * m_rlcSapUser
RLC SAP user.
uint32_t GetTxBytes(void)
Get the transmit bytes.
Smart pointer class similar to boost::intrusive_ptr.
#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
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...
static TypeId GetTypeId(void)
Get the type ID.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
uint32_t GetSize(void) const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
NS_ASSERT_MSG(false, "Ipv4AddressGenerator::MaskToIndex(): Impossible")
uint32_t m_rxBytes
number of receive bytes
LteRlcSpecificLteRlcSapUser class.
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.
virtual void DoDispose(void)
Destructor implementation.
uint32_t retxQueueSize
the current size of the RLC retransmission queue in bytes
void SetTxOpportunityMode(uint8_t mode)
Set transmit opportunity mode.
void(* Time)(Time oldValue, Time newValue)
TracedValue callback signature for Time.
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
EpcEnbS1SapUser * m_s1SapUser
S1 SAP user.
Time m_arrivalTime
next arrival time
uint16_t rnti
the C-RNTI identifying the UE
a polymophic address class
virtual ~LteTestPdcp(void)
EpcEnbS1SapProvider * m_s1SapProvider
S1 SAP provider.
Parameters for LteMacSapProvider::ReportBufferStatus.
void DoReportBufferStatus(LteMacSapProvider::ReportBufferStatusParameters params)
Report buffer status function.
void SendTxOpportunity(Time time, uint32_t bytes)
Send transmit opportunity function.
Ptr< Packet > pdcpSdu
the RRC PDU
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.
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.
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
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
Parameters for LtePdcpSapProvider::TransmitPdcpSdu.
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.
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 > pdcpSdu
the RRC PDU
Ptr< Packet > Copy(void) const
performs a COW copy of the packet.
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.
LtePdcpSpecificLtePdcpSapUser class.
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
void Start()
Start function.
uint32_t txQueueSize
the current size of the RLC transmission queue
static Time Now(void)
Return the current simulation virtual time.
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.
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.
Service Access Point (SAP) offered by the PDCP entity to the RRC entity See 3GPP 36.323 Packet Data Convergence Protocol (PDCP) specification.
uint16_t statusPduSize
the current size of the pending STATUS RLC PDU message in bytes
An identifier for simulation events.
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...
Service Access Point (SAP) offered by the PDCP entity to the RRC entity See 3GPP 36.323 Packet Data Convergence Protocol (PDCP) specification.
uint32_t CopyData(uint8_t *buffer, uint32_t size) const
Copy the packet contents to a byte buffer.
Time Seconds(double value)
Construct a Time in the indicated unit.
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.
Ptr< Packet > pdu
the RLC PDU
void Cancel(void)
This method is syntactic sugar for the ns3::Simulator::Cancel method.
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...
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
uint32_t GetRxBytes(void)
Get the receive bytes.
A base class which provides memory management and object aggregation.
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
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.
uint32_t m_rxBytes
the number of receive bytes
TypeId SetParent(TypeId tid)
Set the parent TypeId.
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.