Jonathan Hart | 472062d | 2014-04-03 10:56:48 -0700 | [diff] [blame] | 1 | package net.onrc.onos.core.topology; |
Jonathan Hart | 062a2e8 | 2014-02-03 09:41:57 -0800 | [diff] [blame] | 2 | |
Jonathan Hart | 062a2e8 | 2014-02-03 09:41:57 -0800 | [diff] [blame] | 3 | import net.floodlightcontroller.util.MACAddress; |
| 4 | |
Yuta HIGUCHI | 181d34d | 2014-02-05 15:05:46 -0800 | [diff] [blame] | 5 | /** |
| 6 | * Interface of Device Object exposed to the "NB" read-only Topology. |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 7 | * <p/> |
Yuta HIGUCHI | 8d9fddf | 2014-02-10 13:32:16 -0800 | [diff] [blame] | 8 | * TODO What a Device Object represent is unclear at the moment. |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 9 | * <p/> |
Yuta HIGUCHI | 181d34d | 2014-02-05 15:05:46 -0800 | [diff] [blame] | 10 | * Everything returned by these interfaces must be either Unmodifiable view, |
| 11 | * immutable object, or a copy of the original "SB" In-memory Topology. |
Yuta HIGUCHI | 181d34d | 2014-02-05 15:05:46 -0800 | [diff] [blame] | 12 | */ |
Jonathan Hart | 062a2e8 | 2014-02-03 09:41:57 -0800 | [diff] [blame] | 13 | public interface Device { |
Pavlin Radoslavov | 7c8f69a | 2014-02-19 19:01:45 -0800 | [diff] [blame] | 14 | /** |
| 15 | * Get the device MAC address. |
| 16 | * |
| 17 | * @return the device MAC address. |
| 18 | */ |
| 19 | public MACAddress getMacAddress(); |
Yuta HIGUCHI | 181d34d | 2014-02-05 15:05:46 -0800 | [diff] [blame] | 20 | |
Pavlin Radoslavov | 7c8f69a | 2014-02-19 19:01:45 -0800 | [diff] [blame] | 21 | /** |
Pavlin Radoslavov | 7c8f69a | 2014-02-19 19:01:45 -0800 | [diff] [blame] | 22 | * Get the device attachment points. |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 23 | * <p/> |
Pavlin Radoslavov | 7c8f69a | 2014-02-19 19:01:45 -0800 | [diff] [blame] | 24 | * Add requirement for Iteration order? Latest observed port first. |
| 25 | * |
| 26 | * @return the device attachment points. |
| 27 | */ |
| 28 | public Iterable<Port> getAttachmentPoints(); |
Yuta HIGUCHI | 181d34d | 2014-02-05 15:05:46 -0800 | [diff] [blame] | 29 | |
Pavlin Radoslavov | 7c8f69a | 2014-02-19 19:01:45 -0800 | [diff] [blame] | 30 | /** |
| 31 | * Get the device last seen time. |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 32 | * <p/> |
Pavlin Radoslavov | 7c8f69a | 2014-02-19 19:01:45 -0800 | [diff] [blame] | 33 | * TODO: what is the time definition? |
| 34 | * |
| 35 | * @return the device last seen time. |
| 36 | */ |
| 37 | public long getLastSeenTime(); |
Jonathan Hart | 062a2e8 | 2014-02-03 09:41:57 -0800 | [diff] [blame] | 38 | } |