blob: 36a2a9d0dd3fdee79bbab8612c3f77e0add229f3 [file] [log] [blame]
Sho SHIMIZU014c33a2015-04-30 11:40:37 -07001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2015-present Open Networking Laboratory
Sho SHIMIZU014c33a2015-04-30 11:40:37 -07003 *
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 {
Sho SHIMIZU00762ee2016-01-05 16:32:24 -080024 CHL_100GHZ(100_000), // 100 GHz
25 CHL_50GHZ(50_000), // 50 GHz
26 CHL_25GHZ(25_000), // 25 GHz
27 CHL_12P5GHZ(12_500), // 12.5 GHz
28 CHL_6P25GHZ(6_250); // 6.25 GHz
Sho SHIMIZU014c33a2015-04-30 11:40:37 -070029
30 private final Frequency frequency;
31
32 /**
Jimmy Yanda878fc2016-09-02 16:32:01 -070033 * Creates an instance with the specified interval in MHz.
Sho SHIMIZU014c33a2015-04-30 11:40:37 -070034 *
Jimmy Yanda878fc2016-09-02 16:32:01 -070035 * @param value interval of neighboring wavelengths in MHz.
Sho SHIMIZU014c33a2015-04-30 11:40:37 -070036 */
Sho SHIMIZU00762ee2016-01-05 16:32:24 -080037 ChannelSpacing(long value) {
38 this.frequency = Frequency.ofMHz(value);
Sho SHIMIZU014c33a2015-04-30 11:40:37 -070039 }
40
41 public Frequency frequency() {
42 return frequency;
43 }
44}