summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
ae490fc)
Issue-ID: RICAPP-96
Signed-off-by: Ron Shacham <rshacham@research.att.com>
Change-Id: I8ea5e94188523494c950b1fd002e8bcc51a42f20
Signed-off-by: Ron Shacham <rshacham@research.att.com>
# The Jenkins job uses this string for the tag in the image name
# for example nexus3.o-ran-sc.org:10004/my-image-name:my-tag
---
# The Jenkins job uses this string for the tag in the image name
# for example nexus3.o-ran-sc.org:10004/my-image-name:my-tag
---
The format is based on `Keep a Changelog <http://keepachangelog.com/>`__
and this project adheres to `Semantic Versioning <http://semver.org/>`__.
The format is based on `Keep a Changelog <http://keepachangelog.com/>`__
and this project adheres to `Semantic Versioning <http://semver.org/>`__.
+[0.0.3] - 2020-12-08
+--------------------
+* Process incoming message from QP Driver and generate a dynamic mock Prediction message with one cell having better xput
+
[0.0.2] - 2020-06-02
--------------------
* Change RMR listen port to 4560 (`RICAPP-111 <https://jira.o-ran-sc.org/browse/RICAPP-111>`_)
[0.0.2] - 2020-06-02
--------------------
* Change RMR listen port to 4560 (`RICAPP-111 <https://jira.o-ran-sc.org/browse/RICAPP-111>`_)
import os
from mdclogpy import Logger
from ricxappframe.xapp_frame import RMRXapp, rmr
import os
from mdclogpy import Logger
from ricxappframe.xapp_frame import RMRXapp, rmr
Function that processes messages for type 30001
"""
logger.debug("predict handler received message type {}".format(summary[rmr.RMR_MS_MSG_TYPE]))
Function that processes messages for type 30001
"""
logger.debug("predict handler received message type {}".format(summary[rmr.RMR_MS_MSG_TYPE]))
+ logger.debug("adding somethign")
+ logger.debug("message is " + summary[rmr.RMR_MS_PAYLOAD].decode())
+ pred_req_msg = json.loads(summary[rmr.RMR_MS_PAYLOAD].decode())
+ all_cells = {}
+ ind = 0
+ for ncell in pred_req_msg["CellMeasurements"]:
+ if (ind == 0):
+ all_cells[ncell["CellID"]] = [50000, 20000]
+ else:
+ all_cells[ncell["CellID"]] = [20000, 10000]
+ ind += 1
+
+ pred_msg = {}
+ pred_msg[pred_req_msg["PredictionUE"]] = all_cells
self.predict_requests += 1
# we don't use rts here; free this
self.rmr_free(sbuf)
self.predict_requests += 1
# we don't use rts here; free this
self.rmr_free(sbuf)
- # send a mock message
- mock_msg = '{ "12345" : { "310-680-200-555001" : [ 2000000 , 1200000 ], '\
- ' "310-680-200-555002" : [ 800000 , 400000 ], '\
- ' "310-680-200-555003" : [ 800000 , 400000 ] } }'
- success = self.rmr_send(mock_msg.encode(), 30002)
+ # send a mock message based on input
+ success = self.rmr_send(json.dumps(pred_msg).encode(), 30002)
if success:
logger.debug("predict handler: sent message successfully")
else:
if success:
logger.debug("predict handler: sent message successfully")
else:
def qp_prediction():
return {
"12345": {
def qp_prediction():
return {
"12345": {
- "310-680-200-555001": [2000000, 1200000],
- "310-680-200-555002": [800000, 400000],
- "310-680-200-555003": [800000, 400000]
+ "310-680-200-555001": [50000, 20000],
+ "310-680-200-555003": [20000, 10000],
+ "310-680-200-555002": [20000, 10000]
"image": {
"registry": "nexus3.o-ran-sc.org:10002",
"name": "o-ran-sc/ric-app-qp",
"image": {
"registry": "nexus3.o-ran-sc.org:10002",
"name": "o-ran-sc/ric-app-qp",