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