23 #include "ns3/lte-pdcp-header.h"
24 #include "ns3/lte-rlc-am-header.h"
25 #include "ns3/lte-rlc-header.h"
27 #include "ns3/simulator.h"
164 uint32_t dataLen = p->
GetSize();
165 auto buf =
new uint8_t[dataLen];
200 bool haveContext =
false;
247 NS_LOG_LOGIC(
"Data(" << dataToSend.length() <<
") = " << dataToSend.data());
248 p.
pdcpSdu = Create<Packet>((uint8_t*)dataToSend.data(), dataToSend.length());
314 uint32_t dataLen = p->
GetSize();
315 auto buf =
new uint8_t[dataLen];
343 NS_LOG_LOGIC(
"Data(" << dataToSend.length() <<
") = " << dataToSend.data());
344 p.
pdcpPdu = Create<Packet>((uint8_t*)dataToSend.data(), dataToSend.length());
466 bool haveContext =
false;
477 txOpParams.
bytes = bytes;
478 txOpParams.
layer = 0;
589 params.pdu->RemoveHeader(rlcAmHeader);
596 params.pdu->RemoveHeader(rlcHeader);
603 params.pdu->RemoveHeader(pdcpHeader);
608 uint32_t dataLen =
params.pdu->GetSize();
609 auto buf =
new uint8_t[dataLen];
610 params.pdu->CopyData(buf, dataLen);
636 txOpParams.
layer = 0;
664 rxPduParams.
p = packet;
665 rxPduParams.
rnti = 0;
666 rxPduParams.
lcid = 0;
674 : m_s1SapProvider(nullptr)
a polymophic address class
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.
void Cancel()
This method is syntactic sugar for the ns3::Simulator::Cancel method.
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 MAC to the RLC See Femto Forum MAC Scheduler Interface Spec...
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.
Service Access Point (SAP) offered by the PDCP entity to the RRC entity See 3GPP 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....
Service Access Point (SAP) offered by the UM-RLC and AM-RLC entities to the PDCP entity See 3GPP 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....
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.
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.
A base class which provides memory management and object aggregation.
uint32_t GetSize() const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
uint32_t CopyData(uint8_t *buffer, uint32_t size) const
Copy the packet contents to a byte buffer.
Ptr< Packet > Copy() const
performs a COW copy of the packet.
Smart pointer class similar to boost::intrusive_ptr.
static EventId Schedule(const Time &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
static void ScheduleWithContext(uint32_t context, const Time &delay, FUNC f, Ts &&... args)
Schedule an event with the given context.
static Time Now()
Return the current simulation virtual time.
static EventId ScheduleNow(FUNC f, Ts &&... args)
Schedule an event to expire Now.
Simulation virtual time values and global simulation resolution.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
#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.
Time Seconds(double value)
Construct a Time in the indicated unit.
void(* Time)(Time oldValue, Time newValue)
TracedValue callback signature for Time.
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.
Parameters for LteMacSapProvider::TransmitPdu.
Parameters for LteMacSapUser::ReceivePdu.
Ptr< Packet > p
the RLC PDU to be received
uint8_t lcid
the logical channel id
uint16_t rnti
the C-RNTI identifying the UE
Parameters for LteMacSapUser::NotifyTxOpportunity.
uint8_t harqId
the HARQ ID
uint16_t rnti
the C-RNTI identifying the UE
uint32_t bytes
the number of bytes to transmit
uint8_t componentCarrierId
the component carrier id
uint8_t layer
the layer of transmission (MIMO)
uint8_t lcid
the logical channel id
Parameters for LtePdcpSapProvider::TransmitPdcpSdu.
uint8_t lcid
the logical channel id corresponding to the sending RLC instance
Ptr< Packet > pdcpSdu
the RRC PDU
uint16_t rnti
the C-RNTI identifying the UE
Parameters for LtePdcpSapUser::ReceivePdcpSdu.
Parameters for LteRlcSapProvider::TransmitPdcpPdu.
uint8_t lcid
the logical channel id corresponding to the sending RLC instance
Ptr< Packet > pdcpPdu
the PDCP PDU
uint16_t rnti
the C-RNTI identifying the UE