+ Iterator<LinkConcatenation> linkConcatenationiterator = linkConcatenationList.iterator();
+ if (!linkConcatenationiterator.hasNext()) {
+ return 0L;
+ }
+ // power on the output of the previous ROADM (dBm)
+ double pout = retrievePower(linkConcatenationiterator.next().getFiberType());
+ // span loss (dB)
+ double spanLoss = this.omsAttributesSpan.getSpanlossCurrent().getValue().doubleValue();
+ // power on the input of the current ROADM (dBm)
+ double pin = pout - spanLoss;
+ double spanOsnrDb = NOISE_MASK_A * pin + NOISE_MASK_B;
+ if (spanOsnrDb > UPPER_BOUND_OSNR) {
+ spanOsnrDb = UPPER_BOUND_OSNR;
+ } else if (spanOsnrDb < LOWER_BOUND_OSNR) {
+ spanOsnrDb = LOWER_BOUND_OSNR;
+ }
+ return spanOsnrDb;