Issue-ID: RICAPP-96
Signed-off-by: Ron Shacham <rshacham@research.att.com>
Change-Id: Ie27af412756b0aa813dfbb89c59c8c7981ae381a
# this is used by CI jobs to apply a tag when it builds the image
---
# this is used by CI jobs to apply a tag when it builds the image
---
Traffic Steering xAPP
=====================
Traffic Steering xAPP
=====================
+2020 Dec 8 Version 1.0.13
+-------------------------
+ Small changes to integrate with RAN data written by KPIMON xApp
+
+2020 Dec 7 Version 1.0.12
+-------------------------
+ Change by HCL to support AD xapp
+
+
2020 June 11 Version 1.0.11
----------------------------
Removed extraneous logging messages
2020 June 11 Version 1.0.11
----------------------------
Removed extraneous logging messages
bool in_serving_array = false;
int rf_meas_index = 0;
bool in_serving_array = false;
int rf_meas_index = 0;
+ bool in_serving_report_object = false;
+
string curr_key = "";
string curr_value = "";
bool Null() { return true; }
bool Bool(bool b) { return true; }
bool Int(int i) {
string curr_key = "";
string curr_value = "";
bool Null() { return true; }
bool Bool(bool b) { return true; }
bool Int(int i) {
- if (in_serving_array) {
+ return true;
+ }
+
+ bool Uint(unsigned i) {
- switch(rf_meas_index) {
- case 0:
+ if (in_serving_report_object) {
+ if (curr_key.compare("rsrp") == 0) {
+ } else if (curr_key.compare("rsrq") == 0) {
+ } else if (curr_key.compare("rssinr") == 0) {
- rf_meas_index++;
- }
- return true;
- }
- bool Uint(unsigned u) {
+ }
+
+ return true; }
+ bool Int64(int64_t i) {
+
+ return true; }
+ bool Uint64(uint64_t i) {
+
- bool Int64(int64_t i) { return true; }
- bool Uint64(uint64_t u) { return true; }
bool Double(double d) { return true; }
bool String(const char* str, SizeType length, bool copy) {
bool Double(double d) { return true; }
bool String(const char* str, SizeType length, bool copy) {
- bool StartObject() { return true; }
+ bool StartObject() {
+ if (curr_key.compare("ServingCellRF") == 0) {
+ in_serving_report_object = true;
+ }
+
+ return true; }
bool Key(const char* str, SizeType length, bool copy) {
curr_key = str;
return true;
}
bool Key(const char* str, SizeType length, bool copy) {
curr_key = str;
return true;
}
- bool EndObject(SizeType memberCount) { return true; }
+ bool EndObject(SizeType memberCount) {
+ if (curr_key.compare("ServingCellRF") == 0) {
+ in_serving_report_object = false;
+ }
+ return true; }
bool StartArray() {
if (curr_key.compare("ServingCellRF") == 0) {
bool StartArray() {
if (curr_key.compare("ServingCellRF") == 0) {
unordered_map<string, UEData> return_ue_data_map;
unordered_map<string, UEData> return_ue_data_map;
- std::string prefix3="12";
+ std::string prefix3="";
Keys K2 = sdl->findKeys(nsu, prefix3);
DataMap Dk2 = sdl->get(nsu, K2);
Keys K2 = sdl->findKeys(nsu, prefix3);
DataMap Dk2 = sdl->get(nsu, K2);
int rmtype; // received message type
int rmtype; // received message type
- cout << "Policy Callback got a message, type=" << mtype << " , length=" << len << endl;
- cout << "payload is " << payload.get() << endl;
-
+ fprintf(stderr, "Policy Callback got a message, type=%d, length=%d\n", mtype, len);
const char *arg = (const char*)payload.get();
const char *arg = (const char*)payload.get();
+ fprintf(stderr, "payload is %s\n", payload.get());
+
PolicyHandler handler;
Reader reader;
StringStream ss(arg);
PolicyHandler handler;
Reader reader;
StringStream ss(arg);
//Set the threshold value
if (handler.found_threshold) {
//Set the threshold value
if (handler.found_threshold) {
- cout << "Setting RSRP Threshold to A1-P value: " << handler.threshold << endl;
+ fprintf(stderr, "Setting RSRP Threshold to A1-P value: %d\n", handler.threshold);
rsrp_threshold = handler.threshold;
}
rsrp_threshold = handler.threshold;
}
for (int i = 0; i < ues_to_predict.size(); i++) {
if (i == ues_to_predict.size() - 1) {
for (int i = 0; i < ues_to_predict.size(); i++) {
if (i == ues_to_predict.size() - 1) {
- ues_list = ues_list + " \"" + ues_to_predict.at(i) + "\"";
+ ues_list = ues_list + " \"" + ues_to_predict.at(i) + "\"]";
} else {
ues_list = ues_list + " \"" + ues_to_predict.at(i) + "\"" + ",";
}
} else {
ues_list = ues_list + " \"" + ues_to_predict.at(i) + "\"" + ",";
}
send_payload = msg->Get_payload(); // direct access to payload
// snprintf( (char *) send_payload.get(), 2048, '{"UEPredictionSet" : ["12345"]}', 1 );
send_payload = msg->Get_payload(); // direct access to payload
// snprintf( (char *) send_payload.get(), 2048, '{"UEPredictionSet" : ["12345"]}', 1 );
- // snprintf( (char *) send_payload.get(), 2048, body);
- snprintf( (char *) send_payload.get(), 2048, "{\"UEPredictionSet\": [\"12345\"]}");
+ snprintf( (char *) send_payload.get(), 2048, body);
+ //snprintf( (char *) send_payload.get(), 2048, "{\"UEPredictionSet\": [\"12345\"]}");
fprintf(stderr, "message body %s\n", send_payload.get());
fprintf(stderr, "payload length %d\n", strlen( (char *) send_payload.get() ));
fprintf(stderr, "message body %s\n", send_payload.get());
fprintf(stderr, "payload length %d\n", strlen( (char *) send_payload.get() ));
unordered_map<string, UEData> uemap;
unordered_map<string, UEData> uemap;
- vector<string> prediction_ues;
-
while (1) {
uemap = get_sdl_ue_data();
while (1) {
uemap = get_sdl_ue_data();
+ vector<string> prediction_ues;
+
for (auto map_iter = uemap.begin(); map_iter != uemap.end(); map_iter++) {
string ueid = map_iter->first;
for (auto map_iter = uemap.begin(); map_iter != uemap.end(); map_iter++) {
string ueid = map_iter->first;
+ fprintf(stderr,"found a ueid %s\n", ueid.c_str());
UEData data = map_iter->second;
UEData data = map_iter->second;
+
+ fprintf(stderr, "current rsrp is %d\n", data.serving_cell_rsrp);
+
if (data.serving_cell_rsrp < rsrp_threshold) {
if (data.serving_cell_rsrp < rsrp_threshold) {
+ fprintf(stderr,"it is less than the rsrp threshold\n");
prediction_ues.push_back(ueid);
prediction_ues.push_back(ueid);
+ } else {
+ fprintf(stderr,"it is not less than the rsrp threshold\n");
+ fprintf(stderr, "the size of pred ues is %d\n", prediction_ues.size());
+
if (prediction_ues.size() > 0) {
send_prediction_request(prediction_ues);
}
if (prediction_ues.size() > 0) {
send_prediction_request(prediction_ues);
}
"image": {\r
"registry": "nexus3.o-ran-sc.org:10002",\r
"name": "o-ran-sc/ric-app-ts",\r
"image": {\r
"registry": "nexus3.o-ran-sc.org:10002",\r
"name": "o-ran-sc/ric-app-ts",\r