lte: Add new RaResponseTimeout trace source in LteUeMac
This commit is contained in:
@@ -235,7 +235,13 @@ LteUeMac::GetTypeId (void)
|
||||
static TypeId tid = TypeId ("ns3::LteUeMac")
|
||||
.SetParent<Object> ()
|
||||
.SetGroupName("Lte")
|
||||
.AddConstructor<LteUeMac> ();
|
||||
.AddConstructor<LteUeMac> ()
|
||||
.AddTraceSource ("RaResponseTimeout",
|
||||
"trace fired upon RA response timeout",
|
||||
MakeTraceSourceAccessor (&LteUeMac::m_raResponseTimeoutTrace),
|
||||
"ns3::LteUeMac::RaResponseTimeoutTracedCallback")
|
||||
|
||||
;
|
||||
return tid;
|
||||
}
|
||||
|
||||
@@ -498,6 +504,9 @@ LteUeMac::RaResponseTimeout (bool contention)
|
||||
m_waitingForRaResponse = false;
|
||||
// 3GPP 36.321 5.1.4
|
||||
++m_preambleTransmissionCounter;
|
||||
//fire RA response timeout trace
|
||||
m_raResponseTimeoutTrace (m_imsi, contention, m_preambleTransmissionCounter,
|
||||
m_rachConfig.preambleTransMax + 1);
|
||||
if (m_preambleTransmissionCounter == m_rachConfig.preambleTransMax + 1)
|
||||
{
|
||||
NS_LOG_INFO ("RAR timeout, preambleTransMax reached => giving up");
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include <vector>
|
||||
#include <ns3/packet.h>
|
||||
#include <ns3/packet-burst.h>
|
||||
#include <ns3/traced-callback.h>
|
||||
|
||||
|
||||
namespace ns3 {
|
||||
@@ -60,6 +61,19 @@ public:
|
||||
virtual ~LteUeMac ();
|
||||
virtual void DoDispose (void);
|
||||
|
||||
/**
|
||||
* \brief TracedCallback signature for RA response timeout events
|
||||
* exporting IMSI, contention flag, preamble transmission counter
|
||||
* and the max limit of preamble transmission
|
||||
*
|
||||
* \param [in] imsi
|
||||
* \param [in] contention
|
||||
* \param [in] preambleTxCounter
|
||||
* \param [in] maxPreambleTxLimit
|
||||
*/
|
||||
typedef void (* RaResponseTimeoutTracedCallback)
|
||||
(uint64_t imsi, bool contention, uint8_t preambleTxCounter, uint8_t maxPreambleTxLimit);
|
||||
|
||||
/**
|
||||
* \brief Get the LTE MAC SAP provider
|
||||
* \return a pointer to the LTE MAC SAP provider
|
||||
@@ -273,6 +287,13 @@ private:
|
||||
uint32_t m_subframeNo; ///< subframe number
|
||||
uint8_t m_raRnti; ///< RA RNTI
|
||||
bool m_waitingForRaResponse; ///< waiting for RA response
|
||||
|
||||
/**
|
||||
* \brief The `RaResponseTimeout` trace source. Fired RA response timeout.
|
||||
* Exporting IMSI, contention flag, preamble transmission counter
|
||||
* and the max limit of preamble transmission.
|
||||
*/
|
||||
TracedCallback<uint64_t, bool, uint8_t, uint8_t> m_raResponseTimeoutTrace;
|
||||
};
|
||||
|
||||
} // namespace ns3
|
||||
|
||||
Reference in New Issue
Block a user