Search in sources :

Example 1 with LegacyFastRerouteObjectBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.fast.reroute.object.fast.reroute.object.legacy.fast.reroute.object._case.LegacyFastRerouteObjectBuilder in project bgpcep by opendaylight.

the class InformationalFastRerouteObjectParser method localParseObject.

@Override
protected RsvpTeObject localParseObject(final ByteBuf byteBuf) throws RSVPParsingException {
    final LegacyFastRerouteObjectBuilder builder = new LegacyFastRerouteObjectBuilder().setSetupPriority(readUint8(byteBuf)).setHoldPriority(readUint8(byteBuf)).setHopLimit(readUint8(byteBuf));
    // skip reserved
    byteBuf.skipBytes(Byte.BYTES);
    final ByteBuf v = byteBuf.readSlice(METRIC_VALUE_F_LENGTH);
    builder.setBandwidth(new Bandwidth(ByteArray.readAllBytes(v)));
    builder.setIncludeAny(new AttributeFilter(readUint32(byteBuf)));
    builder.setExcludeAny(new AttributeFilter(readUint32(byteBuf)));
    return builder.build();
}
Also used : LegacyFastRerouteObjectBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.fast.reroute.object.fast.reroute.object.legacy.fast.reroute.object._case.LegacyFastRerouteObjectBuilder) Bandwidth(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.network.concepts.rev131125.Bandwidth) AttributeFilter(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.AttributeFilter) ByteBuf(io.netty.buffer.ByteBuf)

Aggregations

ByteBuf (io.netty.buffer.ByteBuf)1 Bandwidth (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.network.concepts.rev131125.Bandwidth)1 AttributeFilter (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.AttributeFilter)1 LegacyFastRerouteObjectBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.fast.reroute.object.fast.reroute.object.legacy.fast.reroute.object._case.LegacyFastRerouteObjectBuilder)1