Search in sources :

Example 1 with BasicFastRerouteObjectBuilder

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

the class FastRerouteObjectParser method localParseObject.

@Override
protected RsvpTeObject localParseObject(final ByteBuf byteBuf) {
    final BasicFastRerouteObjectBuilder builder = new BasicFastRerouteObjectBuilder().setSetupPriority(readUint8(byteBuf)).setHoldPriority(readUint8(byteBuf)).setHopLimit(readUint8(byteBuf)).setFlags(FastRerouteFlags.forValue(byteBuf.readUnsignedByte()));
    final ByteBuf v = byteBuf.readSlice(METRIC_VALUE_F_LENGTH);
    return builder.setBandwidth(new Bandwidth(ByteArray.readAllBytes(v))).setIncludeAny(new AttributeFilter(readUint32(byteBuf))).setExcludeAny(new AttributeFilter(readUint32(byteBuf))).setIncludeAll(new AttributeFilter(readUint32(byteBuf))).build();
}
Also used : 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) BasicFastRerouteObjectBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.fast.reroute.object.fast.reroute.object.basic.fast.reroute.object._case.BasicFastRerouteObjectBuilder)

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 BasicFastRerouteObjectBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.fast.reroute.object.fast.reroute.object.basic.fast.reroute.object._case.BasicFastRerouteObjectBuilder)1