Path description YANG update
[transportpce.git] / pce / src / main / java / org / opendaylight / transportpce / pce / networkanalyzer / PceResult.java
index 6c70f9fabce98f2cc1163b1470c4d4a033c75d28..3cf83f0b2a37c7cbf55ba43b7ab62c6ba78fedb4 100644 (file)
@@ -8,13 +8,14 @@
 
 package org.opendaylight.transportpce.pce.networkanalyzer;
 
+import java.math.BigDecimal;
 import java.util.List;
-import java.util.Map;
 import org.opendaylight.transportpce.common.ResponseCodes;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.format.rev190531.ServiceFormat;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.AToZDirection;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.ZToADirection;
-import org.opendaylight.yangtools.yang.common.Uint16;
+import org.opendaylight.transportpce.common.fixedflex.GridConstant;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev210924.OpucnTribSlotDef;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.format.rev191129.ServiceFormat;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev230501.path.description.AToZDirection;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev230501.path.description.ZToADirection;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -23,11 +24,11 @@ public class PceResult {
     private String calcMessage = "503 Calculator Unavailable";
     private boolean calcStatus = false;
     private String responseCode = ResponseCodes.RESPONSE_FAILED;
-    private long resultWavelength = -1;
-    private Map<String, Uint16> resultTribPort;
-    private Map<String, List<Uint16>> resultTribSlot;
-    private Integer resultTribSlotNb = -1;
+    private long resultWavelength = GridConstant.IRRELEVANT_WAVELENGTH_NUMBER;
+    private List<OpucnTribSlotDef> resultTribSlotDefList;
     private String serviceType = "";
+    private BigDecimal minFreq;
+    private BigDecimal maxFreq;
 
     // for now it is constant returned as received from A-end
     private long rate = -1;
@@ -42,9 +43,6 @@ public class PceResult {
     private AToZDirection atozdirection = null;
     private ZToADirection ztoadirection = null;
 
-    public PceResult() {
-    }
-
     public void setRC(String rc) {
         switch (rc) {
             case ResponseCodes.RESPONSE_OK :
@@ -131,36 +129,52 @@ public class PceResult {
         this.calcMessage = calcMessage;
     }
 
-    public Map<String, Uint16> getResultTribPort() {
-        return resultTribPort;
+    public List<OpucnTribSlotDef> getResultTribPortTribSlot() {
+        return resultTribSlotDefList;
     }
 
-    public void setResultTribPort(Map<String, Uint16> resultTribPort) {
-        this.resultTribPort = resultTribPort;
+    public void setResultTribPortTribSlot(List<OpucnTribSlotDef> resultTribPortTribSlot) {
+        this.resultTribSlotDefList = resultTribPortTribSlot;
     }
 
-    public Map<String, List<Uint16>> getResultTribSlot() {
-        return resultTribSlot;
+    public String getServiceType() {
+        return serviceType;
     }
 
-    public void setResultTribSlot(Map<String, List<Uint16>> resultTribSlot) {
-        this.resultTribSlot = resultTribSlot;
+    public void setServiceType(String serviceType) {
+        this.serviceType = serviceType;
     }
 
-    public int getResultTribSlotNb() {
-        return resultTribSlotNb;
+    /**
+     * Get the minimal frequency.
+     * @return the minFreq.
+     */
+    public BigDecimal getMinFreq() {
+        return minFreq;
     }
 
-    public void setResultTribSlotNb(int resultTribSlotNb) {
-        this.resultTribSlotNb = resultTribSlotNb;
+    /**
+     * Set the minimal frequency.
+     * @param minFreq the minFreq to set.
+     */
+    public void setMinFreq(BigDecimal minFreq) {
+        this.minFreq = minFreq;
     }
 
-    public String getServiceType() {
-        return serviceType;
+    /**
+     * Get the maximal frequency.
+     * @return the maxFreq.
+     */
+    public BigDecimal getMaxFreq() {
+        return maxFreq;
     }
 
-    public void setServiceType(String serviceType) {
-        this.serviceType = serviceType;
+    /**
+     * Set the maximal frequency.
+     * @param maxFreq the maxFreq to set.
+     */
+    public void setMaxFreq(BigDecimal maxFreq) {
+        this.maxFreq = maxFreq;
     }
 
 }