blob: 052a6528144a3c15e8d4fa0459c1a685f3ca7aca [file] [log] [blame]
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -08001package org.openflow.protocol;
2
3import org.openflow.util.HexString;
4
5public 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}