introduced xran UE context ID
diff --git a/src/main/java/org.onosproject.xran/identifiers/EcgiCrntiPair.java b/src/main/java/org.onosproject.xran/identifiers/EcgiCrntiPair.java
new file mode 100644
index 0000000..6347788
--- /dev/null
+++ b/src/main/java/org.onosproject.xran/identifiers/EcgiCrntiPair.java
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2015-present Open Networking Foundation
+ *
+ * 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.identifiers;
+
+import com.google.common.base.Objects;
+import javafx.util.Pair;
+import org.onosproject.xran.codecs.api.CRNTI;
+import org.onosproject.xran.codecs.api.ECGI;
+
+public class EcgiCrntiPair extends Pair<ECGI, CRNTI> {
+
+ /**
+ * Creates a new pair
+ *
+ * @param key The key for this pair
+ * @param value The value to use for this pair
+ */
+ public EcgiCrntiPair(ECGI key, CRNTI value) {
+ super(key, value);
+ }
+
+ public static EcgiCrntiPair valueOf(ECGI key, CRNTI value) {
+ return new EcgiCrntiPair(key, value);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hashCode(getKey(), getValue());
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (o instanceof EcgiCrntiPair) {
+ return ((EcgiCrntiPair) o).getKey().equals(getKey()) &&
+ ((EcgiCrntiPair) o).getValue().equals(getValue());
+ }
+ return super.equals(o);
+ }
+}
diff --git a/src/main/java/org.onosproject.xran/identifiers/LinkId.java b/src/main/java/org.onosproject.xran/identifiers/LinkId.java
index 8b7dabb..e2b489a 100644
--- a/src/main/java/org.onosproject.xran/identifiers/LinkId.java
+++ b/src/main/java/org.onosproject.xran/identifiers/LinkId.java
@@ -21,13 +21,12 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import org.onosproject.xran.codecs.api.ECGI;
-import org.onosproject.xran.codecs.api.MMEUES1APID;
import org.onosproject.xran.entities.RnibCell;
import org.onosproject.xran.entities.RnibUe;
@JsonPropertyOrder({
"ECGI",
- "MMEUES1APID"
+ "UEID"
})
@JsonIgnoreProperties(ignoreUnknown = true)
public class LinkId {
@@ -45,12 +44,12 @@
return new LinkId(cell, ue);
}
- public static LinkId valueOf(ECGI ecgi, MMEUES1APID mmeues1APID) {
+ public static LinkId valueOf(ECGI ecgi, Long UeId) {
RnibCell cell = new RnibCell();
RnibUe ue = new RnibUe();
cell.setEcgi(ecgi);
- ue.setMmeS1apId(mmeues1APID);
+ ue.setId(UeId);
return new LinkId(cell, ue);
}
@@ -64,14 +63,14 @@
cell.setEcgi(sourceId);
}
- @JsonProperty("MMEUES1APID")
- public MMEUES1APID getMmeues1apid() {
- return ue.getMmeS1apId();
+ @JsonProperty("UEID")
+ public Long getUeId() {
+ return ue.getId();
}
- @JsonProperty("MMEUES1APID")
- public void setMmeues1apid(MMEUES1APID destinationId) {
- ue.setMmeS1apId(destinationId);
+ @JsonProperty("UEID")
+ public void setUeId(Long destinationId) {
+ ue.setId(destinationId);
}
@JsonIgnore
@@ -100,14 +99,14 @@
o != null &&
o instanceof LinkId &&
cell.getEcgi().equals(((LinkId) o).cell.getEcgi()) &&
- ue.getMmeS1apId().equals(((LinkId) o).ue.getMmeS1apId());
+ ue.getId().equals(((LinkId) o).ue.getId());
}
@Override
public int hashCode() {
int result = cell.getEcgi().hashCode();
- result = 31 * result + ue.getMmeS1apId().hashCode();
+ result = 31 * result + ue.getId().hashCode();
return result;
}
diff --git a/src/main/java/org.onosproject.xran/identifiers/contextUpdateHandler.java b/src/main/java/org.onosproject.xran/identifiers/contextUpdateHandler.java
new file mode 100644
index 0000000..82fdaed
--- /dev/null
+++ b/src/main/java/org.onosproject.xran/identifiers/contextUpdateHandler.java
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2015-present Open Networking Foundation
+ *
+ * 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.identifiers;
+
+import org.onosproject.xran.codecs.pdu.HOComplete;
+import org.onosproject.xran.codecs.pdu.UEAdmissionStatus;
+import org.onosproject.xran.codecs.pdu.UEContextUpdate;
+
+public class contextUpdateHandler {
+ private UEContextUpdate contextUpdate;
+ private UEAdmissionStatus admissionStatus;
+ private HOComplete hoComplete;
+
+ public UEContextUpdate getContextUpdate() {
+ return contextUpdate;
+ }
+
+ public boolean setContextUpdate(UEContextUpdate contextUpdate) {
+ this.contextUpdate = contextUpdate;
+
+ return admissionStatus != null || hoComplete != null;
+
+ }
+
+ public UEAdmissionStatus getAdmissionStatus() {
+ return admissionStatus;
+ }
+
+ public boolean setAdmissionStatus(UEAdmissionStatus admissionStatus) {
+ this.admissionStatus = admissionStatus;
+
+ return contextUpdate != null;
+ }
+
+ public HOComplete getHoComplete() {
+ return hoComplete;
+ }
+
+ public boolean setHoComplete(HOComplete hoComplete) {
+ this.hoComplete = hoComplete;
+
+ return contextUpdate != null;
+ }
+
+ @Override
+ public String toString() {
+ return "contextUpdateHandler{" +
+ "contextUpdate=" + (contextUpdate != null) +
+ ", admissionStatus=" + (admissionStatus != null) +
+ ", hoComplete=" + (hoComplete != null) +
+ '}';
+ }
+}