2 * Copyright © 2017 Orange, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.transportpce.common.fixedflex;
11 import org.slf4j.Logger;
12 import org.slf4j.LoggerFactory;
14 public final class FixedFlexImpl implements FixedFlexInterface {
15 private static final Logger LOG = LoggerFactory.getLogger(FixedFlexImpl.class);
17 private double centerFrequency;
20 private double wavelength;
22 public FixedFlexImpl(Long index, double centreFrequency, double start, double stop, double wavelength) {
24 this.centerFrequency = centreFrequency;
27 this.wavelength = wavelength;
30 public FixedFlexImpl() {
32 this.centerFrequency = 0;
40 * @param index Wavelength number
41 * @return Returns FixedFlexImp object with the calculated result.
43 public FixedFlexImpl getFixedFlexWaveMapping(long wlIndex) {
44 FixedFlexImpl fixedFlex = new FixedFlexImpl();
45 fixedFlex.centerFrequency = 196.1 - (wlIndex - 1) * 0.05;
46 fixedFlex.wavelength = 1528.77 + ((wlIndex - 1) * 0.39);
47 fixedFlex.start = fixedFlex.centerFrequency - 0.025;
48 fixedFlex.stop = fixedFlex.centerFrequency + 0.025;
52 public double getCenterFrequency() {
53 return centerFrequency;
56 public double getStart() {
60 public long getIndex() {
64 public double getStop() {
68 public double getWavelength() {