fixed HO, xICIC timeout and Context Update
diff --git a/src/main/java/org.onosproject.xran/entities/RnibCell.java b/src/main/java/org.onosproject.xran/entities/RnibCell.java
index f3f41d9..3179357 100644
--- a/src/main/java/org.onosproject.xran/entities/RnibCell.java
+++ b/src/main/java/org.onosproject.xran/entities/RnibCell.java
@@ -18,12 +18,15 @@
 
 import com.fasterxml.jackson.annotation.*;
 import com.fasterxml.jackson.databind.JsonNode;
+import com.google.common.collect.Lists;
 import org.onosproject.net.DeviceId;
 import org.onosproject.store.Timestamp;
 import org.onosproject.store.service.WallClockTimestamp;
 import org.onosproject.xran.codecs.api.ECGI;
 import org.onosproject.xran.codecs.api.PRBUsage;
+import org.onosproject.xran.codecs.api.XICICPA;
 import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.types.BerBitString;
 import org.onosproject.xran.codecs.ber.types.BerInteger;
 import org.onosproject.xran.codecs.pdu.CellConfigReport;
 import org.onosproject.xran.codecs.pdu.L2MeasConfig;
@@ -154,11 +157,29 @@
         this.conf = conf;
     }
 
-    public void modifyRrmConfig(JsonNode rrmConfigNode, List<RnibUe> ueList) {
+    public void modifyRrmConfig(JsonNode rrmConfigNode, List<RnibUe> ueList) throws Exception {
         RRMConfig.Crnti crnti = new RRMConfig.Crnti();
         ueList.forEach(ue -> crnti.addCRNTI(ue.getRanId()));
 
         {
+            JsonNode p_a = rrmConfigNode.path("p_a");
+            if (!p_a.isMissingNode()) {
+                RRMConfig.Pa pa = new RRMConfig.Pa();
+                if (p_a.isArray()) {
+                    if (ueList.size() == p_a.size()) {
+                        List<XICICPA> collect = Stream.of(p_a)
+                                .map(val -> new XICICPA(val.asInt()))
+                                .collect(Collectors.toList());
+                        pa.setXICICPA(collect);
+                    } else {
+                        throw new Exception("p_a size is not the same as UE size");
+                    }
+                }
+                rrmConfig.setPa(pa);
+            }
+        }
+
+        {
             JsonNode start_prb_dl = rrmConfigNode.path("start_prb_dl");
             if (!start_prb_dl.isMissingNode()) {
                 RRMConfig.StartPrbDl startPrbDl = new RRMConfig.StartPrbDl();
@@ -168,6 +189,8 @@
                                 .map(val -> new BerInteger(val.asInt()))
                                 .collect(Collectors.toList());
                         startPrbDl.setSeqOf(collect);
+                    } else {
+                        throw new Exception("start_prb_dl size is not the same as UE size");
                     }
                 }
                 rrmConfig.setStartPrbDl(startPrbDl);
@@ -184,6 +207,8 @@
                                 .map(val -> new BerInteger(val.asInt()))
                                 .collect(Collectors.toList());
                         endPrbDl.setSeqOf(collect);
+                    } else {
+                        throw new Exception("end_prb_dl size is not the same as UE size");
                     }
                 }
                 rrmConfig.setEndPrbDl(endPrbDl);
