blob: d36317f462db4bc5c56566204c2feffad0a00ab9 [file] [log] [blame]
cheng fan48e832c2015-05-29 01:54:47 +08001/*
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.pcep.api;
17
18/**
chengfan3e618792015-06-28 21:42:01 +080019 * Abstraction of a network infrastructure link.
cheng fan48e832c2015-05-29 01:54:47 +080020 */
21public interface PcepLink extends PcepOperator {
22
23 public enum SubType {
24 /**
25 * Optical Transmission Section Link.
26 */
27 OTS,
28
29 /**
30 * Optical Physical Section Link.
31 */
32 OPS,
33
34 /**
35 * User-to-Network Interface Link.
36 */
37 UNI,
38
39 /**
40 * Optical channel Data Unit-k link.
41 */
42 ODUk,
43
44 /**
45 * Optical Transport Network link.
46 */
47 OTU,
48 }
49
50
cheng fan7716ec92015-05-31 01:53:19 +080051 public enum PortType {
52 ODU_PORT, OCH_PORT, OMS_PORT
53 }
cheng fan48e832c2015-05-29 01:54:47 +080054
55 /**
chengfan3e618792015-06-28 21:42:01 +080056 * Returns the link endpoint port type.
cheng fan48e832c2015-05-29 01:54:47 +080057 *
58 * @return endpoint port type
59 */
cheng fan7716ec92015-05-31 01:53:19 +080060 public PortType portType();
cheng fan48e832c2015-05-29 01:54:47 +080061
62 /**
chengfan3e618792015-06-28 21:42:01 +080063 * Returns the link sub type,OTS,OPS,PKT_OPTICAL or ODUK.
cheng fan48e832c2015-05-29 01:54:47 +080064 *
65 * @return link subType
66 */
67
68 public SubType linkSubType();
69
70 /**
chengfan3e618792015-06-28 21:42:01 +080071 * Returns the link state, up or down.
cheng fan48e832c2015-05-29 01:54:47 +080072 *
73 * @return link state
74 */
75 public String linkState();
76
77 /**
chengfan3e618792015-06-28 21:42:01 +080078 * Returns the distance of a link.
cheng fan48e832c2015-05-29 01:54:47 +080079 *
80 * @return distance
81 */
82 public int linkDistance();
83
84 /**
chengfan3e618792015-06-28 21:42:01 +080085 * Returns the capacity type of a link,1: WAVELENGTHNUM, 2:SLOTNUM, 3,
cheng fan48e832c2015-05-29 01:54:47 +080086 * BANDWIDTH.
87 *
88 * @return capacity type
89 */
90 public String linkCapacityType();
91
92 /**
chengfan3e618792015-06-28 21:42:01 +080093 * Returns the available capacity value ,such as available bandwidth.
cheng fan48e832c2015-05-29 01:54:47 +080094 *
95 * @return availValue
96 */
97 public int linkAvailValue();
98
99 /**
chengfan3e618792015-06-28 21:42:01 +0800100 * Returns the max capacity value ,such as max bandwidth.
cheng fan48e832c2015-05-29 01:54:47 +0800101 *
102 * @return maxValue
103 */
104 public int linkMaxValue();
105
106 /**
chengfan3e618792015-06-28 21:42:01 +0800107 * Returns the source device did of a link.
cheng fan48e832c2015-05-29 01:54:47 +0800108 *
109 * @return source did
110 */
111 public PcepDpid linkSrcDeviceID();
112
113 /**
chengfan3e618792015-06-28 21:42:01 +0800114 * Returns the destination device did of a link.
cheng fan48e832c2015-05-29 01:54:47 +0800115 *
116 * @return destination did
117 */
118 public PcepDpid linkDstDeviceId();
119
120 /**
chengfan3e618792015-06-28 21:42:01 +0800121 * Returns the source port number of a link.
cheng fan48e832c2015-05-29 01:54:47 +0800122 *
123 * @return port number
124 */
125 public long linkSrcPort();
126
127 /**
chengfan3e618792015-06-28 21:42:01 +0800128 * Returns the destination port number of a link.
cheng fan48e832c2015-05-29 01:54:47 +0800129 *
130 * @return port number
131 */
132 public long linkDstPort();
133
134}