HIGUCHI Yuta | a56fbde | 2013-06-17 14:26:05 -0700 | [diff] [blame] | 1 | package net.onrc.onos.ofcontroller.linkdiscovery.internal; |
Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 2 | |
| 3 | import net.floodlightcontroller.core.web.serializers.DPIDSerializer; |
| 4 | |
| 5 | import org.codehaus.jackson.annotate.JsonProperty; |
| 6 | import org.codehaus.jackson.map.annotate.JsonSerialize; |
| 7 | |
| 8 | /*** |
| 9 | * Topology link up/down event history related classes and members |
| 10 | * @author subrata |
| 11 | * |
| 12 | */ |
| 13 | public 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 | } |