@@ -191,6 +216,23 @@
         }
 
         {
+            JsonNode sub_frame_bitmask_dl = rrmConfigNode.path("sub_frame_bitmask_dl");
+            if (!sub_frame_bitmask_dl.isMissingNode()) {
+                RRMConfig.SubframeBitmaskDl subframeBitmaskDl = new RRMConfig.SubframeBitmaskDl();
+                if (sub_frame_bitmask_dl.isArray()) {
+                    List<BerBitString> collect = Stream.of(sub_frame_bitmask_dl)
+                            .map(val -> new BerBitString(DatatypeConverter.parseHexBinary(val.asText()), 10))
+                            .collect(Collectors.toList());
+
+                    subframeBitmaskDl.setSeqOf(collect);
+                } else {
+                    throw new Exception("sub_frame_bitmask_dl size is not the same as UE size");
+                }
+                rrmConfig.setSubframeBitmaskDl(subframeBitmaskDl);
+            }
+        }
+
+        {
             JsonNode start_prb_ul = rrmConfigNode.path("start_prb_ul");
             if (!start_prb_ul.isMissingNode()) {
                 RRMConfig.StartPrbUl startPrbUl = new RRMConfig.StartPrbUl();
@@ -200,6 +242,8 @@
                                 .map(val -> new BerInteger(val.asInt()))
                                 .collect(Collectors.toList());
                         startPrbUl.setSeqOf(collect);
+                    } else {
+                        throw new Exception("start_prb_ul size is not the same as UE size");
                     }
                 }
                 rrmConfig.setStartPrbUl(startPrbUl);
@@ -216,12 +260,49 @@
                                 .map(val -> new BerInteger(val.asInt()))
                                 .collect(Collectors.toList());
                         endPrbUl.setSeqOf(collect);
+                    } else {
+                        throw new Exception("end_prb_ul size is not the same as UE size");
                     }
                 }
                 rrmConfig.setEndPrbUl(endPrbUl);
             }
         }
 
+        {
+            JsonNode p0_ue_pusch = rrmConfigNode.path("p0_ue_pusch");
+            if (!p0_ue_pusch.isMissingNode()) {
+                RRMConfig.P0UePusch p0UePusch = new RRMConfig.P0UePusch();
+                if (p0_ue_pusch.isArray()) {
+                    if (ueList.size() == p0_ue_pusch.size()) {
+                        List<BerInteger> collect = Stream.of(p0_ue_pusch)
+                                .map(val -> new BerInteger(val.asInt()))
+                                .collect(Collectors.toList());
+                        p0UePusch.setSeqOf(collect);
+                    } else {
+                        throw new Exception("p0_ue_pusch size is not the same as UE size");
+                    }
+                }
+                rrmConfig.setP0UePusch(p0UePusch);
+            }
+        }
+
+        {
+            JsonNode sub_frame_bitmask_ul = rrmConfigNode.path("sub_frame_bitmask_ul");
+            if (!sub_frame_bitmask_ul.isMissingNode()) {
+                RRMConfig.SubframeBitmaskUl subframeBitmaskUl = new RRMConfig.SubframeBitmaskUl();
+                if (sub_frame_bitmask_ul.isArray()) {
+                    List<BerBitString> collect = Stream.of(sub_frame_bitmask_ul)
+                            .map(val -> new BerBitString(DatatypeConverter.parseHexBinary(val.asText()), 10))
+                            .collect(Collectors.toList());
+
+                    subframeBitmaskUl.setSeqOf(collect);
+                } else {
+                    throw new Exception("sub_frame_bitmask_ul size is not the same as UE size");
+                }
+                rrmConfig.setSubframeBitmaskUl(subframeBitmaskUl);
+            }
+        }
+
         rrmConfig.setCrnti(crnti);
     }
 
diff --git a/src/main/java/org.onosproject.xran/entities/RnibLink.java b/src/main/java/org.onosproject.xran/entities/RnibLink.java
index f3d04e7..7d2b374 100644
--- a/src/main/java/org.onosproject.xran/entities/RnibLink.java
+++ b/src/main/java/org.onosproject.xran/entities/RnibLink.java
@@ -21,11 +21,15 @@
 import com.google.common.collect.Lists;
 import org.onosproject.store.service.WallClockTimestamp;
 import org.onosproject.xran.codecs.api.*;
+import org.onosproject.xran.codecs.ber.types.BerBitString;
 import org.onosproject.xran.codecs.ber.types.BerInteger;
 import org.onosproject.xran.codecs.pdu.PDCPMeasReportPerUe;
 import org.onosproject.xran.codecs.pdu.RRMConfig;
 import org.onosproject.xran.identifiers.LinkId;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
