use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.segment.routing.ext.rev200120.binding.sub.tlvs.binding.sub.tlv.UnnumberedInterfaceIdEroCase in project bgpcep by opendaylight.
the class UnnumberedEroParser method parseUnnumberedEroCase.
static UnnumberedInterfaceIdEroCase parseUnnumberedEroCase(final ByteBuf buffer) {
final UnnumberedInterfaceIdEroBuilder builder = new UnnumberedInterfaceIdEroBuilder();
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 UnnumberedInterfaceIdEroCaseBuilder().setUnnumberedInterfaceIdEro(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.UnnumberedInterfaceIdEroCase in project bgpcep by opendaylight.
the class UnnumberedEroParser method serializeSubTlv.
@Override
public void serializeSubTlv(final BindingSubTlv bindingSubTlv, final ByteBuf aggregator) {
checkArgument(bindingSubTlv instanceof UnnumberedInterfaceIdEroCase, "Wrong BindingSubTlv instance expected", bindingSubTlv);
final UnnumberedInterfaceIdEro unnumberedEro = ((UnnumberedInterfaceIdEroCase) bindingSubTlv).getUnnumberedInterfaceIdEro();
TlvUtil.writeTLV(getType(), serializeUnnumberedIdEro(unnumberedEro.getLoose(), unnumberedEro.getRouterId(), unnumberedEro.getInterfaceId()), aggregator);
}
Aggregations