+ public static final BigDecimal WIDTH_80 = BigDecimal.valueOf(80);
+ public static final BigDecimal WIDTH_40 = BigDecimal.valueOf(40);
+ public static final BigDecimal SLOT_WIDTH_50 = BigDecimal.valueOf(50);
+ public static final BigDecimal SLOT_WIDTH_87_5 = BigDecimal.valueOf(87.5);
+
+ /**
+ * Map for associate service type with nb slots.
+ */
+ public static final Map<String, Integer> SPECTRAL_WIDTH_SLOT_NUMBER_MAP = Map.of(
+ StringConstants.SERVICE_TYPE_100GE, NB_SLOTS_100G,
+ StringConstants.SERVICE_TYPE_400GE, NB_SLOTS_400G,
+ StringConstants.SERVICE_TYPE_OTU4, NB_SLOTS_100G);
+
+ /**
+ * Map to associate service rate to modulation format.
+ */
+ public static final Map<Uint32, ModulationFormat> RATE_MODULATION_FORMAT_MAP = Map.of(
+ ServiceRateConstant.RATE_100, ModulationFormat.DpQpsk,
+ ServiceRateConstant.RATE_200, ModulationFormat.DpQpsk,
+ ServiceRateConstant.RATE_300, ModulationFormat.DpQam8,
+ ServiceRateConstant.RATE_400, ModulationFormat.DpQam16);
+
+ /**
+ * Map to associate service rate and modulation format to frequency width.
+ */
+ public static final Table<Uint32, ModulationFormat, String> FREQUENCY_WIDTH_TABLE = initFrequencyWidthTable();
+
+ public static final long IRRELEVANT_WAVELENGTH_NUMBER = 0;
+
+ /**
+ * Map to associate width format to slot width.
+ */
+ public static final Map<BigDecimal, BigDecimal> WIDTH_SLOT_WIDTH_MAP = Map.of(
+ WIDTH_40, SLOT_WIDTH_50,
+ WIDTH_80, SLOT_WIDTH_87_5);
+
+ public static final int FIXED_GRID_FREQUENCY_PRECISION = 4;
+
+ public static final int FLEX_GRID_FREQUENCY_PRECISION = 5;
+
+ /**
+ * Map to associate service rate and modulation format to frequency slot width.
+ */
+ public static final Table<Uint32, ModulationFormat, BigDecimal> FREQUENCY_SLOT_WIDTH_TABLE =
+ initFrequencySlotWidthTable();
+ public static final String SPECTRAL_SLOT_SEPARATOR = ":";
+ public static final String NAME_PARAMETERS_SEPARATOR = "-";
+
+ /**
+ * Map for associate service rate with nb slots.
+ */
+ public static final Map<Uint32, Integer> RATE_SPECTRAL_WIDTH_SLOT_NUMBER_MAP = Map.of(
+ ServiceRateConstant.RATE_100, NB_SLOTS_100G,
+ ServiceRateConstant.RATE_200, NB_SLOTS_100G,
+ ServiceRateConstant.RATE_300, NB_SLOTS_100G,
+ ServiceRateConstant.RATE_400, NB_SLOTS_400G);