blob: d6afd7aa22643531840d96dfde2523d982421abe [file] [log] [blame]
HIGUCHI Yutaa56fbde2013-06-17 14:26:05 -07001package net.onrc.onos.ofcontroller.linkdiscovery.internal;
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -08002
3import net.floodlightcontroller.core.web.serializers.DPIDSerializer;
4import net.floodlightcontroller.core.web.serializers.IPv4Serializer;
5
6import org.codehaus.jackson.annotate.JsonProperty;
7import org.codehaus.jackson.map.annotate.JsonSerialize;
8
9/***
10 * Topology Switch event history related classes and members
11 * @author subrata
12 *
13 */
14public class EventHistoryTopologySwitch {
15 // The following fields are not stored as String to save memory
16 // They should be converted to appropriate human-readable strings by
17 // the front end (e.g. in cli in Python)
18 public long dpid;
19 public int ipv4Addr;
20 public int l4Port;
21 public String reason;
22
23 @JsonProperty("Switch")
24 @JsonSerialize(using=DPIDSerializer.class)
25 public long getDpid() {
26 return dpid;
27 }
28 @JsonProperty("IpAddr")
29 @JsonSerialize(using=IPv4Serializer.class)
30 public int getIpv4Addr() {
31 return ipv4Addr;
32 }
33 @JsonProperty("Port")
34 public int getL4Port() {
35 return l4Port;
36 }
37 @JsonProperty("Reason")
38 public String getReason() {
39 return reason;
40 }
41
42
43}