use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.segment.routing.ext.rev200120.binding.sub.tlvs.binding.sub.tlv.UnnumberedInterfaceIdBackupEroCase in project bgpcep by opendaylight.
the class UnnumberedEroParser method parseUnnumberedEroBackupCase.
static UnnumberedInterfaceIdBackupEroCase parseUnnumberedEroBackupCase(final ByteBuf buffer) {
final UnnumberedInterfaceIdBackupEroBuilder builder = new UnnumberedInterfaceIdBackupEroBuilder();
final BitArray flags = BitArray.valueOf(buffer, Ipv4EroParser.FLAGS_SIZE);
builder.setLoose(flags.get(Ipv4EroParser.LOOSE));
buffer.skipBytes(Ipv4EroParser.RESERVED_ERO);
builder.setRouterId(readUint32(buffer));
builder.setInterfaceId(readUint32(buffer));
return new UnnumberedInterfaceIdBackupEroCaseBuilder().setUnnumberedInterfaceIdBackupEro(builder.build()).build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.segment.routing.ext.rev200120.binding.sub.tlvs.binding.sub.tlv.UnnumberedInterfaceIdBackupEroCase in project bgpcep by opendaylight.
the class BackupUnnumberedParser method serializeSubTlv.
@Override
public void serializeSubTlv(final BindingSubTlv bindingSubTlv, final ByteBuf aggregator) {
checkArgument(bindingSubTlv instanceof UnnumberedInterfaceIdBackupEroCase, "Wrong BindingSubTlv instance expected", bindingSubTlv);
final UnnumberedInterfaceIdBackupEro unnumberedBackup = ((UnnumberedInterfaceIdBackupEroCase) bindingSubTlv).getUnnumberedInterfaceIdBackupEro();
TlvUtil.writeTLV(BACKUP_UNNUMBERED_ERO, serializeUnnumberedIdEro(unnumberedBackup.getLoose(), unnumberedBackup.getRouterId(), unnumberedBackup.getInterfaceId()), aggregator);
}
Aggregations