コード例 #1
0
  public String getFullHexMask() {
    String fullHexMaskString = "";
    if (mask == null) {
      fullHexMaskString += HexString.Zero((length - 1) / 8 + 1);
    } else {
      if (mask.length >= OFGlobal.OFP_MAX_FIELD_LENGTH_IN_BYTE) {
        fullHexMaskString += HexString.toHex(mask, 0, OFGlobal.OFP_MAX_FIELD_LENGTH_IN_BYTE);
      } else {
        fullHexMaskString += HexString.toHex(mask);
        // fullHexMaskString += HexString.Zero(OFGlobal.OFP_MAX_FIELD_LENGTH_IN_BYTE - mask.length);
      }
    }

    return fullHexMaskString;
  }
コード例 #2
0
  public String getFullHexValue() {
    String fullHexValueString = "";
    if (value == null) {
      fullHexValueString += HexString.Zero((length - 1) / 8 + 1);
    } else {
      if (value.length >= OFGlobal.OFP_MAX_FIELD_LENGTH_IN_BYTE) {
        fullHexValueString += HexString.toHex(value, 0, OFGlobal.OFP_MAX_FIELD_LENGTH_IN_BYTE);
      } else {
        fullHexValueString += HexString.toHex(value);
        // fullHexValueString += HexString.Zero(OFGlobal.OFP_MAX_FIELD_LENGTH_IN_BYTE -
        // value.length);
      }
    }

    return fullHexValueString;
  }