initial commit
diff --git a/src/main/java/org.onosproject.xran/impl/DefaultXranStore.java b/src/main/java/org.onosproject.xran/impl/DefaultXranStore.java
new file mode 100644
index 0000000..7894b74
--- /dev/null
+++ b/src/main/java/org.onosproject.xran/impl/DefaultXranStore.java
@@ -0,0 +1,295 @@
+/*
+ * Copyright 2015-present Open Networking Laboratory
+ *
+ * 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.
+ */
+
+package org.onosproject.xran.impl;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import com.google.common.collect.Lists;
+import org.apache.felix.scr.annotations.*;
+import org.onosproject.core.ApplicationId;
+import org.onosproject.core.CoreService;
+import org.onosproject.store.AbstractStore;
+import org.onosproject.xran.XranStore;
+import org.onosproject.xran.codecs.api.ECGI;
+import org.onosproject.xran.codecs.api.EUTRANCellIdentifier;
+import org.onosproject.xran.codecs.api.MMEUES1APID;
+import org.onosproject.xran.controller.XranController;
+import org.onosproject.xran.entities.RnibCell;
+import org.onosproject.xran.entities.RnibLink;
+import org.onosproject.xran.entities.RnibSlice;
+import org.onosproject.xran.entities.RnibUe;
+import org.onosproject.xran.identifiers.LinkId;
+import org.slf4j.Logger;
+
+import javax.xml.bind.DatatypeConverter;
+import java.util.List;
+import java.util.Optional;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+import java.util.stream.Collectors;
+
+import static org.slf4j.LoggerFactory.getLogger;
+
+/**
+ * Created by dimitris on 7/22/17.
+ */
+@Component(immediate = true)
+@Service
+public class DefaultXranStore extends AbstractStore implements XranStore {
+    private static final String XRAN_APP_ID = "org.onosproject.xran";
+
+    private final Logger log = getLogger(getClass());
+    @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
+    protected CoreService coreService;
+    private ConcurrentMap<LinkId, RnibLink> linkMap = new ConcurrentHashMap<>();
+    private ConcurrentMap<ECGI, RnibCell> cellMap = new ConcurrentHashMap<>();
+    private ConcurrentMap<MMEUES1APID, RnibUe> ueMap = new ConcurrentHashMap<>();
+    private ConcurrentMap<Object, RnibSlice> sliceMap = new ConcurrentHashMap<>();
+    private XranController controller;
+
+    @Activate
+    public void activate() {
+        ApplicationId appId = coreService.getAppId(XRAN_APP_ID);
+        log.info("XRAN Default Store Started");
+    }
+
+    @Deactivate
+    public void deactive() {
+        log.info("XRAN Default Store Stopped");
+    }
+
+    @Override
+    public List<RnibLink> getLinks() {
+        List<RnibLink> list = Lists.newArrayList();
+        list.addAll(linkMap.values());
+        return list;
+    }
+
+    @Override
+    public List<RnibLink> getLinksByECGI(ECGI ecgi) {
+        List<RnibLink> list = Lists.newArrayList();
+        list.addAll(
+                linkMap.keySet()
+                        .stream()
+                        .filter(k -> k.getSource().equals(ecgi))
+                        .map(v -> linkMap.get(v))
+                        .collect(Collectors.toList()));
+
+        return list;
+    }
+
+    @Override
+    public List<RnibLink> getLinksByCellId(String eciHex) {
+        List<RnibLink> list = Lists.newArrayList();
+        EUTRANCellIdentifier eci = hexToECI(eciHex);
+
+        list.addAll(
+                linkMap.keySet()
+                        .stream()
+                        .filter(k -> k.getSource().getEUTRANcellIdentifier().equals(eci))
+                        .map(v -> linkMap.get(v))
+                        .collect(Collectors.toList()));
+
+        return list;
+    }
+
+    @Override
+    public List<RnibLink> getLinksByUeId(long euId) {
+        List<RnibLink> list = Lists.newArrayList();
+        MMEUES1APID mme = new MMEUES1APID(euId);
+
+        list.addAll(
+                linkMap.keySet()
+                        .stream()
+                        .filter(k -> k.getDestination().equals(mme))
+                        .map(v -> linkMap.get(v))
+                        .collect(Collectors.toList()));
+
+        return list;
+    }
+
+    @Override
+    public RnibLink getLinkBetweenCellIdUeId(String eciHex, long euId) {
+        EUTRANCellIdentifier eci = hexToECI(eciHex);
+        MMEUES1APID mme = new MMEUES1APID(euId);
+
+        Optional<LinkId> first = linkMap.keySet()
+                .stream()
+                .filter(linkId -> linkId.getSource().getEUTRANcellIdentifier().equals(eci))
+                .filter(linkId -> linkId.getDestination().equals(mme))
+                .findFirst();
+
+        return first.map(linkId -> linkMap.get(linkId)).orElse(null);
+    }
+
+    @Override
+    public boolean createLinkBetweenCellIdUeId(String eciHex, long euId, String type) {
+        RnibCell cell = getCell(eciHex);
+        RnibUe ue = getUe(euId);
+
+        if (cell != null && ue != null) {
+            RnibLink link = new RnibLink();
+            link.setLinkId(cell, ue);
+
+            // TODO: string to enum mapping
+//            link.setType(type);
+
+            linkMap.put(link.getLinkId(), link);
+            return true;
+        }
+
+        return false;
+    }
+
+    @Override
+    public void storeLink(RnibLink link) {
+        if (link.getLinkId() != null) {
+            linkMap.put(link.getLinkId(), link);
+        }
+    }
+
+    @Override
+    public boolean removeLink(LinkId link) {
+        return linkMap.remove(link) != null;
+    }
+
+    @Override
+    public RnibLink getLink(ECGI ecgi, MMEUES1APID mme) {
+        LinkId linkId = new LinkId(ecgi, mme);
+        return linkMap.get(linkId);
+    }
+
+    @Override
+    public List<Object> getNodes() {
+        List<Object> list = Lists.newArrayList();
+        list.add(cellMap.values());
+        list.add(ueMap.values());
+        return list;
+    }
+
+    @Override
+    public List<RnibCell> getCellNodes() {
+        List<RnibCell> list = Lists.newArrayList();
+        list.addAll(cellMap.values());
+        return list;
+    }
+
+    @Override
+    public List<RnibUe> getUeNodes() {
+        List<RnibUe> list = Lists.newArrayList();
+        list.addAll(ueMap.values());
+        return list;
+    }
+
+    @Override
+    public Object getByNodeId(String nodeId) {
+        try {
+            return getCell(nodeId);
+        } catch (Exception e) {
+
+        }
+        return getUe(Long.parseLong(nodeId));
+    }
+
+    @Override
+    public void storeCell(RnibCell cell) {
+        if (cell.getEcgi() != null) {
+            cellMap.putIfAbsent(cell.getEcgi(), cell);
+        }
+    }
+
+    @Override
+    public boolean removeCell(ECGI ecgi) {
+        return cellMap.remove(ecgi) != null;
+    }
+
+    @Override
+    public RnibCell getCell(String hexeci) {
+        EUTRANCellIdentifier eci = hexToECI(hexeci);
+        Optional<ECGI> first = cellMap.keySet().stream().filter(ecgi -> ecgi.getEUTRANcellIdentifier().equals(eci)).findFirst();
+        return first.map(ecgi -> cellMap.get(ecgi)).orElse(null);
+    }
+
+    @Override
+    public RnibCell getCell(ECGI ecgi) {
+        return cellMap.get(ecgi);
+    }
+
+    @Override
+    public boolean modifyCellRrmConf(String hexeci, JsonNode rrmConf) {
+        EUTRANCellIdentifier eci = hexToECI(hexeci);
+        Optional<ECGI> first = cellMap.keySet().stream().filter(ecgi -> ecgi.getEUTRANcellIdentifier().equals(eci)).findFirst();
+        first.ifPresent(ecgi -> cellMap.get(ecgi).modifyRrmConfig(rrmConf));
+        return false;
+    }
+
+    @Override
+    public RnibSlice getSlice(long sliceId) {
+        if (sliceMap.containsKey(sliceId)) {
+            return sliceMap.get(sliceId);
+        }
+        return null;
+    }
+
+    @Override
+    public boolean createSlice(ObjectNode attributes) {
+        return false;
+    }
+
+    @Override
+    public boolean removeCell(long sliceId) {
+        return sliceMap.remove(sliceId) != null;
+    }
+
+    @Override
+    public XranController getController() {
+        return controller;
+    }
+
+    @Override
+    public void setController(XranController controller) {
+        this.controller = controller;
+    }
+
+    @Override
+    public void storeUe(RnibUe ue) {
+        if (ue.getMmeS1apId() != null) {
+            ueMap.putIfAbsent(ue.getMmeS1apId(), ue);
+        }
+    }
+
+    @Override
+    public boolean removeUe(MMEUES1APID mme) {
+        return ueMap.remove(mme) != null;
+    }
+
+    @Override
+    public RnibUe getUe(long euId) {
+        MMEUES1APID mme = new MMEUES1APID(euId);
+        return ueMap.get(mme);
+    }
+
+    @Override
+    public RnibUe getUe(MMEUES1APID mme) {
+        return ueMap.get(mme);
+    }
+
+    private EUTRANCellIdentifier hexToECI(String eciHex) {
+        byte[] hexBinary = DatatypeConverter.parseHexBinary(eciHex);
+        return new EUTRANCellIdentifier(hexBinary, 28);
+    }
+}
diff --git a/src/main/java/org.onosproject.xran/impl/DistributedXranStore.java b/src/main/java/org.onosproject.xran/impl/DistributedXranStore.java
new file mode 100644
index 0000000..0e9f3d5
--- /dev/null
+++ b/src/main/java/org.onosproject.xran/impl/DistributedXranStore.java
@@ -0,0 +1,311 @@
+///*
+// * Copyright 2015-present Open Networking Laboratory
+// *
+// * 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.
+// */
+//
+//package org.onosproject.xran.impl;
+//
+//import com.fasterxml.jackson.databind.JsonNode;
+//import com.fasterxml.jackson.databind.node.ObjectNode;
+//import com.google.common.collect.Lists;
+//import org.apache.commons.lang3.tuple.ImmutablePair;
+//import org.apache.felix.scr.annotations.Activate;
+//import org.apache.felix.scr.annotations.Deactivate;
+//import org.apache.felix.scr.annotations.Reference;
+//import org.apache.felix.scr.annotations.ReferenceCardinality;
+//import org.onlab.util.KryoNamespace;
+//import org.onosproject.core.ApplicationId;
+//import org.onosproject.core.CoreService;
+//import org.onosproject.core.IdGenerator;
+//import org.onosproject.store.AbstractStore;
+//import org.onosproject.store.serializers.KryoNamespaces;
+//import org.onosproject.store.service.ConsistentMap;
+//import org.onosproject.store.service.Serializer;
+//import org.onosproject.store.service.StorageService;
+//import org.onosproject.store.service.Versioned;
+//import org.onosproject.xran.XranStore;
+//import org.onosproject.xran.codecs.api.ECGI;
+//import org.onosproject.xran.codecs.api.ENBUES1APID;
+//import org.onosproject.xran.codecs.api.MMEUES1APID;
+//import org.onosproject.xran.codecs.pdu.CellConfigReport;
+//import org.onosproject.xran.controller.XranController;
+//import org.onosproject.xran.entities.RnibCell;
+//import org.onosproject.xran.entities.RnibLink;
+//import org.onosproject.xran.entities.RnibSlice;
+//import org.onosproject.xran.entities.RnibUe;
+//import org.onosproject.xran.identifiers.CellId;
+//import org.onosproject.xran.identifiers.LinkId;
+//import org.onosproject.xran.identifiers.SliceId;
+//import org.onosproject.xran.identifiers.UeId;
+//import org.slf4j.Logger;
+//
+//import java.util.List;
+//
+//import static org.slf4j.LoggerFactory.getLogger;
+//
+///**
+// * Created by dimitris on 7/22/17.
+// */
+////@Component(immediate = true)
+////@Service
+//public class DistributedXranStore extends AbstractStore implements XranStore {
+//    private static final String XRAN_APP_ID = "org.onosproject.xran";
+//
+//    private final Logger log = getLogger(getClass());
+//
+//    private ConsistentMap<LinkId, RnibLink> linkMap;
+//    private ConsistentMap<CellId, RnibCell> cellMap;
+//    private ConsistentMap<UeId, RnibUe> ueMap;
+//    private ConsistentMap<SliceId, RnibSlice> sliceMap;
+//
+//    @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
+//    protected StorageService storageService;
+//
+//    @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
+//    protected CoreService coreService;
+//
+//    private IdGenerator cellIdGenerator;
+//    private IdGenerator ueIdGenerator;
+//    private IdGenerator linkIdGenerator;
+//    private IdGenerator sliceIdGenerator;
+//
+//    private XranController controller;
+//
+//    private final String XRAN_CELL_ID = "xran-cell-ids";
+//    private final String XRAN_UE_ID = "xran-eu-ids";
+//    private final String XRAN_LINK_ID = "xran-link-ids";
+//    private final String XRAN_SLICE_ID = "xran-slice-ids";
+//
+//    @Activate
+//    public void activate() {
+//        ApplicationId appId = coreService.getAppId(XRAN_APP_ID);
+//
+//        cellIdGenerator = coreService.getIdGenerator(XRAN_CELL_ID);
+//        ueIdGenerator = coreService.getIdGenerator(XRAN_UE_ID);
+//        linkIdGenerator = coreService.getIdGenerator(XRAN_LINK_ID);
+//        sliceIdGenerator = coreService.getIdGenerator(XRAN_SLICE_ID);
+//
+//        KryoNamespace.Builder serializer = KryoNamespace.newBuilder()
+//                .register(KryoNamespaces.API)
+//                .register(RnibCell.class)
+//                .register(RnibSlice.class)
+//                .register(RnibUe.class)
+//                .register(RnibLink.class)
+//                .register(LinkId.class)
+//                .register(CellId.class)
+//                .register(UeId.class)
+//                .register(SliceId.class)
+//                .register(ImmutablePair.class)
+//                .register(ENBUES1APID.class)
+//                .register(MMEUES1APID.class)
+//                .register(CellConfigReport.class)
+//                .register(ECGI.class);
+//
+//        linkMap = storageService.<LinkId, RnibLink>consistentMapBuilder()
+//                .withSerializer(Serializer.using(serializer.build()))
+//                .withName("xran-link-map")
+//                .withApplicationId(appId)
+//                .withPurgeOnUninstall()
+//                .build();
+//
+//        cellMap = storageService.<CellId, RnibCell>consistentMapBuilder()
+//                .withSerializer(Serializer.using(serializer.build()))
+//                .withName("xran-cell-map")
+//                .withApplicationId(appId)
+//                .withPurgeOnUninstall()
+//                .build();
+//
+//        ueMap = storageService.<UeId, RnibUe>consistentMapBuilder()
+//                .withSerializer(Serializer.using(serializer.build()))
+//                .withName("xran-ue-map")
+//                .withApplicationId(appId)
+//                .withPurgeOnUninstall()
+//                .build();
+//
+//        sliceMap = storageService.<SliceId, RnibSlice>consistentMapBuilder()
+//                .withSerializer(Serializer.using(serializer.build()))
+//                .withName("xran-slice-map")
+//                .withApplicationId(appId)
+//                .withPurgeOnUninstall()
+//                .build();
+//
+//        log.info("XRAN Distributed Store Started");
+//    }
+//
+//    @Deactivate
+//    public void deactive() {
+//        log.info("XRAN Distributed Store Stopped");
+//    }
+//
+//    @Override
+//    public List<RnibLink> getLinksByCellId(long cellId) {
+//        List<RnibLink> list = Lists.newArrayList();
+//        CellId cell = CellId.valueOf(cellId);
+//        linkMap.keySet().forEach(
+//                pair -> {
+//                    if (pair.equals(cell)) {
+//                        list.add(linkMap.get(pair).value());
+//                    }
+//                }
+//        );
+//        return list;
+//    }
+//
+//    @Override
+//    public List<RnibLink> getLinksByUeId(long euId) {
+//        List<RnibLink> list = Lists.newArrayList();
+//        UeId ue = UeId.valueOf(euId);
+//        linkMap.keySet().forEach(
+//                pair -> {
+//                    if (pair.equals(ue)) {
+//                        list.add(linkMap.get(pair).value());
+//                    }
+//                }
+//        );
+//        return list;
+//    }
+//
+//    @Override
+//    public RnibLink getLinkBetweenCellIdUeId(long cellId, long euId) {
+//        LinkId linkId = LinkId.valueOf(cellId, euId);
+//        final Versioned<RnibLink> rnibLinkVersioned = linkMap.get(linkId);
+//        if (rnibLinkVersioned != null) {
+//            return rnibLinkVersioned.value();
+//        }
+//        return null;
+//    }
+//
+//    @Override
+//    public boolean modifyTypeOfLink(long cellId, long euId, String type) {
+//        final RnibLink link = getLinkBetweenCellIdUeId(cellId, euId);
+//        if (link != null) {
+//            link.setType(type);
+//            return true;
+//        }
+//        return false;
+//    }
+//
+//    @Override
+//    public boolean modifyTrafficPercentOfLink(long cellId, long euId, long trafficPercent) {
+//        final RnibLink link = getLinkBetweenCellIdUeId(cellId, euId);
+//        if (link != null) {
+//            link.setTrafficPercent(trafficPercent);
+//            return true;
+//        }
+//        return false;
+//    }
+//
+//    @Override
+//    public boolean createLinkBetweenCellIdUeId(long cellId, long euId, String type) {
+//        LinkId linkId = LinkId.valueOf(cellId, euId);
+//        if (linkMap.containsKey(linkId)) {
+//            return false;
+//        }
+//        RnibLink link = new RnibLink(linkId);
+//        link.setType(type);
+//        linkMap.putPrimaryLink(linkId, link);
+//        return true;
+//    }
+//
+//    @Override
+//    public boolean deleteLink(long linkId) {
+//        return false;
+//    }
+//
+//    @Override
+//    public List<Object> getNodes() {
+//        List<Object> list = Lists.newArrayList();
+//        cellMap.values().forEach(v -> list.add(v.value()));
+//        ueMap.values().forEach(v -> list.add(v.value()));
+//        return list;
+//    }
+//
+//    @Override
+//    public List<RnibCell> getCellNodes() {
+//        List<RnibCell> list = Lists.newArrayList();
+//        cellMap.values().forEach(v -> list.add(v.value()));
+//        return list;
+//    }
+//
+//    @Override
+//    public List<RnibUe> getUeNodes() {
+//        List<RnibUe> list = Lists.newArrayList();
+//        ueMap.values().forEach(v -> list.add(v.value()));
+//        return list;
+//    }
+//
+//    @Override
+//    public Object getByNodeId(long nodeId) {
+//        CellId cellId = CellId.valueOf(nodeId);
+//        if (cellMap.containsKey(cellId)) {
+//            return cellMap.get(cellId).value();
+//        }
+//        UeId ueId = UeId.valueOf(nodeId);
+//        if (ueMap.containsKey(ueId)) {
+//            return ueMap.get(ueId).value();
+//        }
+//        return null;
+//    }
+//
+//    @Override
+//    public void storeCell(RnibCell cell) {
+//        final CellId cellId = CellId.valueOf(cellIdGenerator.getNewId());
+//        cell.setCellId(cellId);
+//        cellMap.putIfAbsent(cellId, cell);
+//    }
+//
+//    @Override
+//    public RnibCell getCell(long cellId) {
+//        CellId cell = CellId.valueOf(cellId);
+//        if (cellMap.containsKey(cell)) {
+////            controller.sendMsg(cellMap.get(cell).value().getDevId(), "skata");
+//            return cellMap.get(cell).value();
+//        }
+//        return null;
+//    }
+//
+//    @Override
+//    public boolean modifyCellRrmConf(JsonNode rrmConf) {
+//        return false;
+//    }
+//
+//    @Override
+//    public RnibSlice getSlice(long sliceId) {
+//        SliceId slice = SliceId.valueOf(sliceId);
+//        if (sliceMap.containsKey(slice)) {
+//            return sliceMap.get(slice).value();
+//        }
+//        return null;
+//    }
+//
+//    @Override
+//    public boolean createSlice(ObjectNode attributes) {
+//        return false;
+//    }
+//
+//    public XranController getController() {
+//        return controller;
+//    }
+//
+//    @Override
+//    public void storeUe(RnibUe ue) {
+//        final UeId ueId = UeId.valueOf(ueIdGenerator.getNewId());
+//        ue.setUeId(ueId);
+//        ueMap.putIfAbsent(ueId, ue);
+//    }
+//
+//    public void setController(XranController controller) {
+//        this.controller = controller;
+//    }
+//}
diff --git a/src/main/java/org.onosproject.xran/impl/XranConfig.java b/src/main/java/org.onosproject.xran/impl/XranConfig.java
new file mode 100644
index 0000000..be27c89
--- /dev/null
+++ b/src/main/java/org.onosproject.xran/impl/XranConfig.java
@@ -0,0 +1,120 @@
+/*
+ * Copyright 2015-present Open Networking Laboratory
+ *
+ * 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.
+ */
+
+package org.onosproject.xran.impl;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import org.apache.commons.lang.exception.ExceptionUtils;
+import org.onosproject.core.ApplicationId;
+import org.onosproject.net.DeviceId;
+import org.onosproject.net.config.Config;
+import org.onosproject.xran.codecs.api.ECGI;
+import org.onosproject.xran.codecs.api.EUTRANCellIdentifier;
+import org.onosproject.xran.codecs.api.PLMNIdentity;
+import org.openmuc.jasn1.util.HexConverter;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.xml.bind.DatatypeConverter;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+import static org.onosproject.net.DeviceId.deviceId;
+
+public class XranConfig extends Config<ApplicationId> {
+
+    private static final String CELLS = "active_cells";
+
+    private static final String PLMN_ID = "plmn_id";
+    private static final String ECI_ID = "eci";
+
+    private static final String IP_ADDR = "ip_addr";
+
+    private static final String XRANC_PORT = "xranc_port";
+
+    private static final String XRANC_CELLCONFIG_INTERVAL = "xranc_cellconfigrequest_interval_seconds";
+
+    private static final String RX_SIGNAL_MEAS_REPORT_INTERVAL = "rx_signal_meas_report_interval_seconds";
+
+    private static final String L2_MEAS_REPORT_INTERVAL = "l2_meas_report_interval_ms";
+
+    private final Logger log = LoggerFactory.getLogger(getClass());
+
+    public Map<String, ECGI> activeCellSet() {
+        Map<String, ECGI> cells = new ConcurrentHashMap<>();
+
+        JsonNode cellsNode = object.get(CELLS);
+        if (cellsNode == null) {
+            log.warn("no cells have been provided!");
+            return cells;
+        }
+
+        cellsNode.forEach(cellNode -> {
+            String plmn_id = cellNode.get(PLMN_ID).asText();
+            String eci = cellNode.get(ECI_ID).asText();
+
+            String ipAddress = cellNode.get(IP_ADDR).asText();
+
+            ECGI ecgi = hexToECGI(plmn_id, eci);
+            cells.put(ipAddress, ecgi);
+        });
+
+        return cells;
+    }
+
+    public int getXrancPort() {
+        return object.get(XRANC_PORT).asInt();
+    }
+
+    public int getConfigRequestInterval() {
+        return object.get(XRANC_CELLCONFIG_INTERVAL).asInt();
+    }
+
+    public int getRxSignalInterval() {
+        return object.get(RX_SIGNAL_MEAS_REPORT_INTERVAL).asInt();
+    }
+
+    public int getL2MeasInterval() {
+        return object.get(L2_MEAS_REPORT_INTERVAL).asInt();
+    }
+
+
+    private ECGI hexToECGI(String plmn_id, String eci) {
+        byte[] bytes = HexConverter.fromShortHexString(plmn_id);
+        byte[] bytearray = DatatypeConverter.parseHexBinary(eci);
+
+        InputStream inputStream = new ByteArrayInputStream(bytearray);
+
+        PLMNIdentity plmnIdentity = new PLMNIdentity(bytes);
+        EUTRANCellIdentifier eutranCellIdentifier = new EUTRANCellIdentifier(bytearray, 28);
+
+        ECGI ecgi = new ECGI();
+        ecgi.setEUTRANcellIdentifier(eutranCellIdentifier);
+        ecgi.setPLMNIdentity(plmnIdentity);
+        try {
+            ecgi.decode(inputStream);
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+
+        return ecgi;
+    }
+}
diff --git a/src/main/java/org.onosproject.xran/impl/package-info.java b/src/main/java/org.onosproject.xran/impl/package-info.java
new file mode 100644
index 0000000..baf9a19
--- /dev/null
+++ b/src/main/java/org.onosproject.xran/impl/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2015-present Open Networking Laboratory
+ *
+ * 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.
+ */
+
+/**
+ * Created by dimitris on 7/23/17.
+ */
+package org.onosproject.xran.impl;
\ No newline at end of file