Package org.onosproject.net
Class OchSignal
- java.lang.Object
-
- org.onosproject.net.OchSignal
-
-
Field Summary
Fields Modifier and Type Field Description static Set<Integer>
FIXED_GRID_SLOT_GRANULARITIES
-
Constructor Summary
Constructors Constructor Description OchSignal(GridType gridType, ChannelSpacing channelSpacing, int spacingMultiplier, int slotGranularity)
Creates an instance with the specified arguments.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Frequency
centralFrequency()
Returns central frequency in MHz.ChannelSpacing
channelSpacing()
Returns channel spacing.boolean
equals(Object obj)
GridType
gridType()
Returns grid type.int
hashCode()
static OchSignal
newDwdmSlot(ChannelSpacing spacing, int index)
Creates an instance ofOchSignal
representing a fixed DWDM frequency slot.static OchSignal
newFlexGridSlot(int index)
Creates an instance ofOchSignal
representing a flex grid frequency slot.int
slotGranularity()
Returns slot width granularity.Frequency
slotWidth()
Returns slot width.int
spacingMultiplier()
Returns spacing multiplier.static OchSignal
toFixedGrid(List<OchSignal> lambdas, ChannelSpacing spacing)
Convert list of lambdas with flex grid 6.25 GHz spacing and 12.5 GHz width into fixed grid OCh signal.static SortedSet<OchSignal>
toFlexGrid(OchSignal ochSignal)
Convert fixed grid OCh signal to sorted set of flex grid slots with 6.25 GHz spacing and 12.5 GHz slot width.String
toString()
-
-
-
Constructor Detail
-
OchSignal
public OchSignal(GridType gridType, ChannelSpacing channelSpacing, int spacingMultiplier, int slotGranularity)
Creates an instance with the specified arguments. It it recommended to useLambda.ochSignal(GridType, ChannelSpacing, int, int)
unless you want to use the concrete type, OchSignal, directly.- Parameters:
gridType
- grid typechannelSpacing
- channel spacingspacingMultiplier
- channel spacing multiplierslotGranularity
- slot width granularity
-
-
Method Detail
-
newFlexGridSlot
public static OchSignal newFlexGridSlot(int index)
Creates an instance ofOchSignal
representing a flex grid frequency slot.- Parameters:
index
- slot index (relative to "the center frequency" 193.1THz)- Returns:
- FlexGrid
OchSignal
-
newDwdmSlot
public static OchSignal newDwdmSlot(ChannelSpacing spacing, int index)
Creates an instance ofOchSignal
representing a fixed DWDM frequency slot.- Parameters:
spacing
- channel spacingindex
- slot index (relative to "the center frequency" 193.1THz)- Returns:
- DWDM
OchSignal
-
gridType
public GridType gridType()
Returns grid type.- Returns:
- grid type
-
channelSpacing
public ChannelSpacing channelSpacing()
Returns channel spacing.- Returns:
- channel spacing
-
spacingMultiplier
public int spacingMultiplier()
Returns spacing multiplier.- Returns:
- spacing multiplier
-
slotGranularity
public int slotGranularity()
Returns slot width granularity.- Returns:
- slot width granularity
-
centralFrequency
public Frequency centralFrequency()
Returns central frequency in MHz.- Returns:
- frequency in MHz
-
slotWidth
public Frequency slotWidth()
Returns slot width.- Returns:
- slot width
-
toFlexGrid
public static SortedSet<OchSignal> toFlexGrid(OchSignal ochSignal)
Convert fixed grid OCh signal to sorted set of flex grid slots with 6.25 GHz spacing and 12.5 GHz slot width.- Parameters:
ochSignal
- fixed grid lambda- Returns:
- sorted set of flex grid OCh lambdas
-
toFixedGrid
public static OchSignal toFixedGrid(List<OchSignal> lambdas, ChannelSpacing spacing)
Convert list of lambdas with flex grid 6.25 GHz spacing and 12.5 GHz width into fixed grid OCh signal.- Parameters:
lambdas
- list of flex grid lambdas in sorted orderspacing
- desired fixed grid spacing- Returns:
- fixed grid lambda
-
-