Measure and set spanloss with one fractional digit
[transportpce.git] / olm / src / main / java / org / opendaylight / transportpce / olm / service / OlmPowerServiceImpl.java
index 943ad6b5cea5b1a7388a43349ecf62244bed0906..a0f3a77bf11026093c207a8c0c1066debb92e0d7 100644 (file)
@@ -528,7 +528,7 @@ public class OlmPowerServiceImpl implements OlmPowerService {
                 continue;
             }
             spanLoss = new BigDecimal(srcOtsPmHoler.getOtsParameterVal() - destOtsPmHoler.getOtsParameterVal())
-                .setScale(0, RoundingMode.HALF_UP);
+                .setScale(1, RoundingMode.HALF_UP);
             LOG.info("Spanloss Calculated as :{}={}-{}",
                 spanLoss, srcOtsPmHoler.getOtsParameterVal(), destOtsPmHoler.getOtsParameterVal());
             if (spanLoss.doubleValue() > 28) {