Search in sources :

Example 11 with Stateful1

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.initiated.rev200720.Stateful1 in project bgpcep by opendaylight.

the class InitiatedStatefulCapabilityTlvParser method serializeFlags.

@Override
protected BitArray serializeFlags(final Stateful sct) {
    final BitArray flags = new BitArray(FLAGS_F_LENGTH);
    final Stateful1 sfi = sct.augmentation(Stateful1.class);
    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)

Example 12 with Stateful1

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.initiated.rev200720.Stateful1 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

PCEPSession (org.opendaylight.protocol.pcep.PCEPSession)4 BitArray (org.opendaylight.protocol.util.BitArray)4 Stateful1 (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.initiated.rev200720.Stateful1)4 Stateful1 (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.initiated.rev171025.Stateful1)2 BigInteger (java.math.BigInteger)1 Tlvs3 (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.pcep.sync.optimizations.rev171025.Tlvs3)1 Tlvs3 (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.pcep.sync.optimizations.rev200720.Tlvs3)1 Tlvs3Builder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.pcep.sync.optimizations.rev200720.Tlvs3Builder)1 SpeakerEntityIdBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.pcep.sync.optimizations.rev200720.speaker.entity.id.tlv.SpeakerEntityIdBuilder)1 Stateful1Builder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.initiated.rev171025.Stateful1Builder)1 Message (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.Message)1 Message (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.Message)1 Uint64 (org.opendaylight.yangtools.yang.common.Uint64)1