X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=pce%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Ftransportpce%2Fpce%2Fnetworkanalyzer%2FPceResult.java;h=b84c95ba6429ee8f50daeab4031dca0313adb5a7;hb=1aaf89ab2589e85670ef8905e7228c8ec3290a89;hp=ce8bb6b230322fb661bfa07927f75fa2aeaec342;hpb=3b1ac780f9fed4cddd3076a245746d48f74a6181;p=transportpce.git diff --git a/pce/src/main/java/org/opendaylight/transportpce/pce/networkanalyzer/PceResult.java b/pce/src/main/java/org/opendaylight/transportpce/pce/networkanalyzer/PceResult.java index ce8bb6b23..b84c95ba6 100644 --- a/pce/src/main/java/org/opendaylight/transportpce/pce/networkanalyzer/PceResult.java +++ b/pce/src/main/java/org/opendaylight/transportpce/pce/networkanalyzer/PceResult.java @@ -8,14 +8,15 @@ 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.transportpce.common.fixedflex.GridConstant; 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.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.AToZDirection; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.ZToADirection; +import org.opendaylight.yangtools.yang.common.Uint16; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -24,11 +25,13 @@ 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 resultTribPort; - private Map> resultTribSlot; + private long resultWavelength = GridConstant.IRRELEVANT_WAVELENGTH_NUMBER; + private Map resultTribPort; + private Map> resultTribSlot; private Integer resultTribSlotNb = -1; private String serviceType = ""; + private BigDecimal minFreq; + private BigDecimal maxFreq; // for now it is constant returned as received from A-end private long rate = -1; @@ -43,9 +46,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 : @@ -132,19 +132,19 @@ public class PceResult { this.calcMessage = calcMessage; } - public Map getResultTribPort() { + public Map getResultTribPort() { return resultTribPort; } - public void setResultTribPort(Map resultTribPort) { + public void setResultTribPort(Map resultTribPort) { this.resultTribPort = resultTribPort; } - public Map> getResultTribSlot() { + public Map> getResultTribSlot() { return resultTribSlot; } - public void setResultTribSlot(Map> resultTribSlot) { + public void setResultTribSlot(Map> resultTribSlot) { this.resultTribSlot = resultTribSlot; } @@ -164,4 +164,36 @@ public class PceResult { this.serviceType = serviceType; } + /** + * Get the minimal frequency. + * @return the minFreq. + */ + public BigDecimal getMinFreq() { + return minFreq; + } + + /** + * Set the minimal frequency. + * @param minFreq the minFreq to set. + */ + public void setMinFreq(BigDecimal minFreq) { + this.minFreq = minFreq; + } + + /** + * Get the maximal frequency. + * @return the maxFreq. + */ + public BigDecimal getMaxFreq() { + return maxFreq; + } + + /** + * Set the maximal frequency. + * @param maxFreq the maxFreq to set. + */ + public void setMaxFreq(BigDecimal maxFreq) { + this.maxFreq = maxFreq; + } + }