A1 Message Handler update 11/4011/3 1.0.4
authorsjana <sj492a@att.com>
Mon, 8 Jun 2020 05:17:43 +0000 (01:17 -0400)
committersjana <sj492a@att.com>
Mon, 8 Jun 2020 05:27:35 +0000 (01:27 -0400)
Issue-ID: RICAPP-115

Signed-off-by: sjana <sj492a@att.com>
Change-Id: I07a72a2598f790d1be20dbfd839fb795762f2feb

container-tag.yaml
docs/release-notes.rst
init/config-file.json
src/hw_xapp_main.cc
src/xapp-mgmt/msgs_proc.cc
src/xapp-utils/xapp_config.hpp

index 4466856..951186d 100644 (file)
@@ -1,4 +1,4 @@
 # this is used by CI jobs to apply a tag when it builds the image
 ---
-tag: '1.0.3'
+tag: '1.0.4'
 
index 1b42721..4288c25 100644 (file)
@@ -21,7 +21,7 @@ Version history
 | **Date**           | **Ver.**           | **Author**         | **Comment**        |
 |                    |                    |                    |                    |
 +--------------------+--------------------+--------------------+--------------------+
-| 2020-21-05         | 1.0.3              |   Shraboni Jana    | Third draft        |
+| 2020-06-06         | 1.0.4              |   Shraboni Jana    | Fourth draft       |
 |                    |                    |                    |                    |
 +--------------------+--------------------+--------------------+--------------------+
 
index 5300d90..78f9a64 100644 (file)
@@ -7,7 +7,7 @@
                 "image": {
                     "registry": "nexus3.o-ran-sc.org:10002",
                     "name": "o-ran-sc/ric-app-hw",
-                    "tag": "1.0.3"
+                    "tag": "1.0.4"
                        }
             }
         ],
index 01601fb..1771797 100644 (file)
@@ -75,22 +75,13 @@ int main(int argc, char *argv[]){
 
        //start listener threads and register message handlers.
        int num_threads = std::stoi(config[XappSettings::SettingName::THREADS]);
-       bool sub_required = true;
-       for(int j=0; j < num_threads; j++) {
-               std::unique_ptr<XappMsgHandler> mp_handler;
-               if(sub_required)
-                       mp_handler = std::make_unique<XappMsgHandler>(config[XappSettings::SettingName::XAPP_ID], std::ref(*sub_handler));
-               else
-                       mp_handler = std::make_unique<XappMsgHandler>(config[XappSettings::SettingName::XAPP_ID]);
-
-               hw_xapp->register_handler(std::ref(*mp_handler));
-       }
-
        mdclog_write(MDCLOG_INFO, "Starting Listener Threads. Number of Workers = %d", num_threads);
 
-       hw_xapp->Run();
+       std::unique_ptr<XappMsgHandler> mp_handler = std::make_unique<XappMsgHandler>(config[XappSettings::SettingName::XAPP_ID]);
+       hw_xapp->start_xapp_receiver(std::ref(*mp_handler));
+
+       sleep(1);
 
-       //Delete all subscriptions if any based on Xapp Mode.
        //xapp->shutdown();
 
        while(1){
index 19d21a8..99eb453 100644 (file)
@@ -175,7 +175,10 @@ void XappMsgHandler::operator()(rmr_mbuf_t *message, bool *resend){
                                break;
 
        case A1_POLICY_REQ:
+
+                   mdclog_write(MDCLOG_INFO, "In Message Handler: Received A1_POLICY_REQ.");
                        helper.handler_id = xapp_id;
+
                        res = a1_policy_handler((char*)message->payload, &message->len, helper);
                        if(res){
                                message->mtype = A1_POLICY_RESP;        // if we're here we are running and all is ok
index 67cf440..f15c879 100644 (file)
@@ -31,7 +31,7 @@
 #include <cstdlib>
 #include <mdclog/mdclog.h>
 
-#define DEFAULT_XAPP_NAME "HW-Xapp"
+#define DEFAULT_XAPP_NAME "hwxapp"
 #define DEFAULT_PORT "4560"
 #define DEFAULT_MSG_MAX_BUFFER "2072"
 #define DEFAULT_THREADS "1"