+import javax.xml.bind.DatatypeConverter;
 import java.util.Arrays;
 import java.util.List;
 import java.util.Optional;
@@ -47,6 +51,10 @@
 })
 @JsonIgnoreProperties(ignoreUnknown = true)
 public class RnibLink {
+    @JsonIgnore
+    private static final Logger log =
+            LoggerFactory.getLogger(RnibLink.class);
+
     @JsonProperty("Link-ID")
     private LinkId linkId;
     @JsonProperty("RRMConfiguration")
@@ -166,6 +174,18 @@
 
     public void modifyRrmParameters(JsonNode rrmConfigNode) {
         {
+            JsonNode p_a = rrmConfigNode.path("p_a");
+            if (!p_a.isMissingNode()) {
+                RRMConfig.Pa pa = new RRMConfig.Pa();
+
+                List<XICICPA> collect = Lists.newArrayList();
+                collect.add(new XICICPA(p_a.asInt()));
+                pa.setXICICPA(collect);
+                rrmParameters.setPa(pa);
+            }
+        }
+
+        {
             JsonNode start_prb_dl = rrmConfigNode.path("start_prb_dl");
             if (!start_prb_dl.isMissingNode()) {
                 RRMConfig.StartPrbDl startPrbDl = new RRMConfig.StartPrbDl();
@@ -192,6 +212,19 @@
         }
 
         {
+            JsonNode sub_frame_bitmask_dl = rrmConfigNode.path("sub_frame_bitmask_dl");
+            if (!sub_frame_bitmask_dl.isMissingNode()) {
+                RRMConfig.SubframeBitmaskDl subframeBitmaskDl = new RRMConfig.SubframeBitmaskDl();
+                List<BerBitString> collect = Lists.newArrayList();
+                
+                byte[] hexString = DatatypeConverter.parseHexBinary(sub_frame_bitmask_dl.asText());
+                collect.add(new BerBitString(hexString, 10));
+                subframeBitmaskDl.setSeqOf(collect);
+                rrmParameters.setSubframeBitmaskDl(subframeBitmaskDl);
+            }
+        }
+
+        {
             JsonNode start_prb_ul = rrmConfigNode.path("start_prb_ul");
             if (!start_prb_ul.isMissingNode()) {
                 RRMConfig.StartPrbUl startPrbUl = new RRMConfig.StartPrbUl();
@@ -216,6 +249,32 @@
                 rrmParameters.setEndPrbUl(endPrbUl);
             }
         }
+
+        {
+            JsonNode p0_ue_pusch = rrmConfigNode.path("p0_ue_pusch");
+            if (!p0_ue_pusch.isMissingNode()) {
+                RRMConfig.P0UePusch p0UePusch = new RRMConfig.P0UePusch();
+
+                List<BerInteger> collect = Lists.newArrayList();
+                collect.add(new BerInteger(p0_ue_pusch.asInt()));
+                p0UePusch.setSeqOf(collect);
+
+                rrmParameters.setP0UePusch(p0UePusch);
+            }
+        }
+
+        {
+            JsonNode sub_frame_bitmask_ul = rrmConfigNode.path("sub_frame_bitmask_ul");
+            if (!sub_frame_bitmask_ul.isMissingNode()) {
+                RRMConfig.SubframeBitmaskUl subframeBitmaskUl = new RRMConfig.SubframeBitmaskUl();
+                List<BerBitString> collect = Lists.newArrayList();
+
+                byte[] hexString = DatatypeConverter.parseHexBinary(sub_frame_bitmask_ul.asText());
+                collect.add(new BerBitString(hexString, 10));
+                subframeBitmaskUl.setSeqOf(collect);
+                rrmParameters.setSubframeBitmaskUl(subframeBitmaskUl);
+            }
+        }
     }
 
     @JsonProperty("PDCP-Throughput")