blob: 8da4e361ad3507e8e2678615b2f6554a7ddbf65c [file] [log] [blame]
Jonathan Hart472062d2014-04-03 10:56:48 -07001package net.onrc.onos.core.topology;
Jonathan Hart062a2e82014-02-03 09:41:57 -08002
Jonathan Hart062a2e82014-02-03 09:41:57 -08003import net.floodlightcontroller.util.MACAddress;
4
Yuta HIGUCHI181d34d2014-02-05 15:05:46 -08005/**
6 * Interface of Device Object exposed to the "NB" read-only Topology.
Ray Milkey269ffb92014-04-03 14:43:30 -07007 * <p/>
Yuta HIGUCHI8d9fddf2014-02-10 13:32:16 -08008 * TODO What a Device Object represent is unclear at the moment.
Ray Milkey269ffb92014-04-03 14:43:30 -07009 * <p/>
Yuta HIGUCHI181d34d2014-02-05 15:05:46 -080010 * Everything returned by these interfaces must be either Unmodifiable view,
11 * immutable object, or a copy of the original "SB" In-memory Topology.
Yuta HIGUCHI181d34d2014-02-05 15:05:46 -080012 */
Jonathan Hart062a2e82014-02-03 09:41:57 -080013public interface Device {
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -080014 /**
15 * Get the device MAC address.
16 *
17 * @return the device MAC address.
18 */
19 public MACAddress getMacAddress();
Yuta HIGUCHI181d34d2014-02-05 15:05:46 -080020
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -080021 /**
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -080022 * Get the device attachment points.
Ray Milkey269ffb92014-04-03 14:43:30 -070023 * <p/>
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -080024 * Add requirement for Iteration order? Latest observed port first.
25 *
26 * @return the device attachment points.
27 */
28 public Iterable<Port> getAttachmentPoints();
Yuta HIGUCHI181d34d2014-02-05 15:05:46 -080029
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -080030 /**
31 * Get the device last seen time.
Ray Milkey269ffb92014-04-03 14:43:30 -070032 * <p/>
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -080033 * TODO: what is the time definition?
34 *
35 * @return the device last seen time.
36 */
37 public long getLastSeenTime();
Jonathan Hart062a2e82014-02-03 09:41:57 -080038}