fixed rxsigmeas and version checking
diff --git a/src/main/java/org.onosproject.xran/controller/XranControllerImpl.java b/src/main/java/org.onosproject.xran/controller/XranControllerImpl.java
index 242be00..c21db62 100644
--- a/src/main/java/org.onosproject.xran/controller/XranControllerImpl.java
+++ b/src/main/java/org.onosproject.xran/controller/XranControllerImpl.java
@@ -395,7 +395,7 @@
                                     new TimerTask() {
                                         @Override
                                         public void run() {
-                                            if (ue.getCapability() == null) {
+                                            if (ue.getCapability() == null && primary.getVersion() >= 3) {
                                                 try {
                                                     ChannelHandlerContext ctx = cellMap.getCtx(primary.getEcgi());
                                                     XrancPdu xrancPdu = UECapabilityEnquiry.constructPacket(
@@ -407,32 +407,6 @@
                                                     e.printStackTrace();
                                                 }
                                             } else {
-                                                if (ue.getMeasConfig() == null) {
-                                                    try {
-                                                        ChannelHandlerContext ctx = cellMap.getCtx(primary.getEcgi());
-                                                        RXSigMeasConfig.MeasCells measCells = new RXSigMeasConfig.MeasCells();
-                                                        xranStore.getCellNodes().forEach(cell -> {
-                                                            CellConfigReport cellReport = ((RnibCell) cell).getConf();
-                                                            if (cellReport != null) {
-                                                                PCIARFCN pciarfcn = new PCIARFCN();
-                                                                pciarfcn.setPci(cellReport.getPci());
-                                                                pciarfcn.setEarfcnDl(cellReport.getEarfcnDl());
-                                                                measCells.setPCIARFCN(pciarfcn);
-                                                            }
-                                                        });
-                                                        XrancPdu xrancPdu = RXSigMeasConfig.constructPacket(
-                                                                primary.getEcgi(),
-                                                                ue.getRanId(),
-                                                                measCells,
-                                                                xranConfig.getRxSignalInterval()
-                                                        );
-                                                        ue.setMeasConfig(xrancPdu.getBody().getRXSigMeasConfig());
-                                                        ctx.writeAndFlush(getSctpMessage(xrancPdu));
-                                                    } catch (IOException e) {
-                                                        log.warn(ExceptionUtils.getFullStackTrace(e));
-                                                        e.printStackTrace();
-                                                    }
-                                                }
                                                 timer.cancel();
                                                 timer.purge();
                                             }
@@ -441,6 +415,32 @@
                                     0,
                                     xranConfig.getConfigRequestInterval() * 1000
                             );
+                            if (ue.getMeasConfig() == null) {
+                                try {
+                                    ChannelHandlerContext ctx = cellMap.getCtx(primary.getEcgi());
+                                    RXSigMeasConfig.MeasCells measCells = new RXSigMeasConfig.MeasCells();
+                                    xranStore.getCellNodes().forEach(cell -> {
+                                        CellConfigReport cellReport = ((RnibCell) cell).getConf();
+                                        if (cellReport != null) {
+                                            PCIARFCN pciarfcn = new PCIARFCN();
+                                            pciarfcn.setPci(cellReport.getPci());
+                                            pciarfcn.setEarfcnDl(cellReport.getEarfcnDl());
+                                            measCells.setPCIARFCN(pciarfcn);
+                                        }
+                                    });
+                                    XrancPdu xrancPdu = RXSigMeasConfig.constructPacket(
+                                            primary.getEcgi(),
+                                            ue.getRanId(),
+                                            measCells,
+                                            xranConfig.getRxSignalInterval()
+                                    );
+                                    ue.setMeasConfig(xrancPdu.getBody().getRXSigMeasConfig());
+                                    ctx.writeAndFlush(getSctpMessage(xrancPdu));
+                                } catch (IOException e) {
+                                    log.warn(ExceptionUtils.getFullStackTrace(e));
+                                    e.printStackTrace();
+                                }
+                            }
                         }
                     }
                     break;
diff --git a/src/main/java/org.onosproject.xran/entities/RnibCell.java b/src/main/java/org.onosproject.xran/entities/RnibCell.java
index 2e6a8c8..8b1feb0 100644
--- a/src/main/java/org.onosproject.xran/entities/RnibCell.java
+++ b/src/main/java/org.onosproject.xran/entities/RnibCell.java
@@ -106,8 +106,8 @@
         return ecgi;
     }
 
-    public String getVersion() {
-        return version;
+    public int getVersion() {
+        return Integer.parseInt(version);
     }
 
     public void setVersion(String version) {
diff --git a/src/main/java/org.onosproject.xran/rest/CellWebResource.java b/src/main/java/org.onosproject.xran/rest/CellWebResource.java
index d792fa6..e87964e 100644
--- a/src/main/java/org.onosproject.xran/rest/CellWebResource.java
+++ b/src/main/java/org.onosproject.xran/rest/CellWebResource.java
@@ -119,7 +119,7 @@
                     get(XranStore.class).modifyCellRrmConf(cell, rrmConf);
 
                     queue[0] = get(XranController.class).sendModifiedRRMConf(cell.getRrmConfig(),
-                            cell.getVersion().equals("3"));
+                            cell.getVersion() <= 3);
                     String poll = queue[0].poll(5, TimeUnit.SECONDS);
 
                     if (poll != null) {
diff --git a/src/main/java/org.onosproject.xran/rest/LinkWebResource.java b/src/main/java/org.onosproject.xran/rest/LinkWebResource.java
index 4deb543..979e84e 100644
--- a/src/main/java/org.onosproject.xran/rest/LinkWebResource.java
+++ b/src/main/java/org.onosproject.xran/rest/LinkWebResource.java
@@ -421,7 +421,7 @@
         final SynchronousQueue<String>[] queue = new SynchronousQueue[1];
         get(XranStore.class).modifyLinkRrmConf(link, rrmConf);
         queue[0] = get(XranController.class).sendModifiedRRMConf(link.getRrmParameters(),
-                link.getLinkId().getCell().getVersion().equals("3"));
+                link.getLinkId().getCell().getVersion() <= 3);
         String poll = queue[0].poll(5, TimeUnit.SECONDS);
 
         if (poll != null) {