コード例 #1
0
 @Override
 public void funnel(OFBsnImageDescStatsReplyVer14 message, PrimitiveSink sink) {
   // fixed value property version = 5
   sink.putByte((byte) 0x5);
   // fixed value property type = 19
   sink.putByte((byte) 0x13);
   // fixed value property length = 536
   sink.putShort((short) 0x218);
   sink.putLong(message.xid);
   // fixed value property statsType = 65535
   sink.putShort((short) 0xffff);
   OFStatsReplyFlagsSerializerVer14.putTo(message.flags, sink);
   // skip pad (4 bytes)
   // fixed value property experimenter = 0x5c16c7L
   sink.putInt(0x5c16c7);
   // fixed value property subtype = 0xeL
   sink.putInt(0xe);
   sink.putUnencodedChars(message.imageChecksum);
   sink.putUnencodedChars(message.startupConfigChecksum);
 }
コード例 #2
0
 @Override
 public void funnel(OFPortDescVer12 message, PrimitiveSink sink) {
   message.portNo.putTo(sink);
   // skip pad (4 bytes)
   message.hwAddr.putTo(sink);
   // skip pad (2 bytes)
   sink.putUnencodedChars(message.name);
   OFPortConfigSerializerVer12.putTo(message.config, sink);
   OFPortStateSerializerVer12.putTo(message.state, sink);
   OFPortFeaturesSerializerVer12.putTo(message.curr, sink);
   OFPortFeaturesSerializerVer12.putTo(message.advertised, sink);
   OFPortFeaturesSerializerVer12.putTo(message.supported, sink);
   OFPortFeaturesSerializerVer12.putTo(message.peer, sink);
   sink.putLong(message.currSpeed);
   sink.putLong(message.maxSpeed);
 }