blob: 378859fd96bb28cf5098a020702e7f26f715f329 [file] [log] [blame]
Jonathan Hart23701d12014-04-03 10:45:48 -07001package net.onrc.onos.core.linkdiscovery.internal;
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -08002
3import net.floodlightcontroller.core.web.serializers.DPIDSerializer;
4
5import org.codehaus.jackson.annotate.JsonProperty;
6import org.codehaus.jackson.map.annotate.JsonSerialize;
7
8/***
9 * Topology link up/down event history related classes and members
10 * @author subrata
11 *
12 */
13public class EventHistoryTopologyLink {
14 // The following fields are not stored as String to save memory
15 // They should be converted to appropriate human-readable strings by
16 // the front end (e.g. in cli in Python)
17 public long srcSwDpid;
18 public long dstSwDpid;
19 public int srcPortState;
20 public int dstPortState;
21 public int srcSwport;
22 public int dstSwport;
23 public String linkType;
24 public String reason;
25
26 @JsonProperty("Source-Switch")
27 @JsonSerialize(using=DPIDSerializer.class)
28 public long getSrcSwDpid() {
29 return srcSwDpid;
30 }
31 @JsonProperty("Dest-Switch")
32 @JsonSerialize(using=DPIDSerializer.class)
33 public long getDstSwDpid() {
34 return dstSwDpid;
35 }
36 @JsonProperty("SrcPortState")
37 public int getSrcPortState() {
38 return srcPortState;
39 }
40 @JsonProperty("DstPortState")
41 public int getDstPortState() {
42 return dstPortState;
43 }
44 @JsonProperty("SrcPort")
45 public int getSrcSwport() {
46 return srcSwport;
47 }
48 @JsonProperty("DstPort")
49 public int getDstSwport() {
50 return dstSwport;
51 }
52 @JsonProperty("LinkType")
53 public String getLinkType() {
54 return linkType;
55 }
56 @JsonProperty("Reason")
57 public String getReason() {
58 return reason;
59 }
60
61
62}