Set flex-wave data in topo for roadm-tp
[transportpce.git] / common / src / main / java / org / opendaylight / transportpce / common / fixedflex / FixedFlexImpl.java
index 71f9f04c2376e0e2b755c4a8ad0c58d19828e8ef..bc829630a8c19afbcba5bb4afd7700aee174b40a 100644 (file)
@@ -33,9 +33,10 @@ public final class FixedFlexImpl implements FixedFlexInterface {
 
     public FixedFlexImpl(long wlIndex) {
         this.index = wlIndex;
-        this.centerFrequency = 196.1 - (wlIndex - 1) * 0.05;
-        this.start = this.centerFrequency - 0.025;
-        this.stop = this.centerFrequency + 0.025;
+        long mappedWL = wlIndex - 36;
+        this.centerFrequency = 193.1 + (50.0 / 1000.0) * mappedWL;
+        this.start = 193.1 + (50.0 * mappedWL - 25) / 1000.0;
+        this.stop = 193.1 + (50.0 * mappedWL + 25) / 1000.0;
         this.wavelength = 1528.77 + ((wlIndex - 1) * 0.39);
     }