Search in sources :

Example 21 with Stateful

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev200720.stateful.capability.tlv.Stateful in project bgpcep by opendaylight.

the class SyncOptimizationsCapabilityTlvParser method serializeFlags.

@Override
protected BitArray serializeFlags(final Stateful sct) {
    final BitArray flags = new BitArray(FLAGS_F_LENGTH);
    final Stateful1 sfi = sct.augmentation(Stateful1.class);
    final org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.pcep.sync.optimizations.rev200720.Stateful1 sf2 = sct.augmentation(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.pcep.sync.optimizations.rev200720.Stateful1.class);
    if (sf2 != null) {
        flags.set(F_FLAG_OFFSET, sf2.getTriggeredInitialSync());
        flags.set(D_FLAG_OFFSET, sf2.getDeltaLspSyncCapability());
        flags.set(T_FLAG_OFFSET, sf2.getTriggeredResync());
        flags.set(S_FLAG_OFFSET, sf2.getIncludeDbVersion());
    }
    if (sfi != null) {
        flags.set(I_FLAG_OFFSET, sfi.getInitiation());
    }
    flags.set(U_FLAG_OFFSET, sct.getLspUpdateCapability());
    return flags;
}
Also used : Stateful1(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.initiated.rev200720.Stateful1) BitArray(org.opendaylight.protocol.util.BitArray)

Aggregations

Stateful (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev200720.stateful.capability.tlv.Stateful)6 Stateful1 (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.initiated.rev200720.Stateful1)4 StatefulBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev200720.stateful.capability.tlv.StatefulBuilder)4 ByteBuf (io.netty.buffer.ByteBuf)3 Test (org.junit.Test)3 BitArray (org.opendaylight.protocol.util.BitArray)3 Stateful (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev171025.stateful.capability.tlv.Stateful)3 InetAddress (java.net.InetAddress)2 PCEPDeserializerException (org.opendaylight.protocol.pcep.spi.PCEPDeserializerException)2 Tlvs3Builder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.pcep.sync.optimizations.rev200720.Tlvs3Builder)2 SpeakerEntityIdBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.pcep.sync.optimizations.rev200720.speaker.entity.id.tlv.SpeakerEntityIdBuilder)2 Stateful1 (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.initiated.rev171025.Stateful1)2 Tlvs1 (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev171025.Tlvs1)2 Tlvs1 (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev200720.Tlvs1)2 Tlvs1Builder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev200720.Tlvs1Builder)2 StatefulCapabilitiesStatsAug (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.stateful.stats.rev181109.StatefulCapabilitiesStatsAug)2 StatefulMessagesStatsAug (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.stateful.stats.rev181109.StatefulMessagesStatsAug)2 StatefulStatefulCapabilityTlvParser (org.opendaylight.protocol.pcep.ietf.stateful.StatefulStatefulCapabilityTlvParser)1 ObjectHeaderImpl (org.opendaylight.protocol.pcep.spi.ObjectHeaderImpl)1 SyncOptimizationsActivator (org.opendaylight.protocol.pcep.sync.optimizations.SyncOptimizationsActivator)1