blob: 48035b33a16ef8fbda06eb73589ce022a0de547d [file] [log] [blame]
Jonathan Hart472062d2014-04-03 10:56:48 -07001package net.onrc.onos.core.topology;
Jonathan Hart062a2e82014-02-03 09:41:57 -08002
3import java.net.InetAddress;
4import java.util.Collection;
5
6import net.floodlightcontroller.util.MACAddress;
7
Yuta HIGUCHI181d34d2014-02-05 15:05:46 -08008/**
9 * Interface of Device Object exposed to the "NB" read-only Topology.
Ray Milkey269ffb92014-04-03 14:43:30 -070010 * <p/>
Yuta HIGUCHI8d9fddf2014-02-10 13:32:16 -080011 * TODO What a Device Object represent is unclear at the moment.
Ray Milkey269ffb92014-04-03 14:43:30 -070012 * <p/>
Yuta HIGUCHI181d34d2014-02-05 15:05:46 -080013 * Everything returned by these interfaces must be either Unmodifiable view,
14 * immutable object, or a copy of the original "SB" In-memory Topology.
Yuta HIGUCHI181d34d2014-02-05 15:05:46 -080015 */
Jonathan Hart062a2e82014-02-03 09:41:57 -080016public interface Device {
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -080017 /**
18 * Get the device MAC address.
19 *
20 * @return the device MAC address.
21 */
22 public MACAddress getMacAddress();
Yuta HIGUCHI181d34d2014-02-05 15:05:46 -080023
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -080024 /**
25 * Get the device IP addresses.
26 *
27 * @return the device IP addresses.
28 */
29 public Collection<InetAddress> getIpAddress();
Yuta HIGUCHI181d34d2014-02-05 15:05:46 -080030
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -080031 /**
32 * Get the device attachment points.
Ray Milkey269ffb92014-04-03 14:43:30 -070033 * <p/>
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -080034 * Add requirement for Iteration order? Latest observed port first.
35 *
36 * @return the device attachment points.
37 */
38 public Iterable<Port> getAttachmentPoints();
Yuta HIGUCHI181d34d2014-02-05 15:05:46 -080039
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -080040 /**
41 * Get the device last seen time.
Ray Milkey269ffb92014-04-03 14:43:30 -070042 * <p/>
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -080043 * TODO: what is the time definition?
44 *
45 * @return the device last seen time.
46 */
47 public long getLastSeenTime();
Jonathan Hart062a2e82014-02-03 09:41:57 -080048}