21 #include "ns3/simulator.h"
24 #include "ns3/lte-rlc-header.h"
25 #include "ns3/lte-rlc-am-header.h"
26 #include "ns3/lte-pdcp-header.h"
42 .AddConstructor<LteTestRrc> ()
165 uint32_t dataLen = p->
GetSize ();
166 uint8_t *buf =
new uint8_t[dataLen];
173 p->CopyData (buf, dataLen);
226 NS_LOG_LOGIC (
"Data(" << dataToSend.length () <<
") = " << dataToSend.data ());
227 p.
pdcpSdu = Create<Packet> ((uint8_t *) dataToSend.data (), dataToSend.length ());
240 .AddConstructor<LteTestPdcp> ()
297 uint32_t dataLen = p->
GetSize ();
298 uint8_t *buf =
new uint8_t[dataLen];
326 NS_LOG_LOGIC (
"Data(" << dataToSend.length () <<
") = " << dataToSend.data ());
327 p.pdcpPdu = Create<Packet> ((uint8_t *) dataToSend.data (), dataToSend.length ());
329 NS_LOG_LOGIC (
"Packet(" << p.pdcpPdu->GetSize () <<
")");
340 .AddConstructor<LteTestMac> ()
556 uint8_t *buf =
new uint8_t[dataLen];
615 : m_s1SapProvider (0)
641 .AddConstructor<EpcTestRrc> ()
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...
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...
keep track of time values and allow control of global simulation resolution
LteRlcSapUser * m_rlcSapUser
uint32_t GetTxBytes(void)
#define NS_LOG_FUNCTION(parameters)
void SetPduSize(uint32_t pduSize)
std::string m_receivedData
static TypeId GetTypeId(void)
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)
void DoReportBufferStatus(LteMacSapProvider::ReportBufferStatusParameters)
virtual void DoDispose(void)
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
LteMacSapProvider * m_macSapProvider
NS_OBJECT_ENSURE_REGISTERED(NullMessageSimulatorImpl)
virtual void NotifyTxOpportunity(uint32_t bytes, uint8_t layer, uint8_t harqId)=0
Called by the MAC to notify the RLC that the scheduler granted a transmission opportunity to this RLC...
uint32_t GetSize(void) const
virtual void DoDispose(void)
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
uint32_t retxQueueSize
the current size of the RLC retransmission queue in bytes
void SetTxOpportunityMode(uint8_t mode)
void SetLteMacLoopback(Ptr< LteTestMac > s)
Set the other side of the MAC Loopback.
virtual void DoReceivePdcpSdu(LtePdcpSapUser::ReceivePdcpSduParameters params)
PDCP SAP.
static EventId Schedule(Time const &time, MEM mem_ptr, OBJ obj)
Schedule an event to expire at the relative time "time" is reached.
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
EpcEnbS1SapUser * m_s1SapUser
a polymophic address class
virtual ~LteTestPdcp(void)
EpcEnbS1SapProvider * m_s1SapProvider
Parameters for LteMacSapProvider::ReportBufferStatus.
Ptr< Packet > pdcpSdu
the RRC PDU
Parameters for LtePdcpSapUser::ReceivePdcpSdu.
void SetLteMacSapUser(LteMacSapUser *s)
Set the MAC SAP user.
LtePdcpSapUser * m_pdcpSapUser
LtePdcpSapProvider * m_pdcpSapProvider
static TypeId GetTypeId(void)
LtePdcpSapUser * GetLtePdcpSapUser(void)
Get the PDCP SAP user.
void SendData(Time at, std::string dataToSend)
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
uint32_t GetTxBytes(void)
void SetS1SapProvider(EpcEnbS1SapProvider *s)
Set the S1 SAP Provider.
#define NS_LOG_LOGIC(msg)
void SetTxOppTime(Time txOppTime)
EpcEnbS1SapUser * GetS1SapUser()
LteRlcSapProvider * m_rlcSapProvider
Ptr< Packet > Copy(void) const
RRC stub providing a testing S1 SAP user to be used with the EpcEnbApplication.
virtual ~LteTestRrc(void)
LteMacSapProvider * GetLteMacSapProvider(void)
Get the MAC SAP provider.
virtual void DoDispose(void)
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
Ptr< Packet > pdcpSdu
the RRC PDU
std::string m_receivedData
void SetArrivalTime(Time arrivalTime)
static EventId ScheduleNow(MEM mem_ptr, OBJ obj)
Schedule an event to expire Now.
uint32_t txQueueSize
the current size of the RLC transmission queue
static Time Now(void)
Return the "current simulation time".
std::string m_receivedData
std::string GetDataReceived(void)
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)
virtual void DoDispose(void)
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
void DoPathSwitchRequestAcknowledge(EpcEnbS1SapUser::PathSwitchRequestAcknowledgeParameters params)
Parameters for LteRlcSapProvider::TransmitPdcpPdu.
#define NS_ASSERT_MSG(condition, message)
void SendTxOpportunity(Time, uint32_t)
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
NS_LOG_COMPONENT_DEFINE("LteTestEntities")
std::string GetDataReceived(void)
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.
void SetDevice(Ptr< NetDevice > device)
void SendData(Time time, std::string dataToSend)
Ptr< Packet > pdu
the RLC PDU
void Cancel(void)
This method is syntactic sugar for the ns3::Simulator::cancel method.
virtual void ReceivePdu(Ptr< Packet > p)=0
Called by the MAC to notify the RLC of the reception of a new PDU.
Service Access Point (SAP) offered by the MAC to the RLC See Femto Forum MAC Scheduler Interface Spec...
std::string GetDataReceived(void)
uint32_t GetRxBytes(void)
uint32_t CopyData(uint8_t *buffer, uint32_t size) const
Copy the packet contents to a byte buffer.
uint16_t rnti
the C-RNTI identifying the UE
uint32_t GetRxBytes(void)
void DoTransmitPdu(LteMacSapProvider::TransmitPduParameters)
MAC SAP.
a base class which provides memory management and object aggregation
void DoDataRadioBearerSetupRequest(EpcEnbS1SapUser::DataRadioBearerSetupRequestParameters params)
virtual ~LteTestMac(void)
uint8_t lcid
the logical channel id corresponding to the sending RLC instance
void SetPdcpHeaderPresent(bool present)
Ptr< LteTestMac > m_macLoopback
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
LteMacSapUser * m_macSapUser
virtual void DoReceivePdcpPdu(Ptr< Packet > p)
RLC SAP.
void SetLtePdcpSapProvider(LtePdcpSapProvider *s)
Set the PDCP SAP provider.
static TypeId GetTypeId(void)
void SetRlcHeaderType(uint8_t rlcHeaderType)
bool Receive(Ptr< NetDevice > nd, Ptr< const Packet > p, uint16_t protocol, const Address &addr)
LteRlcSapUser * GetLteRlcSapUser(void)
Get the RLC SAP user.
Parameters for LteMacSapProvider::TransmitPdu.