@Override
    public void write(ChannelBuffer bb, OFBsnPduTxRequestVer10 message) {
      int startIndex = bb.writerIndex();
      // fixed value property version = 1
      bb.writeByte((byte) 0x1);
      // fixed value property type = 4
      bb.writeByte((byte) 0x4);
      // length is length of variable message, will be updated at the end
      int lengthIndex = bb.writerIndex();
      bb.writeShort(U16.t(0));

      bb.writeInt(U32.t(message.xid));
      // fixed value property experimenter = 0x5c16c7L
      bb.writeInt(0x5c16c7);
      // fixed value property subtype = 0x1fL
      bb.writeInt(0x1f);
      bb.writeInt(U32.t(message.txIntervalMs));
      message.portNo.write2Bytes(bb);
      bb.writeByte(U8.t(message.slotNum));
      // pad: 3 bytes
      bb.writeZero(3);
      bb.writeBytes(message.data);

      // update length field
      int length = bb.writerIndex() - startIndex;
      bb.setShort(lengthIndex, length);
    }
 @Override
 public void write(ChannelBuffer bb, OFBsnTlvIcmpTypeVer14 message) {
   // fixed value property type = 0x44
   bb.writeShort((short) 0x44);
   // fixed value property length = 5
   bb.writeShort((short) 0x5);
   bb.writeByte(U8.t(message.value));
 }
 @Override
 public void write(ByteBuf bb, OFBsnSetMirroringVer14 message) {
   // fixed value property version = 5
   bb.writeByte((byte) 0x5);
   // fixed value property type = 4
   bb.writeByte((byte) 0x4);
   // fixed value property length = 20
   bb.writeShort((short) 0x14);
   bb.writeInt(U32.t(message.xid));
   // fixed value property experimenter = 0x5c16c7L
   bb.writeInt(0x5c16c7);
   // fixed value property subtype = 0x3L
   bb.writeInt(0x3);
   bb.writeByte(U8.t(message.reportMirrorPorts));
   // pad: 3 bytes
   bb.writeZero(3);
 }