mirror of https://github.com/PentHertz/srsLTE.git
add getter for PDCP ul/dl counter
This commit is contained in:
parent
e2470685a5
commit
f56592b0fe
|
@ -251,6 +251,8 @@ public:
|
|||
srslte::INTEGRITY_ALGORITHM_ID_ENUM integ_algo_) = 0;
|
||||
virtual void enable_integrity(uint32_t lcid) = 0;
|
||||
virtual void enable_encryption(uint32_t lcid) = 0;
|
||||
virtual uint32_t get_dl_count(uint32_t lcid) = 0;
|
||||
virtual uint32_t get_ul_count(uint32_t lcid) = 0;
|
||||
};
|
||||
|
||||
// PDCP interface for RLC
|
||||
|
|
|
@ -72,6 +72,8 @@ public:
|
|||
INTEGRITY_ALGORITHM_ID_ENUM integ_algo);
|
||||
void enable_integrity(uint32_t lcid);
|
||||
void enable_encryption(uint32_t lcid);
|
||||
uint32_t get_dl_count(uint32_t lcid);
|
||||
uint32_t get_ul_count(uint32_t lcid);
|
||||
|
||||
// RLC interface
|
||||
void write_pdu(uint32_t lcid, byte_buffer_t *sdu);
|
||||
|
|
|
@ -83,6 +83,8 @@ public:
|
|||
INTEGRITY_ALGORITHM_ID_ENUM integ_algo_);
|
||||
void enable_integrity();
|
||||
void enable_encryption();
|
||||
uint32_t get_dl_count();
|
||||
uint32_t get_ul_count();
|
||||
|
||||
// RLC interface
|
||||
void write_pdu(byte_buffer_t *pdu);
|
||||
|
|
|
@ -62,6 +62,8 @@ public:
|
|||
INTEGRITY_ALGORITHM_ID_ENUM integ_algo_) = 0;
|
||||
virtual void enable_integrity() = 0;
|
||||
virtual void enable_encryption() = 0;
|
||||
virtual uint32_t get_dl_count() = 0;
|
||||
virtual uint32_t get_ul_count() = 0;
|
||||
|
||||
// RLC interface
|
||||
virtual void write_pdu(byte_buffer_t *pdu) = 0;
|
||||
|
|
|
@ -231,6 +231,29 @@ void pdcp::enable_encryption(uint32_t lcid)
|
|||
pthread_rwlock_unlock(&rwlock);
|
||||
}
|
||||
|
||||
uint32_t pdcp::get_dl_count(uint32_t lcid)
|
||||
{
|
||||
int ret = 0;
|
||||
pthread_rwlock_rdlock(&rwlock);
|
||||
if (valid_lcid(lcid)) {
|
||||
ret = pdcp_array.at(lcid)->get_dl_count();
|
||||
}
|
||||
pthread_rwlock_unlock(&rwlock);
|
||||
return ret;
|
||||
}
|
||||
|
||||
uint32_t pdcp::get_ul_count(uint32_t lcid)
|
||||
{
|
||||
int ret = 0;
|
||||
pthread_rwlock_rdlock(&rwlock);
|
||||
if (valid_lcid(lcid)) {
|
||||
ret = pdcp_array.at(lcid)->get_ul_count();
|
||||
}
|
||||
pthread_rwlock_unlock(&rwlock);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
RLC interface
|
||||
*******************************************************************************/
|
||||
|
|
|
@ -408,6 +408,17 @@ uint8_t pdcp_entity::get_bearer_id(uint8_t lcid)
|
|||
}
|
||||
|
||||
|
||||
uint32_t pdcp_entity::get_dl_count()
|
||||
{
|
||||
return rx_count;
|
||||
}
|
||||
|
||||
|
||||
uint32_t pdcp_entity::get_ul_count()
|
||||
{
|
||||
return tx_count;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Pack/Unpack helper functions
|
||||
* Ref: 3GPP TS 36.323 v10.1.0
|
||||
|
|
Loading…
Reference in New Issue