tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 1 | package org.onlab.onos.net.device; |
2 | |||||
tom | ca20e0c | 2014-09-03 23:22:24 -0700 | [diff] [blame] | 3 | import org.onlab.onos.net.PortNumber; |
4 | |||||
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 5 | /** |
6 | * Information about a port. | ||||
7 | */ | ||||
8 | public interface PortDescription { | ||||
9 | |||||
10 | // TODO: possibly relocate this to a common ground so that this can also used by host tracking if required | ||||
11 | |||||
tom | ca20e0c | 2014-09-03 23:22:24 -0700 | [diff] [blame] | 12 | /** |
13 | * Returns the port number. | ||||
14 | * | ||||
15 | * @return port number | ||||
16 | */ | ||||
17 | PortNumber portNumber(); | ||||
18 | |||||
19 | /** | ||||
tom | d40fc7a | 2014-09-04 16:41:10 -0700 | [diff] [blame] | 20 | * Indicates whether or not the port is up and active. |
tom | ca20e0c | 2014-09-03 23:22:24 -0700 | [diff] [blame] | 21 | * |
tom | d40fc7a | 2014-09-04 16:41:10 -0700 | [diff] [blame] | 22 | * @return true if the port is active and has carrier signal |
tom | ca20e0c | 2014-09-03 23:22:24 -0700 | [diff] [blame] | 23 | */ |
tom | d40fc7a | 2014-09-04 16:41:10 -0700 | [diff] [blame] | 24 | boolean isEnabled(); |
tom | ca20e0c | 2014-09-03 23:22:24 -0700 | [diff] [blame] | 25 | |
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 26 | } |