コード例 #1
0
 @Override
 public void write(ChannelBuffer bb, OFBsnImageDescStatsReplyVer14 message) {
   // fixed value property version = 5
   bb.writeByte((byte) 0x5);
   // fixed value property type = 19
   bb.writeByte((byte) 0x13);
   // fixed value property length = 536
   bb.writeShort((short) 0x218);
   bb.writeInt(U32.t(message.xid));
   // fixed value property statsType = 65535
   bb.writeShort((short) 0xffff);
   OFStatsReplyFlagsSerializerVer14.writeTo(bb, message.flags);
   // pad: 4 bytes
   bb.writeZero(4);
   // fixed value property experimenter = 0x5c16c7L
   bb.writeInt(0x5c16c7);
   // fixed value property subtype = 0xeL
   bb.writeInt(0xe);
   ChannelUtils.writeFixedLengthString(bb, message.imageChecksum, 256);
   ChannelUtils.writeFixedLengthString(bb, message.startupConfigChecksum, 256);
 }
コード例 #2
0
 @Override
 public void write(ByteBuf bb, OFPortDescVer12 message) {
   message.portNo.write4Bytes(bb);
   // pad: 4 bytes
   bb.writeZero(4);
   message.hwAddr.write6Bytes(bb);
   // pad: 2 bytes
   bb.writeZero(2);
   ChannelUtils.writeFixedLengthString(bb, message.name, 16);
   OFPortConfigSerializerVer12.writeTo(bb, message.config);
   OFPortStateSerializerVer12.writeTo(bb, message.state);
   OFPortFeaturesSerializerVer12.writeTo(bb, message.curr);
   OFPortFeaturesSerializerVer12.writeTo(bb, message.advertised);
   OFPortFeaturesSerializerVer12.writeTo(bb, message.supported);
   OFPortFeaturesSerializerVer12.writeTo(bb, message.peer);
   bb.writeInt(U32.t(message.currSpeed));
   bb.writeInt(U32.t(message.maxSpeed));
 }