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 FrequencycentralFrequency()Returns central frequency in MHz.ChannelSpacingchannelSpacing()Returns channel spacing.booleanequals(Object obj)GridTypegridType()Returns grid type.inthashCode()static OchSignalnewDwdmSlot(ChannelSpacing spacing, int index)Creates an instance ofOchSignalrepresenting a fixed DWDM frequency slot.static OchSignalnewFlexGridSlot(int index)Creates an instance ofOchSignalrepresenting a flex grid frequency slot.intslotGranularity()Returns slot width granularity.FrequencyslotWidth()Returns slot width.intspacingMultiplier()Returns spacing multiplier.static OchSignaltoFixedGrid(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.StringtoString()
-
-
-
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 ofOchSignalrepresenting 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 ofOchSignalrepresenting 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
-
-