blob: 4da9d6b33ef878c4aef882c3120c5d79c867fa78 [file] [log] [blame]
Sho SHIMIZU014c33a2015-04-30 11:40:37 -07001/*
2 * Copyright 2015 Open Networking Laboratory
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16package org.onosproject.net;
17
18import org.onlab.util.Frequency;
19
20/**
21 * Represents interval frequency between two neighboring wavelengths.
22 */
23public enum ChannelSpacing {
24 CHL_100GHZ(100), // 100 GHz
25 CHL_50GHZ(50), // 50 GHz
26 CHL_25GHZ(25), // 25 GHz
27 CHL_12P5GHZ(12.5), // 12.5 GHz
28 CHL_6P25GHZ(6.5); // 6.25 GHz
29
30 private final Frequency frequency;
31
32 /**
33 * Creates an instance with the specified interval in GHz.
34 *
35 * @param value interval of neighboring wavelengths in GHz.
36 */
37 ChannelSpacing(double value) {
38 this.frequency = Frequency.ofGHz(value);
39 }
40
41 public Frequency frequency() {
42 return frequency;
43 }
44}