X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=qp%2Fmain.py;h=1c88a48efd81e1ce77b29b98d52c7244b36f0b71;hb=48aa41171b8ca141df1f14341ea0ec2fde745af5;hp=002b063f7d9a851e246da08c22d7f6d30c1473b0;hpb=0b9e340cd4f951d66e029c5f80af281cc2b732d4;p=ric-app%2Fqp.git diff --git a/qp/main.py b/qp/main.py index 002b063..1c88a48 100644 --- a/qp/main.py +++ b/qp/main.py @@ -74,15 +74,16 @@ def qp_predict_handler(self, summary, sbuf): logger.warning("predict handler: failed to send message") -def nbcells(ue): +def cells(ue): """ Extract neighbor cell id for a given UE """ db.read_data(meas='liveUE', limit=1, ueid=ue) df = db.data - nbc = df.filter(regex='nbCell').values[0] - return nbc + nbc = df.filter(regex='nbCell').values[0].tolist() + srvc = df.filter(regex='nrCell').values[0].tolist() + return srvc+nbc def predict(payload): @@ -93,8 +94,8 @@ def predict(payload): payload = json.loads(payload) ueid = payload['UEPredictionSet'][0] - nbc = nbcells(ueid) - for cid in nbc: + cell_list = cells(ueid) + for cid in cell_list: mcid = cid.replace('/', '') db.read_data(meas='liveCell', cellid=cid, limit=11) if len(db.data) != 0: