tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 1 | // Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University |
| 2 | // Copyright (c) 2011, 2012 Open Networking Foundation |
| 3 | // Copyright (c) 2012, 2013 Big Switch Networks, Inc. |
| 4 | // This library was generated by the LoxiGen Compiler. |
| 5 | // See the file LICENSE.txt which should have been included in the source distribution |
| 6 | |
| 7 | // Automatically generated by LOXI from template of_class.java |
| 8 | // Do not modify |
| 9 | |
| 10 | package org.projectfloodlight.openflow.protocol.ver13; |
| 11 | |
| 12 | import org.projectfloodlight.openflow.protocol.*; |
| 13 | import org.projectfloodlight.openflow.protocol.action.*; |
| 14 | import org.projectfloodlight.openflow.protocol.actionid.*; |
| 15 | import org.projectfloodlight.openflow.protocol.bsntlv.*; |
| 16 | import org.projectfloodlight.openflow.protocol.errormsg.*; |
| 17 | import org.projectfloodlight.openflow.protocol.meterband.*; |
| 18 | import org.projectfloodlight.openflow.protocol.instruction.*; |
| 19 | import org.projectfloodlight.openflow.protocol.instructionid.*; |
| 20 | import org.projectfloodlight.openflow.protocol.match.*; |
| 21 | import org.projectfloodlight.openflow.protocol.oxm.*; |
| 22 | import org.projectfloodlight.openflow.protocol.queueprop.*; |
| 23 | import org.projectfloodlight.openflow.types.*; |
| 24 | import org.projectfloodlight.openflow.util.*; |
| 25 | import org.projectfloodlight.openflow.exceptions.*; |
| 26 | import java.util.Set; |
| 27 | import org.slf4j.Logger; |
| 28 | import org.slf4j.LoggerFactory; |
| 29 | import org.jboss.netty.buffer.ChannelBuffer; |
| 30 | import com.google.common.hash.PrimitiveSink; |
| 31 | import com.google.common.hash.Funnel; |
| 32 | |
| 33 | class OFAsyncSetVer13 implements OFAsyncSet { |
| 34 | private static final Logger logger = LoggerFactory.getLogger(OFAsyncSetVer13.class); |
| 35 | // version: 1.3 |
| 36 | final static byte WIRE_VERSION = 4; |
| 37 | final static int LENGTH = 32; |
| 38 | |
| 39 | private final static long DEFAULT_XID = 0x0L; |
| 40 | private final static long DEFAULT_PACKET_IN_MASK_EQUAL_MASTER = 0x0L; |
| 41 | private final static long DEFAULT_PACKET_IN_MASK_SLAVE = 0x0L; |
| 42 | private final static long DEFAULT_PORT_STATUS_MASK_EQUAL_MASTER = 0x0L; |
| 43 | private final static long DEFAULT_PORT_STATUS_MASK_SLAVE = 0x0L; |
| 44 | private final static long DEFAULT_FLOW_REMOVED_MASK_EQUAL_MASTER = 0x0L; |
| 45 | private final static long DEFAULT_FLOW_REMOVED_MASK_SLAVE = 0x0L; |
| 46 | |
| 47 | // OF message fields |
| 48 | private final long xid; |
| 49 | private final long packetInMaskEqualMaster; |
| 50 | private final long packetInMaskSlave; |
| 51 | private final long portStatusMaskEqualMaster; |
| 52 | private final long portStatusMaskSlave; |
| 53 | private final long flowRemovedMaskEqualMaster; |
| 54 | private final long flowRemovedMaskSlave; |
| 55 | // |
| 56 | // Immutable default instance |
| 57 | final static OFAsyncSetVer13 DEFAULT = new OFAsyncSetVer13( |
| 58 | DEFAULT_XID, DEFAULT_PACKET_IN_MASK_EQUAL_MASTER, DEFAULT_PACKET_IN_MASK_SLAVE, DEFAULT_PORT_STATUS_MASK_EQUAL_MASTER, DEFAULT_PORT_STATUS_MASK_SLAVE, DEFAULT_FLOW_REMOVED_MASK_EQUAL_MASTER, DEFAULT_FLOW_REMOVED_MASK_SLAVE |
| 59 | ); |
| 60 | |
| 61 | // package private constructor - used by readers, builders, and factory |
| 62 | OFAsyncSetVer13(long xid, long packetInMaskEqualMaster, long packetInMaskSlave, long portStatusMaskEqualMaster, long portStatusMaskSlave, long flowRemovedMaskEqualMaster, long flowRemovedMaskSlave) { |
| 63 | this.xid = xid; |
| 64 | this.packetInMaskEqualMaster = packetInMaskEqualMaster; |
| 65 | this.packetInMaskSlave = packetInMaskSlave; |
| 66 | this.portStatusMaskEqualMaster = portStatusMaskEqualMaster; |
| 67 | this.portStatusMaskSlave = portStatusMaskSlave; |
| 68 | this.flowRemovedMaskEqualMaster = flowRemovedMaskEqualMaster; |
| 69 | this.flowRemovedMaskSlave = flowRemovedMaskSlave; |
| 70 | } |
| 71 | |
| 72 | // Accessors for OF message fields |
| 73 | @Override |
| 74 | public OFVersion getVersion() { |
| 75 | return OFVersion.OF_13; |
| 76 | } |
| 77 | |
| 78 | @Override |
| 79 | public OFType getType() { |
| 80 | return OFType.SET_ASYNC; |
| 81 | } |
| 82 | |
| 83 | @Override |
| 84 | public long getXid() { |
| 85 | return xid; |
| 86 | } |
| 87 | |
| 88 | @Override |
| 89 | public long getPacketInMaskEqualMaster() { |
| 90 | return packetInMaskEqualMaster; |
| 91 | } |
| 92 | |
| 93 | @Override |
| 94 | public long getPacketInMaskSlave() { |
| 95 | return packetInMaskSlave; |
| 96 | } |
| 97 | |
| 98 | @Override |
| 99 | public long getPortStatusMaskEqualMaster() { |
| 100 | return portStatusMaskEqualMaster; |
| 101 | } |
| 102 | |
| 103 | @Override |
| 104 | public long getPortStatusMaskSlave() { |
| 105 | return portStatusMaskSlave; |
| 106 | } |
| 107 | |
| 108 | @Override |
| 109 | public long getFlowRemovedMaskEqualMaster() { |
| 110 | return flowRemovedMaskEqualMaster; |
| 111 | } |
| 112 | |
| 113 | @Override |
| 114 | public long getFlowRemovedMaskSlave() { |
| 115 | return flowRemovedMaskSlave; |
| 116 | } |
| 117 | |
| 118 | |
| 119 | |
| 120 | public OFAsyncSet.Builder createBuilder() { |
| 121 | return new BuilderWithParent(this); |
| 122 | } |
| 123 | |
| 124 | static class BuilderWithParent implements OFAsyncSet.Builder { |
| 125 | final OFAsyncSetVer13 parentMessage; |
| 126 | |
| 127 | // OF message fields |
| 128 | private boolean xidSet; |
| 129 | private long xid; |
| 130 | private boolean packetInMaskEqualMasterSet; |
| 131 | private long packetInMaskEqualMaster; |
| 132 | private boolean packetInMaskSlaveSet; |
| 133 | private long packetInMaskSlave; |
| 134 | private boolean portStatusMaskEqualMasterSet; |
| 135 | private long portStatusMaskEqualMaster; |
| 136 | private boolean portStatusMaskSlaveSet; |
| 137 | private long portStatusMaskSlave; |
| 138 | private boolean flowRemovedMaskEqualMasterSet; |
| 139 | private long flowRemovedMaskEqualMaster; |
| 140 | private boolean flowRemovedMaskSlaveSet; |
| 141 | private long flowRemovedMaskSlave; |
| 142 | |
| 143 | BuilderWithParent(OFAsyncSetVer13 parentMessage) { |
| 144 | this.parentMessage = parentMessage; |
| 145 | } |
| 146 | |
| 147 | @Override |
| 148 | public OFVersion getVersion() { |
| 149 | return OFVersion.OF_13; |
| 150 | } |
| 151 | |
| 152 | @Override |
| 153 | public OFType getType() { |
| 154 | return OFType.SET_ASYNC; |
| 155 | } |
| 156 | |
| 157 | @Override |
| 158 | public long getXid() { |
| 159 | return xid; |
| 160 | } |
| 161 | |
| 162 | @Override |
| 163 | public OFAsyncSet.Builder setXid(long xid) { |
| 164 | this.xid = xid; |
| 165 | this.xidSet = true; |
| 166 | return this; |
| 167 | } |
| 168 | @Override |
| 169 | public long getPacketInMaskEqualMaster() { |
| 170 | return packetInMaskEqualMaster; |
| 171 | } |
| 172 | |
| 173 | @Override |
| 174 | public OFAsyncSet.Builder setPacketInMaskEqualMaster(long packetInMaskEqualMaster) { |
| 175 | this.packetInMaskEqualMaster = packetInMaskEqualMaster; |
| 176 | this.packetInMaskEqualMasterSet = true; |
| 177 | return this; |
| 178 | } |
| 179 | @Override |
| 180 | public long getPacketInMaskSlave() { |
| 181 | return packetInMaskSlave; |
| 182 | } |
| 183 | |
| 184 | @Override |
| 185 | public OFAsyncSet.Builder setPacketInMaskSlave(long packetInMaskSlave) { |
| 186 | this.packetInMaskSlave = packetInMaskSlave; |
| 187 | this.packetInMaskSlaveSet = true; |
| 188 | return this; |
| 189 | } |
| 190 | @Override |
| 191 | public long getPortStatusMaskEqualMaster() { |
| 192 | return portStatusMaskEqualMaster; |
| 193 | } |
| 194 | |
| 195 | @Override |
| 196 | public OFAsyncSet.Builder setPortStatusMaskEqualMaster(long portStatusMaskEqualMaster) { |
| 197 | this.portStatusMaskEqualMaster = portStatusMaskEqualMaster; |
| 198 | this.portStatusMaskEqualMasterSet = true; |
| 199 | return this; |
| 200 | } |
| 201 | @Override |
| 202 | public long getPortStatusMaskSlave() { |
| 203 | return portStatusMaskSlave; |
| 204 | } |
| 205 | |
| 206 | @Override |
| 207 | public OFAsyncSet.Builder setPortStatusMaskSlave(long portStatusMaskSlave) { |
| 208 | this.portStatusMaskSlave = portStatusMaskSlave; |
| 209 | this.portStatusMaskSlaveSet = true; |
| 210 | return this; |
| 211 | } |
| 212 | @Override |
| 213 | public long getFlowRemovedMaskEqualMaster() { |
| 214 | return flowRemovedMaskEqualMaster; |
| 215 | } |
| 216 | |
| 217 | @Override |
| 218 | public OFAsyncSet.Builder setFlowRemovedMaskEqualMaster(long flowRemovedMaskEqualMaster) { |
| 219 | this.flowRemovedMaskEqualMaster = flowRemovedMaskEqualMaster; |
| 220 | this.flowRemovedMaskEqualMasterSet = true; |
| 221 | return this; |
| 222 | } |
| 223 | @Override |
| 224 | public long getFlowRemovedMaskSlave() { |
| 225 | return flowRemovedMaskSlave; |
| 226 | } |
| 227 | |
| 228 | @Override |
| 229 | public OFAsyncSet.Builder setFlowRemovedMaskSlave(long flowRemovedMaskSlave) { |
| 230 | this.flowRemovedMaskSlave = flowRemovedMaskSlave; |
| 231 | this.flowRemovedMaskSlaveSet = true; |
| 232 | return this; |
| 233 | } |
| 234 | |
| 235 | |
| 236 | @Override |
| 237 | public OFAsyncSet build() { |
| 238 | long xid = this.xidSet ? this.xid : parentMessage.xid; |
| 239 | long packetInMaskEqualMaster = this.packetInMaskEqualMasterSet ? this.packetInMaskEqualMaster : parentMessage.packetInMaskEqualMaster; |
| 240 | long packetInMaskSlave = this.packetInMaskSlaveSet ? this.packetInMaskSlave : parentMessage.packetInMaskSlave; |
| 241 | long portStatusMaskEqualMaster = this.portStatusMaskEqualMasterSet ? this.portStatusMaskEqualMaster : parentMessage.portStatusMaskEqualMaster; |
| 242 | long portStatusMaskSlave = this.portStatusMaskSlaveSet ? this.portStatusMaskSlave : parentMessage.portStatusMaskSlave; |
| 243 | long flowRemovedMaskEqualMaster = this.flowRemovedMaskEqualMasterSet ? this.flowRemovedMaskEqualMaster : parentMessage.flowRemovedMaskEqualMaster; |
| 244 | long flowRemovedMaskSlave = this.flowRemovedMaskSlaveSet ? this.flowRemovedMaskSlave : parentMessage.flowRemovedMaskSlave; |
| 245 | |
| 246 | // |
| 247 | return new OFAsyncSetVer13( |
| 248 | xid, |
| 249 | packetInMaskEqualMaster, |
| 250 | packetInMaskSlave, |
| 251 | portStatusMaskEqualMaster, |
| 252 | portStatusMaskSlave, |
| 253 | flowRemovedMaskEqualMaster, |
| 254 | flowRemovedMaskSlave |
| 255 | ); |
| 256 | } |
| 257 | |
| 258 | } |
| 259 | |
| 260 | static class Builder implements OFAsyncSet.Builder { |
| 261 | // OF message fields |
| 262 | private boolean xidSet; |
| 263 | private long xid; |
| 264 | private boolean packetInMaskEqualMasterSet; |
| 265 | private long packetInMaskEqualMaster; |
| 266 | private boolean packetInMaskSlaveSet; |
| 267 | private long packetInMaskSlave; |
| 268 | private boolean portStatusMaskEqualMasterSet; |
| 269 | private long portStatusMaskEqualMaster; |
| 270 | private boolean portStatusMaskSlaveSet; |
| 271 | private long portStatusMaskSlave; |
| 272 | private boolean flowRemovedMaskEqualMasterSet; |
| 273 | private long flowRemovedMaskEqualMaster; |
| 274 | private boolean flowRemovedMaskSlaveSet; |
| 275 | private long flowRemovedMaskSlave; |
| 276 | |
| 277 | @Override |
| 278 | public OFVersion getVersion() { |
| 279 | return OFVersion.OF_13; |
| 280 | } |
| 281 | |
| 282 | @Override |
| 283 | public OFType getType() { |
| 284 | return OFType.SET_ASYNC; |
| 285 | } |
| 286 | |
| 287 | @Override |
| 288 | public long getXid() { |
| 289 | return xid; |
| 290 | } |
| 291 | |
| 292 | @Override |
| 293 | public OFAsyncSet.Builder setXid(long xid) { |
| 294 | this.xid = xid; |
| 295 | this.xidSet = true; |
| 296 | return this; |
| 297 | } |
| 298 | @Override |
| 299 | public long getPacketInMaskEqualMaster() { |
| 300 | return packetInMaskEqualMaster; |
| 301 | } |
| 302 | |
| 303 | @Override |
| 304 | public OFAsyncSet.Builder setPacketInMaskEqualMaster(long packetInMaskEqualMaster) { |
| 305 | this.packetInMaskEqualMaster = packetInMaskEqualMaster; |
| 306 | this.packetInMaskEqualMasterSet = true; |
| 307 | return this; |
| 308 | } |
| 309 | @Override |
| 310 | public long getPacketInMaskSlave() { |
| 311 | return packetInMaskSlave; |
| 312 | } |
| 313 | |
| 314 | @Override |
| 315 | public OFAsyncSet.Builder setPacketInMaskSlave(long packetInMaskSlave) { |
| 316 | this.packetInMaskSlave = packetInMaskSlave; |
| 317 | this.packetInMaskSlaveSet = true; |
| 318 | return this; |
| 319 | } |
| 320 | @Override |
| 321 | public long getPortStatusMaskEqualMaster() { |
| 322 | return portStatusMaskEqualMaster; |
| 323 | } |
| 324 | |
| 325 | @Override |
| 326 | public OFAsyncSet.Builder setPortStatusMaskEqualMaster(long portStatusMaskEqualMaster) { |
| 327 | this.portStatusMaskEqualMaster = portStatusMaskEqualMaster; |
| 328 | this.portStatusMaskEqualMasterSet = true; |
| 329 | return this; |
| 330 | } |
| 331 | @Override |
| 332 | public long getPortStatusMaskSlave() { |
| 333 | return portStatusMaskSlave; |
| 334 | } |
| 335 | |
| 336 | @Override |
| 337 | public OFAsyncSet.Builder setPortStatusMaskSlave(long portStatusMaskSlave) { |
| 338 | this.portStatusMaskSlave = portStatusMaskSlave; |
| 339 | this.portStatusMaskSlaveSet = true; |
| 340 | return this; |
| 341 | } |
| 342 | @Override |
| 343 | public long getFlowRemovedMaskEqualMaster() { |
| 344 | return flowRemovedMaskEqualMaster; |
| 345 | } |
| 346 | |
| 347 | @Override |
| 348 | public OFAsyncSet.Builder setFlowRemovedMaskEqualMaster(long flowRemovedMaskEqualMaster) { |
| 349 | this.flowRemovedMaskEqualMaster = flowRemovedMaskEqualMaster; |
| 350 | this.flowRemovedMaskEqualMasterSet = true; |
| 351 | return this; |
| 352 | } |
| 353 | @Override |
| 354 | public long getFlowRemovedMaskSlave() { |
| 355 | return flowRemovedMaskSlave; |
| 356 | } |
| 357 | |
| 358 | @Override |
| 359 | public OFAsyncSet.Builder setFlowRemovedMaskSlave(long flowRemovedMaskSlave) { |
| 360 | this.flowRemovedMaskSlave = flowRemovedMaskSlave; |
| 361 | this.flowRemovedMaskSlaveSet = true; |
| 362 | return this; |
| 363 | } |
| 364 | // |
| 365 | @Override |
| 366 | public OFAsyncSet build() { |
| 367 | long xid = this.xidSet ? this.xid : DEFAULT_XID; |
| 368 | long packetInMaskEqualMaster = this.packetInMaskEqualMasterSet ? this.packetInMaskEqualMaster : DEFAULT_PACKET_IN_MASK_EQUAL_MASTER; |
| 369 | long packetInMaskSlave = this.packetInMaskSlaveSet ? this.packetInMaskSlave : DEFAULT_PACKET_IN_MASK_SLAVE; |
| 370 | long portStatusMaskEqualMaster = this.portStatusMaskEqualMasterSet ? this.portStatusMaskEqualMaster : DEFAULT_PORT_STATUS_MASK_EQUAL_MASTER; |
| 371 | long portStatusMaskSlave = this.portStatusMaskSlaveSet ? this.portStatusMaskSlave : DEFAULT_PORT_STATUS_MASK_SLAVE; |
| 372 | long flowRemovedMaskEqualMaster = this.flowRemovedMaskEqualMasterSet ? this.flowRemovedMaskEqualMaster : DEFAULT_FLOW_REMOVED_MASK_EQUAL_MASTER; |
| 373 | long flowRemovedMaskSlave = this.flowRemovedMaskSlaveSet ? this.flowRemovedMaskSlave : DEFAULT_FLOW_REMOVED_MASK_SLAVE; |
| 374 | |
| 375 | |
| 376 | return new OFAsyncSetVer13( |
| 377 | xid, |
| 378 | packetInMaskEqualMaster, |
| 379 | packetInMaskSlave, |
| 380 | portStatusMaskEqualMaster, |
| 381 | portStatusMaskSlave, |
| 382 | flowRemovedMaskEqualMaster, |
| 383 | flowRemovedMaskSlave |
| 384 | ); |
| 385 | } |
| 386 | |
| 387 | } |
| 388 | |
| 389 | |
| 390 | final static Reader READER = new Reader(); |
| 391 | static class Reader implements OFMessageReader<OFAsyncSet> { |
| 392 | @Override |
| 393 | public OFAsyncSet readFrom(ChannelBuffer bb) throws OFParseError { |
| 394 | int start = bb.readerIndex(); |
| 395 | // fixed value property version == 4 |
| 396 | byte version = bb.readByte(); |
| 397 | if(version != (byte) 0x4) |
| 398 | throw new OFParseError("Wrong version: Expected=OFVersion.OF_13(4), got="+version); |
| 399 | // fixed value property type == 28 |
| 400 | byte type = bb.readByte(); |
| 401 | if(type != (byte) 0x1c) |
| 402 | throw new OFParseError("Wrong type: Expected=OFType.SET_ASYNC(28), got="+type); |
| 403 | int length = U16.f(bb.readShort()); |
| 404 | if(length != 32) |
| 405 | throw new OFParseError("Wrong length: Expected=32(32), got="+length); |
| 406 | if(bb.readableBytes() + (bb.readerIndex() - start) < length) { |
| 407 | // Buffer does not have all data yet |
| 408 | bb.readerIndex(start); |
| 409 | return null; |
| 410 | } |
| 411 | if(logger.isTraceEnabled()) |
| 412 | logger.trace("readFrom - length={}", length); |
| 413 | long xid = U32.f(bb.readInt()); |
| 414 | long packetInMaskEqualMaster = U32.f(bb.readInt()); |
| 415 | long packetInMaskSlave = U32.f(bb.readInt()); |
| 416 | long portStatusMaskEqualMaster = U32.f(bb.readInt()); |
| 417 | long portStatusMaskSlave = U32.f(bb.readInt()); |
| 418 | long flowRemovedMaskEqualMaster = U32.f(bb.readInt()); |
| 419 | long flowRemovedMaskSlave = U32.f(bb.readInt()); |
| 420 | |
| 421 | OFAsyncSetVer13 asyncSetVer13 = new OFAsyncSetVer13( |
| 422 | xid, |
| 423 | packetInMaskEqualMaster, |
| 424 | packetInMaskSlave, |
| 425 | portStatusMaskEqualMaster, |
| 426 | portStatusMaskSlave, |
| 427 | flowRemovedMaskEqualMaster, |
| 428 | flowRemovedMaskSlave |
| 429 | ); |
| 430 | if(logger.isTraceEnabled()) |
| 431 | logger.trace("readFrom - read={}", asyncSetVer13); |
| 432 | return asyncSetVer13; |
| 433 | } |
| 434 | } |
| 435 | |
| 436 | public void putTo(PrimitiveSink sink) { |
| 437 | FUNNEL.funnel(this, sink); |
| 438 | } |
| 439 | |
| 440 | final static OFAsyncSetVer13Funnel FUNNEL = new OFAsyncSetVer13Funnel(); |
| 441 | static class OFAsyncSetVer13Funnel implements Funnel<OFAsyncSetVer13> { |
| 442 | private static final long serialVersionUID = 1L; |
| 443 | @Override |
| 444 | public void funnel(OFAsyncSetVer13 message, PrimitiveSink sink) { |
| 445 | // fixed value property version = 4 |
| 446 | sink.putByte((byte) 0x4); |
| 447 | // fixed value property type = 28 |
| 448 | sink.putByte((byte) 0x1c); |
| 449 | // fixed value property length = 32 |
| 450 | sink.putShort((short) 0x20); |
| 451 | sink.putLong(message.xid); |
| 452 | sink.putLong(message.packetInMaskEqualMaster); |
| 453 | sink.putLong(message.packetInMaskSlave); |
| 454 | sink.putLong(message.portStatusMaskEqualMaster); |
| 455 | sink.putLong(message.portStatusMaskSlave); |
| 456 | sink.putLong(message.flowRemovedMaskEqualMaster); |
| 457 | sink.putLong(message.flowRemovedMaskSlave); |
| 458 | } |
| 459 | } |
| 460 | |
| 461 | |
| 462 | public void writeTo(ChannelBuffer bb) { |
| 463 | WRITER.write(bb, this); |
| 464 | } |
| 465 | |
| 466 | final static Writer WRITER = new Writer(); |
| 467 | static class Writer implements OFMessageWriter<OFAsyncSetVer13> { |
| 468 | @Override |
| 469 | public void write(ChannelBuffer bb, OFAsyncSetVer13 message) { |
| 470 | // fixed value property version = 4 |
| 471 | bb.writeByte((byte) 0x4); |
| 472 | // fixed value property type = 28 |
| 473 | bb.writeByte((byte) 0x1c); |
| 474 | // fixed value property length = 32 |
| 475 | bb.writeShort((short) 0x20); |
| 476 | bb.writeInt(U32.t(message.xid)); |
| 477 | bb.writeInt(U32.t(message.packetInMaskEqualMaster)); |
| 478 | bb.writeInt(U32.t(message.packetInMaskSlave)); |
| 479 | bb.writeInt(U32.t(message.portStatusMaskEqualMaster)); |
| 480 | bb.writeInt(U32.t(message.portStatusMaskSlave)); |
| 481 | bb.writeInt(U32.t(message.flowRemovedMaskEqualMaster)); |
| 482 | bb.writeInt(U32.t(message.flowRemovedMaskSlave)); |
| 483 | |
| 484 | |
| 485 | } |
| 486 | } |
| 487 | |
| 488 | @Override |
| 489 | public String toString() { |
| 490 | StringBuilder b = new StringBuilder("OFAsyncSetVer13("); |
| 491 | b.append("xid=").append(xid); |
| 492 | b.append(", "); |
| 493 | b.append("packetInMaskEqualMaster=").append(packetInMaskEqualMaster); |
| 494 | b.append(", "); |
| 495 | b.append("packetInMaskSlave=").append(packetInMaskSlave); |
| 496 | b.append(", "); |
| 497 | b.append("portStatusMaskEqualMaster=").append(portStatusMaskEqualMaster); |
| 498 | b.append(", "); |
| 499 | b.append("portStatusMaskSlave=").append(portStatusMaskSlave); |
| 500 | b.append(", "); |
| 501 | b.append("flowRemovedMaskEqualMaster=").append(flowRemovedMaskEqualMaster); |
| 502 | b.append(", "); |
| 503 | b.append("flowRemovedMaskSlave=").append(flowRemovedMaskSlave); |
| 504 | b.append(")"); |
| 505 | return b.toString(); |
| 506 | } |
| 507 | |
| 508 | @Override |
| 509 | public boolean equals(Object obj) { |
| 510 | if (this == obj) |
| 511 | return true; |
| 512 | if (obj == null) |
| 513 | return false; |
| 514 | if (getClass() != obj.getClass()) |
| 515 | return false; |
| 516 | OFAsyncSetVer13 other = (OFAsyncSetVer13) obj; |
| 517 | |
| 518 | if( xid != other.xid) |
| 519 | return false; |
| 520 | if( packetInMaskEqualMaster != other.packetInMaskEqualMaster) |
| 521 | return false; |
| 522 | if( packetInMaskSlave != other.packetInMaskSlave) |
| 523 | return false; |
| 524 | if( portStatusMaskEqualMaster != other.portStatusMaskEqualMaster) |
| 525 | return false; |
| 526 | if( portStatusMaskSlave != other.portStatusMaskSlave) |
| 527 | return false; |
| 528 | if( flowRemovedMaskEqualMaster != other.flowRemovedMaskEqualMaster) |
| 529 | return false; |
| 530 | if( flowRemovedMaskSlave != other.flowRemovedMaskSlave) |
| 531 | return false; |
| 532 | return true; |
| 533 | } |
| 534 | |
| 535 | @Override |
| 536 | public int hashCode() { |
| 537 | final int prime = 31; |
| 538 | int result = 1; |
| 539 | |
| 540 | result = prime * (int) (xid ^ (xid >>> 32)); |
| 541 | result = prime * (int) (packetInMaskEqualMaster ^ (packetInMaskEqualMaster >>> 32)); |
| 542 | result = prime * (int) (packetInMaskSlave ^ (packetInMaskSlave >>> 32)); |
| 543 | result = prime * (int) (portStatusMaskEqualMaster ^ (portStatusMaskEqualMaster >>> 32)); |
| 544 | result = prime * (int) (portStatusMaskSlave ^ (portStatusMaskSlave >>> 32)); |
| 545 | result = prime * (int) (flowRemovedMaskEqualMaster ^ (flowRemovedMaskEqualMaster >>> 32)); |
| 546 | result = prime * (int) (flowRemovedMaskSlave ^ (flowRemovedMaskSlave >>> 32)); |
| 547 | return result; |
| 548 | } |
| 549 | |
| 550 | } |