|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
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> ()
Parameters for LteMacSapProvider::TransmitPdu.
void DoInitialContextSetupRequest(EpcEnbS1SapUser::InitialContextSetupRequestParameters params)
Initial context setup request.
a unique identifier for an interface.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
virtual void DoDispose(void)
Destructor implementation.
uint32_t m_pduSize
PDU size.
bool m_pdcpHeaderPresent
PDCP header present?
void SetLteMacSapUser(LteMacSapUser *s)
Set the MAC SAP user.
uint32_t retxQueueSize
the current size of the RLC retransmission queue in bytes
uint32_t GetRxPdus(void)
Get the receive PDUs.
uint16_t rnti
the C-RNTI identifying the UE
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
void SetTxOppTime(Time txOppTime)
Set transmit opportunity time.
Service Access Point (SAP) offered by the MAC to the RLC See Femto Forum MAC Scheduler Interface Spec...
Ptr< Packet > p
the RLC PDU to be received
LtePdcpSapProvider * m_pdcpSapProvider
PDCP SAP provider.
std::string m_receivedData
the received data string
static void ScheduleWithContext(uint32_t context, Time const &delay, FUNC f, Ts &&... args)
Schedule an event with the given context.
bool Receive(Ptr< NetDevice > nd, Ptr< const Packet > p, uint16_t protocol, const Address &addr)
the Receive function
Time m_arrivalTime
next arrival time
uint32_t m_rxBytes
number of receive bytes
LteMacSapUser * m_macSapUser
MAC SAP user.
An identifier for simulation events.
uint32_t GetTxPdus(void)
Get the transmit PDUs.
Parameters passed to InitialContextSetupRequest ()
uint32_t GetSize(void) const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
uint32_t GetId(void) const
void SetS1SapProvider(EpcEnbS1SapProvider *s)
Set the S1 SAP Provider.
static Time Now(void)
Return the current simulation virtual time.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::list< EventId > m_nextTxOppList
next transmit opportunity list
Parameters for LteMacSapUser::NotifyTxOpportunity.
void Start()
Start function.
Parameters passed to DataRadioBearerSetupRequest ()
LteMacSapProvider * m_macSapProvider
MAC SAP provider.
virtual ~LteTestRrc(void)
Ptr< NetDevice > m_device
the device
std::string m_receivedData
the received data
void SetArrivalTime(Time arrivalTime)
Set the arrival time.
Service Access Point (SAP) offered by the UM-RLC and AM-RLC entities to the PDCP entity See 3GPP 36....
void SetTxOpportunityMode(uint8_t mode)
Set transmit opportunity mode.
virtual ~LteTestPdcp(void)
uint32_t CopyData(uint8_t *buffer, uint32_t size) const
Copy the packet contents to a byte buffer.
RRC stub providing a testing S1 SAP user to be used with the EpcEnbApplication.
Ptr< Packet > pdcpSdu
the RRC PDU
uint16_t rnti
the C-RNTI identifying the UE
uint32_t m_txBytes
the number of transmit bytes
uint8_t m_rlcHeaderType
RLC header type.
uint8_t lcid
the logical channel id
void SetDevice(Ptr< NetDevice > device)
Set the device.
Parameters for LtePdcpSapUser::ReceivePdcpSdu.
static EventId Schedule(Time const &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
Ptr< Packet > pdu
the RLC PDU
void SendData(Time time, std::string dataToSend)
Send data function.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
friend class LteRlcSpecificLteRlcSapUser< LteTestPdcp >
allow LteRlcSpecificLteRlcSapUser<LteTestPdcp> class friend access
uint32_t GetRxBytes(void)
Get the receive bytes.
LteRlcSapUser * m_rlcSapUser
RLC SAP user.
void SetLteMacLoopback(Ptr< LteTestMac > s)
Set the other side of the MAC Loopback.
uint16_t rnti
the C-RNTI identifying the UE
This class implements the Service Access Point (SAP) between the LteEnbRrc and the EpcEnbApplication.
uint8_t m_txOpportunityMode
transmit opportunity mode
uint8_t lcid
the logical channel id
virtual ~LteTestMac(void)
uint32_t m_rxPdus
the number of receive PDUs
void SetDevice(Ptr< NetDevice > device)
Set the device function.
uint32_t m_rxBytes
the number of receive bytes
uint32_t m_txPdus
number of transmit PDUs
uint32_t GetRxBytes(void)
Get the receive bytes.
Parameters for LteMacSapProvider::ReportBufferStatus.
virtual void DoReceivePdcpPdu(Ptr< Packet > p)
Interface forwarded by LteRlcSapUser.
a polymophic address class
virtual void NotifyTxOpportunity(TxOpportunityParameters params)=0
Called by the MAC to notify the RLC that the scheduler granted a transmission opportunity to this RLC...
void SetPdcpHeaderPresent(bool present)
Set PDCP header present function.
A base class which provides memory management and object aggregation.
LteMacSapProvider * GetLteMacSapProvider(void)
Get the MAC SAP provider.
Ptr< NetDevice > m_device
the device
virtual Ptr< Node > GetNode(void) const =0
void DoTransmitPdu(LteMacSapProvider::TransmitPduParameters params)
Transmit PDU.
uint32_t RemoveHeader(Header &header)
Deserialize and remove the header from the internal buffer.
void Cancel(void)
This method is syntactic sugar for the ns3::Simulator::Cancel method.
uint32_t txQueueSize
the current size of the RLC transmission queue
std::string GetDataReceived(void)
Get data received function.
This class implements the Service Access Point (SAP) between the LteEnbRrc and the EpcEnbApplication.
Parameters for LteMacSapUser::ReceivePdu.
void SetRlcHeaderType(uint8_t rlcHeaderType)
Set RLC header type.
friend class LtePdcpSpecificLtePdcpSapUser< LteTestRrc >
allow LtePdcpSpecificLtePdcpSapUser<LteTestRrc> class friend access
Simulation virtual time values and global simulation resolution.
virtual bool Send(Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber)=0
Time m_txOppTime
transmit opportunity time
Time m_txLastTime
last transmit time
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
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 lcid
the logical channel id corresponding to the sending RLC instance
void DoPathSwitchRequestAcknowledge(EpcEnbS1SapUser::PathSwitchRequestAcknowledgeParameters params)
Path switch request acknowledge function.
PathSwitchRequestAcknowledgeParameters structure.
virtual void DoDispose(void)
Destructor implementation.
void Stop()
Stop function.
LteRlcSapProvider * m_rlcSapProvider
RLC SAP provider.
void Start()
Start function.
uint32_t m_txBytes
number of transmit bytes
uint8_t harqId
the HARQ ID
Service Access Point (SAP) offered by the PDCP entity to the RRC entity See 3GPP 36....
static TypeId GetTypeId(void)
Get the type ID.
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
void DoReportBufferStatus(LteMacSapProvider::ReportBufferStatusParameters params)
Report buffer status function.
void SendTxOpportunity(Time time, uint32_t bytes)
Send transmit opportunity function.
uint32_t GetTxPdus(void)
Get the transmit PDUs.
LtePdcpSapUser * m_pdcpSapUser
PDCP SAP user.
Parameters for LteRlcSapProvider::TransmitPdcpPdu.
Service Access Point (SAP) offered by the MAC to the RLC See Femto Forum MAC Scheduler Interface Spec...
Ptr< LteTestMac > m_macLoopback
MAC loopback.
LteRlcSapUser * GetLteRlcSapUser(void)
Get the RLC SAP user.
uint32_t GetTxBytes(void)
Get the transmit bytes.
virtual void DoDispose(void)
Destructor implementation.
Time Seconds(double value)
Construct a Time in the indicated unit.
Ptr< Packet > pdcpPdu
the PDCP PDU
Parameters for LtePdcpSapProvider::TransmitPdcpSdu.
Ptr< Packet > Copy(void) const
performs a COW copy of the packet.
virtual void DoReceivePdcpSdu(LtePdcpSapUser::ReceivePdcpSduParameters params)
Interface forwarded by LtePdcpSapUser.
virtual void TransmitPdcpSdu(TransmitPdcpSduParameters params)=0
Send RRC PDU parameters to the PDCP for transmission.
static TypeId GetTypeId(void)
Get the type ID.
uint8_t lcid
the logical channel id corresponding to the sending RLC instance
EpcEnbS1SapUser * m_s1SapUser
S1 SAP user.
void SetLtePdcpSapProvider(LtePdcpSapProvider *s)
Set the PDCP SAP provider.
uint8_t componentCarrierId
the component carrier id
friend class MemberEpcEnbS1SapUser< EpcTestRrc >
allow MemberEpcEnbS1SapUser<EpcTestRrc> class friend access
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
friend class EnbMacMemberLteMacSapProvider< LteTestMac >
allow EnbMacMemberLteMacSapProvider<LteTestMac> class friend access
void SetPduSize(uint32_t pduSize)
Set the PDU size.
uint32_t m_rxPdus
number of receive PDUs
uint32_t bytes
the number of bytes to transmit
uint16_t rnti
the C-RNTI identifying the UE
uint32_t GetTxBytes(void)
Get the transmit bytes.
virtual Address GetBroadcast(void) const =0
EpcEnbS1SapUser * GetS1SapUser()
void(* Time)(Time oldValue, Time newValue)
TracedValue callback signature for Time.
void SendData(Time at, std::string dataToSend)
Send data function.
static TypeId GetTypeId(void)
Get the type ID.
uint8_t lcid
the logical channel id corresponding to the sending RLC instance
LtePdcpSapUser * GetLtePdcpSapUser(void)
Get the PDCP SAP user.
std::string GetDataReceived(void)
Get data received function.
uint16_t rnti
the C-RNTI identifying the UE
Time GetRxLastTime(void)
Get the last receive time.
uint32_t m_txPdus
the number of transmit PDUs
Ptr< Packet > pdcpSdu
the RRC PDU
uint32_t GetRxPdus(void)
Get the receive PDUs.
Time GetTxLastTime(void)
Get the last transmit time.
uint8_t layer
the layer of transmission (MIMO)
void DoDataRadioBearerSetupRequest(EpcEnbS1SapUser::DataRadioBearerSetupRequestParameters params)
Data radio bearer setup request.
EpcEnbS1SapProvider * m_s1SapProvider
S1 SAP provider.
uint8_t lcid
the logical channel id corresponding to the sending RLC instance
std::string GetDataReceived(void)
Get data received function.
void SetTxOppSize(uint32_t txOppSize)
Set transmit opportunity time.
Time m_rxLastTime
last reeive time
void SetLteRlcSapProvider(LteRlcSapProvider *s)
Set the RLC SAP provider.
Service Access Point (SAP) offered by the PDCP entity to the RRC entity See 3GPP 36....
std::string m_receivedData
the received data
static EventId ScheduleNow(FUNC f, Ts &&... args)
Schedule an event to expire Now.
static TypeId GetTypeId(void)
Get the type ID.
EventId m_nextPdu
next PDU event
uint16_t statusPduSize
the current size of the pending STATUS RLC PDU message in bytes
virtual void DoDispose(void)
Destructor implementation.
uint32_t m_txOppSize
transmit opportunity size
Service Access Point (SAP) offered by the UM-RLC and AM-RLC entities to the PDCP entity See 3GPP 36....
uint16_t rnti
the C-RNTI identifying the UE
virtual void ReceivePdu(ReceivePduParameters params)=0
Called by the MAC to notify the RLC of the reception of a new PDU.