use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.vendor.information.tlvs.VendorInformationTlv in project bgpcep by opendaylight.
the class AbstractVendorInformationTlvParser method serializeTlv.
@Override
public final void serializeTlv(final Tlv tlv, final ByteBuf buffer) {
Preconditions.checkArgument(tlv instanceof VendorInformationTlv, "Vendor Specific Tlv is mandatory.");
final VendorInformationTlv viTlv = (VendorInformationTlv) tlv;
final ByteBuf body = Unpooled.buffer();
writeUnsignedInt(getEnterpriseNumber().getValue(), body);
serializeEnterpriseSpecificInformation(viTlv.getEnterpriseSpecificInformation(), body);
TlvUtil.formatTlv(VENDOR_INFORMATION_TLV_TYPE, body, buffer);
}
Aggregations