Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 1 | package org.openflow.protocol; |
| 2 | |
| 3 | import org.openflow.util.HexString; |
| 4 | |
| 5 | public class OFMatchWithSwDpid { |
| 6 | protected OFMatch ofMatch; |
| 7 | protected long switchDataPathId; |
| 8 | |
| 9 | public OFMatchWithSwDpid() { |
| 10 | this.ofMatch = new OFMatch(); |
| 11 | this.switchDataPathId = 0; |
| 12 | } |
| 13 | |
| 14 | public OFMatchWithSwDpid(OFMatch ofm, long swDpid) { |
| 15 | this.ofMatch = ofm.clone(); |
| 16 | this.switchDataPathId = swDpid; |
| 17 | } |
| 18 | public OFMatch getOfMatch() { |
| 19 | return ofMatch; |
| 20 | } |
| 21 | |
| 22 | public void setOfMatch(OFMatch ofMatch) { |
| 23 | this.ofMatch = ofMatch.clone(); |
| 24 | } |
| 25 | |
| 26 | public long getSwitchDataPathId() { |
| 27 | return this.switchDataPathId; |
| 28 | } |
| 29 | |
| 30 | public OFMatchWithSwDpid setSwitchDataPathId(long dpid) { |
| 31 | this.switchDataPathId = dpid; |
| 32 | return this; |
| 33 | } |
| 34 | |
| 35 | @Override |
| 36 | public String toString() { |
| 37 | return "OFMatchWithSwDpid [" + HexString.toHexString(switchDataPathId) + ofMatch + "]"; |
| 38 | } |
| 39 | } |