make LCID of GW object a parameter

master
Andre Puschmann 8 years ago
parent 83c358d33f
commit 60da04ef58

@ -46,7 +46,7 @@ class gw
{ {
public: public:
gw(); gw();
void init(srsue::pdcp_interface_gw *pdcp_, srsue::rrc_interface_gw *rrc_, srsue::ue_interface *ue_, log *gw_log_); void init(srsue::pdcp_interface_gw *pdcp_, srsue::rrc_interface_gw *rrc_, srsue::ue_interface *ue_, log *gw_log_, uint32_t lcid_);
void stop(); void stop();
void get_metrics(gw_metrics_t &m); void get_metrics(gw_metrics_t &m);
@ -73,6 +73,7 @@ private:
struct ifreq ifr; struct ifreq ifr;
int32 sock; int32 sock;
bool if_up; bool if_up;
uint32_t lcid;
long ul_tput_bytes; long ul_tput_bytes;
long dl_tput_bytes; long dl_tput_bytes;

@ -44,13 +44,14 @@ gw::gw()
:if_up(false) :if_up(false)
{} {}
void gw::init(srsue::pdcp_interface_gw *pdcp_, srsue::rrc_interface_gw *rrc_, srsue::ue_interface *ue_, log *gw_log_) void gw::init(srsue::pdcp_interface_gw *pdcp_, srsue::rrc_interface_gw *rrc_, srsue::ue_interface *ue_, log *gw_log_, uint32_t lcid_)
{ {
pool = byte_buffer_pool::get_instance(); pool = byte_buffer_pool::get_instance();
pdcp = pdcp_; pdcp = pdcp_;
rrc = rrc_; rrc = rrc_;
ue = ue_; ue = ue_;
gw_log = gw_log_; gw_log = gw_log_;
lcid = lcid_;
run_enable = true; run_enable = true;
gettimeofday(&metrics_time[1], NULL); gettimeofday(&metrics_time[1], NULL);
@ -261,7 +262,7 @@ void gw::run_thread()
// Send PDU directly to PDCP // Send PDU directly to PDCP
pdu->set_timestamp(); pdu->set_timestamp();
ul_tput_bytes += pdu->N_bytes; ul_tput_bytes += pdu->N_bytes;
pdcp->write_sdu(RB_ID_DRB1, pdu); pdcp->write_sdu(lcid, pdu);
do { do {
pdu = pool_allocate; pdu = pool_allocate;

Loading…
Cancel
Save