From 24a9218f1723ef7892ca8bad4b0aa836e497d0d3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Joakim=20T=C3=B6rnqvist?= Date: Fri, 15 Nov 2024 12:14:15 +0100 Subject: [PATCH] Consistent cent. freq. width decimal precision MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Corrects an issue where the nr of decimals for central frequency was 4 in ZtoA direction and 5 in AtoZ direction. Change-Id: I924273f1fff09870aff9e84042b5aac110a29fc8 Signed-off-by: Joakim Törnqvist --- .../opendaylight/transportpce/pce/PcePathDescription.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pce/src/main/java/org/opendaylight/transportpce/pce/PcePathDescription.java b/pce/src/main/java/org/opendaylight/transportpce/pce/PcePathDescription.java index cf197302f..9a13c1594 100644 --- a/pce/src/main/java/org/opendaylight/transportpce/pce/PcePathDescription.java +++ b/pce/src/main/java/org/opendaylight/transportpce/pce/PcePathDescription.java @@ -121,7 +121,7 @@ public class PcePathDescription { .setAToZMinFrequency(new FrequencyTHz(Decimal64.valueOf(rc.getMinFreq()))) .setAToZWavelengthNumber(Uint32.valueOf(rc.getResultWavelength())) .setCentralFrequency(new FrequencyTHz(GridUtils.getCentralFrequencyWithPrecision( - rc.getMinFreq(), rc.getMaxFreq(), 4).getValue())) + rc.getMinFreq(), rc.getMaxFreq(), 5).getValue())) .setWidth(width); break; case StringConstants.SERVICE_TYPE_100GE_M: @@ -173,7 +173,7 @@ public class PcePathDescription { .setZToAMinFrequency(new FrequencyTHz(Decimal64.valueOf(rc.getMinFreq()))) .setZToAWavelengthNumber(Uint32.valueOf(rc.getResultWavelength())) .setCentralFrequency(new FrequencyTHz(GridUtils.getCentralFrequencyWithPrecision( - rc.getMinFreq(), rc.getMaxFreq(), 4).getValue())) + rc.getMinFreq(), rc.getMaxFreq(), 5).getValue())) .setWidth(GridUtils.getWidthFromRateAndModulationFormat( Uint32.valueOf(rc.getRate()), modulationFormat)); break; @@ -185,7 +185,7 @@ public class PcePathDescription { .setZToAMinFrequency(new FrequencyTHz(Decimal64.valueOf(rc.getMinFreq()))) .setZToAWavelengthNumber(Uint32.valueOf(rc.getResultWavelength())) .setCentralFrequency(new FrequencyTHz(GridUtils.getCentralFrequencyWithPrecision( - rc.getMinFreq(), rc.getMaxFreq(), 4).getValue())) + rc.getMinFreq(), rc.getMaxFreq(), 5).getValue())) .setWidth(width); break; case StringConstants.SERVICE_TYPE_100GE_M: -- 2.36.6