lte: Verify that the num of SF used for in/out of Sync evaluation are multiple of 10

This commit is contained in:
ZorazeAli
2019-05-03 16:59:00 +02:00
parent c05e3fc068
commit 0702fd3d11
2 changed files with 76 additions and 2 deletions

View File

@@ -330,13 +330,15 @@ LteUePhy::GetTypeId (void)
"This specifies the total number of consecutive subframes"
"which corresponds to the Qout evaluation period",
UintegerValue (200), //see 3GPP 3GPP TS 36.133 7.6.2.1
MakeUintegerAccessor (&LteUePhy::m_numOfQoutEvalSf),
MakeUintegerAccessor (&LteUePhy::SetNumQoutEvalSf,
&LteUePhy::GetNumQoutEvalSf),
MakeUintegerChecker<uint16_t> ())
.AddAttribute ("NumQinEvalSf",
"This specifies the total number of consecutive subframes"
"which corresponds to the Qin evaluation period",
UintegerValue (100), //see 3GPP 3GPP TS 36.133 7.6.2.1
MakeUintegerAccessor (&LteUePhy::m_numOfQinEvalSf),
MakeUintegerAccessor (&LteUePhy::SetNumQinEvalSf,
&LteUePhy::GetNumQinEvalSf),
MakeUintegerChecker<uint16_t> ())
.AddAttribute ("EnableRlfDetection",
"If true, RLF detection will be enabled.",
@@ -448,6 +450,38 @@ LteUePhy::GetUlSpectrumPhy () const
return m_uplinkSpectrumPhy;
}
void
LteUePhy::SetNumQoutEvalSf (uint16_t numSubframes)
{
NS_LOG_FUNCTION (this << numSubframes);
NS_ABORT_MSG_IF (numSubframes % 10 != 0, "Number of subframes used for Qout "
"evaluation must be multiple of 10");
m_numOfQoutEvalSf = numSubframes;
}
void
LteUePhy::SetNumQinEvalSf (uint16_t numSubframes)
{
NS_LOG_FUNCTION (this << numSubframes);
NS_ABORT_MSG_IF (numSubframes % 10 != 0, "Number of subframes used for Qin "
"evaluation must be multiple of 10");
m_numOfQinEvalSf = numSubframes;
}
uint16_t
LteUePhy::GetNumQoutEvalSf (void) const
{
NS_LOG_FUNCTION (this);
return m_numOfQoutEvalSf;
}
uint16_t
LteUePhy::GetNumQinEvalSf (void) const
{
NS_LOG_FUNCTION (this);
return m_numOfQinEvalSf;
}
void
LteUePhy::DoSendMacPdu (Ptr<Packet> p)
{

View File

@@ -421,6 +421,46 @@ private:
* \param s the destination state
*/
void SwitchToState (State s);
/**
* \brief Set number of Qout evaluation subframes
*
* The number passed to this method should be multiple
* of 10. This number specifies the total number of consecutive
* subframes, which corresponds to the Qout evaluation period.
*
* \param numSubframes the number of subframes
*/
void SetNumQoutEvalSf (uint16_t numSubframes);
/**
* \brief Set number of Qin evaluation subframes
*
* The number passed to this method should be multiple
* of 10. This number specifies the total number of consecutive
* subframes, which corresponds to the Qin evaluation period.
*
* \param numSubframes the number of subframes
*/
void SetNumQinEvalSf (uint16_t numSubframes);
/**
* \brief Get number of Qout evaluation subframes
*
* The number returned by this method specifies the
* total number of consecutive subframes, which corresponds
* to the Qout evaluation period.
*
* \return the number of consecutive subframes used for Qout evaluation
*/
uint16_t GetNumQoutEvalSf () const;
/**
* \brief Get number of Qin evaluation subframes
*
* The number returned by this method specifies the
* total number of consecutive subframes, which corresponds
* to the Qin evaluation period.
*
* \return the number of consecutive subframes used for Qin evaluation
*/
uint16_t GetNumQinEvalSf () const;
// UE CPHY SAP methods
/**