Add support for config file parsing and watching
This change introduces the ability to load and parse
the json xapp descriptor (config) file. It also provides
the ability for the xAPP to register a callback function
which is executed when the descriptor is changed.
Issue-ID: RIC-428
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
Change-Id: I7a1147aa8055599ef4b36ab17960e32ccb5b741f
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 308c524..cd2e3a1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -29,7 +29,7 @@
cmake_minimum_required( VERSION 3.5 )
set( major_version "2" ) # should be automatically populated from git tag later, but until CI process sets a tag we use this
-set( minor_version "1" )
+set( minor_version "2" )
set( patch_level "0" )
set( install_root "${CMAKE_INSTALL_PREFIX}" )
@@ -156,7 +156,7 @@
# but Cmake insists on having these exist when we add them to include directories to
# enable code to find them after we build them.
#
-include_directories( "${srcd}/src/messaging;${srcd}/src/json;${srcd}/src/alarm;${srcd}/src/metrics;${srcd}/ext/jsmn" )
+include_directories( "${srcd}/src/messaging;${srcd}/src/json;${srcd}/src/alarm;${srcd}/src/metrics;${srcd}/src/config;${srcd}/ext/jsmn" )
# Compiler flags
#
@@ -187,12 +187,13 @@
add_subdirectory( src/xapp )
add_subdirectory( src/alarm )
add_subdirectory( src/metrics )
+add_subdirectory( src/config )
#add_subdirectory( doc ) # this will auto skip if {X}fm is not available
# shared and static libraries are built from the same object files.
#
add_library( ricxfcpp_shared SHARED
- "$<TARGET_OBJECTS:message_objects>;$<TARGET_OBJECTS:json_objects>;$<TARGET_OBJECTS:alarm_objects>;$<TARGET_OBJECTS:metrics_objects>;$<TARGET_OBJECTS:xapp_objects>"
+ "$<TARGET_OBJECTS:message_objects>;$<TARGET_OBJECTS:json_objects>;$<TARGET_OBJECTS:alarm_objects>;$<TARGET_OBJECTS:metrics_objects>;$<TARGET_OBJECTS:config_objects>;$<TARGET_OBJECTS:xapp_objects>"
)
set_target_properties( ricxfcpp_shared
PROPERTIES
@@ -205,7 +206,7 @@
# we only build/export the static archive (.a) if generating a dev package
if( DEV_PKG )
add_library( ricxfcpp_static STATIC
- "$<TARGET_OBJECTS:message_objects>;$<TARGET_OBJECTS:json_objects>;$<TARGET_OBJECTS:alarm_objects>;$<TARGET_OBJECTS:metrics_objects>;$<TARGET_OBJECTS:xapp_objects>"
+ "$<TARGET_OBJECTS:message_objects>;$<TARGET_OBJECTS:json_objects>;$<TARGET_OBJECTS:alarm_objects>;$<TARGET_OBJECTS:config_objects>;$<TARGET_OBJECTS:metrics_objects>;$<TARGET_OBJECTS:xapp_objects>"
)
set_target_properties( ricxfcpp_static
PROPERTIES