-main.py:
-* Initiates xapp api, populated influxDB with data and runs the entry() using xapp.run()
-* If Model is not present in the current path, run train() to train the model for the prediction.
-* Call predict function to perform the following activities for every 10 milisecond.
- a) Currently read the input from "liveUE" measurments and iterate through it. (Needs to update: To iterate every 10 miliseconds and fetch latest sample from influxDB)
- b) Detect anomalous records for the inputs
- c) send the UEID, DU-ID, Degradation type and timestamp for the anomalous records to the Traffic Steering (via rmr with the message type as 30003)
- d) Get the acknowledgement message from the traffic steering
+AD xApp performs following:
+
+* Initiates xapp api, make connection with influxDB and runs the entry() using xapp.run()
+* If Model is not present in the current path,
+ a) Read history data from InfluxDB
+ b) apply pre-processing steps
+ c) trigger Training of ML model.
+ d) after model validation, save transformation, model artifacts
+* Detect anomalous user in real-time.
+ a) Read live data from influxDB every 0.5 second
+ b) Detect anomalous records on given input
+ c) Investigate degradation type for anomalous users
+* Listens to RMR port for A1 policy (message type 20011) in a format given below. Which consists throughput threshold parameter (default: 70%) for an degradataion event to qualify for a handover
+ {'operation': 'CREATE', 'payload': '{\"thp_threshold\":74}', 'policy_instance_id': 'demo-1', 'policy_type_id': '9997'}"}
+* Send the ue-id, DU-ID, Degradation type and timestamp for the qualified anomalous records to the Traffic Steering (via rmr with the message type as 30003)
+* Get the acknowledgement message from the traffic steering
+* store xApp result in "AD" measurement of influxDB