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];
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 ());
364 .AddConstructor<LteTestMac> ()
477 bool haveContext =
false;
488 txOpParmas.
bytes = bytes;
489 txOpParmas.
layer = 0;
570 rxPduParams.
p = params.
pdu;
611 uint8_t *buf =
new uint8_t[dataLen];
640 txOpParmas.
layer = 0;
668 rxPduParams.
p = packet;
669 rxPduParams.
rnti = 0;
670 rxPduParams.
lcid = 0;
685 : m_s1SapProvider (0)
711 .AddConstructor<EpcTestRrc> ()
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.
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.
void Cancel(void)
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(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 Ptr< Node > GetNode(void) const =0
virtual Address GetBroadcast(void) const =0
virtual bool Send(Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber)=0
uint32_t GetId(void) const
A base class which provides memory management and object aggregation.
uint32_t RemoveHeader(Header &header)
Deserialize and remove the header from the internal buffer.
uint32_t CopyData(uint8_t *buffer, uint32_t size) const
Copy the packet contents to a byte buffer.
Ptr< Packet > Copy(void) const
performs a COW copy of the packet.
uint32_t GetSize(void) const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
static EventId Schedule(Time const &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
static void ScheduleWithContext(uint32_t context, Time const &delay, FUNC f, Ts &&... args)
Schedule an event with the given context.
static EventId ScheduleNow(FUNC f, Ts &&... args)
Schedule an event to expire Now.
static Time Now(void)
Return the current simulation virtual time.
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.
Parameters passed to DataRadioBearerSetupRequest ()
Parameters passed to InitialContextSetupRequest ()
PathSwitchRequestAcknowledgeParameters structure.
Parameters for LteMacSapProvider::ReportBufferStatus.
uint32_t txQueueSize
the current size of the RLC transmission queue
uint32_t retxQueueSize
the current size of the RLC retransmission queue in bytes
uint8_t lcid
the logical channel id corresponding to the sending RLC instance
uint16_t rnti
the C-RNTI identifying the UE
uint16_t statusPduSize
the current size of the pending STATUS RLC PDU message in bytes
Parameters for LteMacSapProvider::TransmitPdu.
uint16_t rnti
the C-RNTI identifying the UE
uint8_t lcid
the logical channel id corresponding to the sending RLC instance
Ptr< Packet > pdu
the RLC PDU
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.
Ptr< Packet > pdcpSdu
the RRC PDU
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