- byte[] customArray = customString.getBytes(Charset.defaultCharset());
- byte[] customValue = new byte[customTlvOffset + customArray.length];
+ byte[] customByteArray = customString.getBytes(Charset.defaultCharset());
+ return createCustomTLVValue(CUSTOM_TLV_SUB_TYPE_NODE_CONNECTOR_ID, customByteArray);
+ }
+
+ /**
+ * Creates the custom TLV value including OUI, subtype and custom string
+ * @param subtype openflow subtype
+ * @param portId
+ * port identifier string
+ * @return the custom TLV value in byte array
+ */
+ static public byte[] createCustomTLVValue(byte[] subtype, byte[] customByteArray) {
+ byte[] customValue = new byte[customTlvOffset + customByteArray.length];