X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fkpi-xapp.hpp;fp=src%2Fkpi-xapp.hpp;h=8a8f069aa1264f38d40b67da2c7605092bd7c152;hb=36b57d809f3012375509c603c407b2cf36580af1;hp=0000000000000000000000000000000000000000;hpb=9a1a0c924b38863ca4ebe2465af975f39dd383d5;p=ric-app%2Fkpimon.git diff --git a/src/kpi-xapp.hpp b/src/kpi-xapp.hpp new file mode 100755 index 0000000..8a8f069 --- /dev/null +++ b/src/kpi-xapp.hpp @@ -0,0 +1,70 @@ +/* +================================================================================== + + Copyright (c) 2018-2019 AT&T Intellectual Property. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +================================================================================== +*/ + +#pragma once +#ifndef KPI_XAPP_ +#define KPI_XAPP_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "message_processor_class.hpp" + +#define MAX_SLEEP 86400 +#define MAX_SUBSCRIPTION_ATTEMPTS 10 +//================================================ + + +// configuration parameters +struct configuration { + + char name[128] = "kpi-xapp"; + char port[16] = "tcp:4560"; + + int redis_port = 6379; + + int num_threads = 1; + std::unique_ptr my_xapp; + int log_level = MDCLOG_WARN; + + void fill_gnodeb_list(char * gNodeB_string){ + gNodeB_list.clear(); + char * gnb = strtok(gNodeB_string, ","); + while(gnb != NULL){ + gNodeB_list.push_back(gnb); + gnb = strtok(NULL, ","); + } + + }; + + std::vector gNodeB_list; + +}; + +void usage(char *command); +void get_environment_config(configuration & config_instance); +void get_command_line_config(int argc, char **argv, configuration &config_instance); +#endif