public Tlv parseTlv(final byte[] buffer) throws PCEPDeserializerException {
return new LspCleanupBuilder().setTimeout(ByteArray.bytesToLong(buffer)).build();
}
-
- @Override
- public int getType() {
- return TYPE;
- }
}
private enum State {
Init, EroIn, BandwidthIn, MetricIn, End
}
-
- @Override
- public int getMessageType() {
- return TYPE;
- }
}
final LspDbVersion lsp = (LspDbVersion) tlv;
return TlvUtil.formatTlv(TYPE, ByteArray.longToBytes(lsp.getVersion().longValue(), DBV_F_LENGTH));
}
-
- @Override
- public int getType() {
- return TYPE;
- }
}
}
return result;
}
-
- @Override
- public int getObjectType() {
- return TYPE;
- }
-
- @Override
- public int getObjectClass() {
- return CLASS;
- }
}
final SymbolicPathName spn = (SymbolicPathName) tlv;
return TlvUtil.formatTlv(TYPE, spn.getPathName().getValue());
}
-
- @Override
- public int getType() {
- return TYPE;
- }
}
public static final int TYPE = 24;
- @Override
- public int getType() {
- return TYPE;
- }
-
@Override
public byte[] serializeTlv(final Tlv tlv) {
return TlvUtil.formatTlv(TYPE, ((org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.node.identifier.tlv.NodeIdentifier) tlv).getNodeId().getValue());
private enum State {
Init, EroIn, LspaIn, BandwidthIn, MetricIn, IroIn, End
}
-
- @Override
- public int getMessageType() {
- return TYPE;
- }
}
private enum State {
Init, LspaIn, BandwidthIn, MetricIn, IroIn, End
}
-
- @Override
- public int getMessageType() {
- return TYPE;
- }
}
ByteArray.copyWhole(value, bytes, offset);
return TlvUtil.formatTlv(TYPE, bytes);
}
-
- @Override
- public int getType() {
- return TYPE;
- }
}
flags.set(S_FLAG_OFFSET, sct.isIncludeDbVersion());
return TlvUtil.formatTlv(TYPE, ByteArray.bitSetToBytes(flags, FLAGS_F_LENGTH));
}
-
- @Override
- public int getType() {
- return TYPE;
- }
}
private enum State {
Init, EndpointsIn, EroIn, LspaIn, BandwidthIn, MetricIn, IroIn, End
}
-
- @Override
- public int getMessageType() {
- return TYPE;
- }
}
ByteArray.copyWhole(Ipv4Util.bytesForAddress(ipv4.getIpv4TunnelEndpointAddress()), bytes, offset);
return TlvUtil.formatTlv(TYPE, bytes);
}
-
- @Override
- public int getType() {
- return TYPE;
- }
}
ByteArray.copyWhole(Ipv6Util.bytesForAddress(ipv6.getIpv6TunnelEndpointAddress()), bytes, offset);
return TlvUtil.formatTlv(TYPE, bytes);
}
-
- @Override
- public int getType() {
- return TYPE;
- }
}
}
return result;
}
-
- @Override
- public int getObjectType() {
- return TYPE;
- }
-
- @Override
- public int getObjectClass() {
- return CLASS;
- }
}
final SymbolicPathName spn = (SymbolicPathName) tlv;
return TlvUtil.formatTlv(TYPE, spn.getPathName().getValue());
}
-
- @Override
- public int getType() {
- return TYPE;
- }
}
final LspErrorCode lsp = (LspErrorCode) tlv;
return TlvUtil.formatTlv(TYPE, ByteArray.longToBytes(lsp.getErrorCode(), UPDATE_ERR_CODE_LENGTH));
}
-
- @Override
- public int getType() {
- return TYPE;
- }
}
private enum State {
Init, EroIn, LspaIn, BandwidthIn, MetricIn, IroIn, RroIn, End
}
-
- @Override
- public int getMessageType() {
- return TYPE;
- }
}
private enum State {
Init, LspaIn, BandwidthIn, MetricIn, IroIn, End
}
-
- @Override
- public int getMessageType() {
- return TYPE;
- }
}
ByteArray.copyWhole(value, bytes, offset);
return bytes;
}
-
- @Override
- public int getType() {
- return TYPE;
- }
}
}
return new byte[0];
}
-
- @Override
- public int getObjectType() {
- return TYPE;
- }
-
- @Override
- public int getObjectClass() {
- return CLASS;
- }
}
flags.set(U_FLAG_OFFSET, sct.isLspUpdateCapability());
return TlvUtil.formatTlv(TYPE, ByteArray.bitSetToBytes(flags, FLAGS_F_LENGTH));
}
-
- @Override
- public int getType() {
- return TYPE;
- }
}
}
return new CloseBuilder().setCCloseMessage(msg).build();
}
-
- @Override
- public int getMessageType() {
- return TYPE;
- }
}
private enum State {
Init, ErrorIn, RpIn, Open, Error, OpenIn, End
}
-
- @Override
- public int getMessageType() {
- return TYPE;
- }
}
MessageUtil.formatMessage(TYPE, Unpooled.EMPTY_BUFFER, out);
}
- @Override
- public int getMessageType() {
- return TYPE;
- }
-
@Override
protected KeepaliveMessage validate(final List<Object> objects, final List<Message> errors) throws PCEPDeserializerException {
if (objects != null && !objects.isEmpty()) {
private enum State {
Init, RpIn, NotificationIn, End
}
-
- @Override
- public int getMessageType() {
- return TYPE;
- }
}
return new OpenBuilder().setOpenMessage(msg).build();
}
-
- @Override
- public int getMessageType() {
- return TYPE;
- }
}
private enum State {
Init, LspaIn, OfIn, BandwidthIn, MetricIn, IroIn, End
}
-
- @Override
- public int getMessageType() {
- return TYPE;
- }
}
private enum SvecState {
Init, OfIn, GcIn, XroIn, MetricIn, End
}
-
- @Override
- public int getMessageType() {
- return TYPE;
- }
}
final byte[] retBytes = Arrays.copyOf(((Bandwidth) object).getBandwidth().getValue(), BANDWIDTH_LENGTH);
return ObjectUtil.formatSubobject(TYPE, CLASS, object.isProcessingRule(), object.isIgnore(), retBytes);
}
-
- @Override
- public int getObjectType() {
- return TYPE;
- }
-
- @Override
- public int getObjectClass() {
- return CLASS;
- }
}
retBytes[SIZE - 1] = UnsignedBytes.checkedCast(((ClassType) object).getClassType().getValue());
return ObjectUtil.formatSubobject(TYPE, CLASS, object.isProcessingRule(), object.isIgnore(), retBytes);
}
-
- @Override
- public int getObjectType() {
- return TYPE;
- }
-
- @Override
- public int getObjectClass() {
- return CLASS;
- }
}
// No tlvs defined
return new byte[0];
}
-
- @Override
- public int getObjectType() {
- return TYPE;
- }
-
- @Override
- public int getObjectClass() {
- return CLASS;
- }
}
ByteArray.copyWhole(Ipv4Util.bytesForAddress((((Ipv4Case) afi).getIpv4()).getDestinationIpv4Address()), retBytes, DEST4_F_OFFSET);
return ObjectUtil.formatSubobject(TYPE, CLASS, object.isProcessingRule(), object.isIgnore(), retBytes);
}
-
- @Override
- public int getObjectType() {
- return TYPE;
- }
-
- @Override
- public int getObjectClass() {
- return CLASS;
- }
}
ByteArray.copyWhole(Ipv6Util.bytesForAddress((((Ipv6Case) afi).getIpv6()).getDestinationIpv6Address()), retBytes, DEST6_F_OFFSET);
return ObjectUtil.formatSubobject(TYPE, CLASS, object.isProcessingRule(), object.isIgnore(), retBytes);
}
-
- @Override
- public int getObjectType() {
- return TYPE;
- }
-
- @Override
- public int getObjectClass() {
- return CLASS;
- }
}
}
return new byte[0];
}
-
- @Override
- public int getObjectType() {
- return TYPE;
- }
-
- @Override
- public int getObjectClass() {
- return CLASS;
- }
}
/*
-* Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
-*
-* This program and the accompanying materials are made available under the
-* terms of the Eclipse Public License v1.0 which accompanies this distribution,
-* and is available at http://www.eclipse.org/legal/epl-v10.html
-*/
+ * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
package org.opendaylight.protocol.pcep.impl.object;
import org.opendaylight.protocol.pcep.spi.ObjectUtil;
ByteArray.copyWhole(bytes, result, FLAGS_OFFSET + 1);
return ObjectUtil.formatSubobject(TYPE, CLASS, object.isProcessingRule(), object.isIgnore(), result);
}
-
- @Override
- public int getObjectType() {
- return TYPE;
- }
-
- @Override
- public int getObjectClass() {
- return CLASS;
- }
}
final byte[] retBytes = Arrays.copyOf(((Bandwidth) object).getBandwidth().getValue(), BANDWIDTH_LENGTH);
return ObjectUtil.formatSubobject(TYPE, CLASS, object.isProcessingRule(), object.isIgnore(), retBytes);
}
-
- @Override
- public int getObjectType() {
- return TYPE;
- }
-
- @Override
- public int getObjectClass() {
- return CLASS;
- }
}
return ObjectUtil.formatSubobject(TYPE, CLASS, object.isProcessingRule(), object.isIgnore(),
serializeSubobject(ero.getSubobject()));
}
-
- @Override
- public int getObjectType() {
- return TYPE;
- }
-
- @Override
- public int getObjectClass() {
- return CLASS;
- }
}
retBytes[OVER_BOOKING_FACTOR_F_OFFSET] = UnsignedBytes.checkedCast(specObj.getOverBookingFactor());
return ObjectUtil.formatSubobject(TYPE, CLASS, object.isProcessingRule(), object.isIgnore(), retBytes);
}
-
- @Override
- public int getObjectType() {
- return TYPE;
- }
-
- @Override
- public int getObjectClass() {
- return CLASS;
- }
}
}
return ObjectUtil.formatSubobject(TYPE, CLASS, object.isProcessingRule(), object.isIgnore(), serializeSubobject(subs));
}
-
- @Override
- public int getObjectType() {
- return TYPE;
- }
-
- @Override
- public int getObjectClass() {
- return CLASS;
- }
}
ByteArray.copyWhole(specObj.getMinBandwidth().getValue(), retBytes, MIN_BAND_F_OFFSET);
return ObjectUtil.formatSubobject(TYPE, CLASS, object.isProcessingRule(), object.isIgnore(), retBytes);
}
-
- @Override
- public int getObjectType() {
- return TYPE;
- }
-
- @Override
- public int getObjectClass() {
- return CLASS;
- }
}
}
public byte[] serializeTlvs(final Tlvs tlvs) {
- return new byte[0];
- }
-
- @Override
- public int getObjectType() {
- return TYPE;
- }
-
- @Override
- public int getObjectClass() {
- return CLASS;
+ return new byte[0];
}
}
System.arraycopy(mObj.getValue().getValue(), 0, retBytes, METRIC_VALUE_F_OFFSET, METRIC_VALUE_F_LENGTH);
return ObjectUtil.formatSubobject(TYPE, CLASS, object.isProcessingRule(), object.isIgnore(), retBytes);
}
-
- @Override
- public int getObjectType() {
- return TYPE;
- }
-
- @Override
- public int getObjectClass() {
- return CLASS;
- }
}
}
return new byte[0];
}
-
- @Override
- public int getObjectType() {
- return TYPE;
- }
-
- @Override
- public int getObjectClass() {
- return CLASS;
- }
}
}
return new byte[0];
}
-
- @Override
- public int getObjectType() {
- return TYPE;
- }
-
- @Override
- public int getObjectClass() {
- return CLASS;
- }
}
ByteArray.copyWhole(ByteArray.shortToBytes(specObj.getCode().getValue().shortValue()), retBytes, OF_CODE_F_OFFSET);
return ObjectUtil.formatSubobject(TYPE, CLASS, object.isProcessingRule(), object.isIgnore(), retBytes);
}
-
- @Override
- public int getObjectType() {
- return TYPE;
- }
-
- @Override
- public int getObjectClass() {
- return CLASS;
- }
}
}
return result;
}
-
- @Override
- public final int getObjectType() {
- return TYPE;
- }
-
- @Override
- public final int getObjectClass() {
- return CLASS;
- }
}
}
return ObjectUtil.formatSubobject(TYPE, CLASS, object.isProcessingRule(), object.isIgnore(), serializeSubobject(subs));
}
-
- @Override
- public int getObjectType() {
- return TYPE;
- }
-
- @Override
- public int getObjectClass() {
- return CLASS;
- }
}
return ObjectUtil.formatSubobject(TYPE, CLASS, object.isProcessingRule(), object.isIgnore(),
serializeSubobject(obj.getSubobject()));
}
-
- @Override
- public int getObjectType() {
- return TYPE;
- }
-
- @Override
- public int getObjectClass() {
- return CLASS;
- }
}
}
return new byte[0];
}
-
- @Override
- public int getObjectType() {
- return TYPE;
- }
-
- @Override
- public int getObjectClass() {
- return CLASS;
- }
}
assert !(requestIDs.isEmpty()) : "Empty Svec Object - no request ids.";
return ObjectUtil.formatSubobject(TYPE, CLASS, object.isProcessingRule(), object.isIgnore(), retBytes);
}
-
- @Override
- public int getObjectType() {
- return TYPE;
- }
-
- @Override
- public int getObjectClass() {
- return CLASS;
- }
}
return EROSubobjectUtil.formatSubobject(TYPE, subobject.isLoose(), retBytes);
}
-
- @Override
- public int getType() {
- return TYPE;
- }
}
}
return resultBytes;
}
-
- @Override
- public int getType() {
- return TYPE;
- }
}
retBytes[PREFIX4_F_OFFSET] = UnsignedBytes.checkedCast(Ipv4Util.getPrefixLength(prefix));
return EROSubobjectUtil.formatSubobject(TYPE, subobject.isLoose(), retBytes);
}
-
- @Override
- public int getType() {
- return TYPE;
- }
}
retBytes[PREFIX_F_OFFSET] = UnsignedBytes.checkedCast(Ipv4Util.getPrefixLength(prefix));
return EROSubobjectUtil.formatSubobject(TYPE, subobject.isLoose(), retBytes);
}
-
- @Override
- public int getType() {
- return TYPE;
- }
}
}
return EROSubobjectUtil.formatSubobject(TYPE, subobject.isLoose(), labelbytes);
}
-
- @Override
- public int getType() {
- return TYPE;
- }
}
System.arraycopy(pceId, 0, retBytes, PCE_ID_F_OFFSET, pceId.length);
return EROSubobjectUtil.formatSubobject(TYPE, subobject.isLoose(), retBytes);
}
-
- @Override
- public int getType() {
- return TYPE;
- }
}
System.arraycopy(pceId, 0, retBytes, PCE_ID_F_OFFSET, pceId.length);
return EROSubobjectUtil.formatSubobject(TYPE, subobject.isLoose(), retBytes);
}
-
- @Override
- public int getType() {
- return TYPE;
- }
}
INTERFACE_ID_NUMBER_OFFSET, INTERFACE_ID_NUMBER_LENGTH);
return EROSubobjectUtil.formatSubobject(TYPE, subobject.isLoose(), retBytes);
}
-
- @Override
- public int getType() {
- return TYPE;
- }
}
}
return LabelUtil.formatLabel(CTYPE, unidirectional, global, ((GeneralizedLabelCase) subobject).getGeneralizedLabel().getGeneralizedLabel());
}
-
- @Override
- public int getType() {
- return CTYPE;
- }
}
ByteArray.copyWhole(ByteArray.bitSetToBytes(flags, FLAGS_F_LENGTH), retBytes, FLAGS4_F_OFFSET);
return RROSubobjectUtil.formatSubobject(TYPE, retBytes);
}
-
- @Override
- public int getType() {
- return TYPE;
- }
}
ByteArray.copyWhole(ByteArray.bitSetToBytes(flags, FLAGS_F_LENGTH), retBytes, FLAGS_F_OFFSET);
return RROSubobjectUtil.formatSubobject(TYPE, retBytes);
}
-
- @Override
- public int getType() {
- return TYPE;
- }
}
}
return RROSubobjectUtil.formatSubobject(TYPE, labelbytes);
}
-
- @Override
- public int getType() {
- return TYPE;
- }
}
System.arraycopy(pceId, 0, retBytes, PCE_ID_F_OFFSET, pceId.length);
return RROSubobjectUtil.formatSubobject(TYPE, retBytes);
}
-
- @Override
- public int getType() {
- return TYPE;
- }
}
System.arraycopy(pceId, 0, retBytes, PCE_ID_F_OFFSET, pceId.length);
return RROSubobjectUtil.formatSubobject(TYPE, retBytes);
}
-
- @Override
- public int getType() {
- return TYPE;
- }
}
INTERFACE_ID_NUMBER_OFFSET, INTERFACE_ID_NUMBER_LENGTH);
return RROSubobjectUtil.formatSubobject(TYPE, retBytes);
}
-
- @Override
- public int getType() {
- return TYPE;
- }
}
}
return LabelUtil.formatLabel(CTYPE, unidirectional, global, ByteArray.longToBytes(((Type1LabelCase) subobject).getType1Label().getType1Label().longValue(), LABEL_LENGTH));
}
-
- @Override
- public int getType() {
- return CTYPE;
- }
}
END_F_LENGTH);
return LabelUtil.formatLabel(CTYPE, unidirectional, global, retBytes);
}
-
- @Override
- public int getType() {
- return CTYPE;
- }
}
AS_NUMBER_LENGTH);
return XROSubobjectUtil.formatSubobject(TYPE, subobject.isMandatory(), retBytes);
}
-
- @Override
- public int getType() {
- return TYPE;
- }
}
retBytes[ATTRIBUTE4_OFFSET] = UnsignedBytes.checkedCast(subobject.getAttribute().getIntValue());
return XROSubobjectUtil.formatSubobject(TYPE, subobject.isMandatory(), retBytes);
}
-
- @Override
- public int getType() {
- return TYPE;
- }
}
retBytes[ATTRIBUTE6_OFFSET] = UnsignedBytes.checkedCast(subobject.getAttribute().getIntValue());
return XROSubobjectUtil.formatSubobject(TYPE, subobject.isMandatory(), retBytes);
}
-
- @Override
- public int getType() {
- return TYPE;
- }
}
System.arraycopy(pceId, 0, retBytes, PCE_ID_F_OFFSET, pceId.length);
return XROSubobjectUtil.formatSubobject(TYPE, subobject.isMandatory(), retBytes);
}
-
- @Override
- public int getType() {
- return TYPE;
- }
}
System.arraycopy(pceId, 0, retBytes, PCE_ID_F_OFFSET, pceId.length);
return XROSubobjectUtil.formatSubobject(TYPE, subobject.isMandatory(), retBytes);
}
-
- @Override
- public int getType() {
- return TYPE;
- }
}
return XROSubobjectUtil.formatSubobject(TYPE, subobject.isMandatory(), retBytes);
}
-
- @Override
- public int getType() {
- return TYPE;
- }
}
INTERFACE_ID_NUMBER_OFFSET, INTERFACE_ID_NUMBER_LENGTH);
return XROSubobjectUtil.formatSubobject(TYPE, subobject.isMandatory(), retBytes);
}
-
- @Override
- public int getType() {
- return TYPE;
- }
}
protected static final int ENTERPRISE_NUM_LENGTH = 4;
- @Override
- public int getType() {
- return TYPE;
- }
-
@Override
public byte[] serializeTlv(final Tlv tlv) {
if (tlv == null) {
flags.set(PCE_UNAVAILABLE, tlv.getFlags().isPceUnavailable());
return TlvUtil.formatTlv(TYPE, ByteArray.bitSetToBytes(flags, FLAGS_F_LENGTH));
}
-
- @Override
- public int getType() {
- return TYPE;
- }
}
}
return TlvUtil.formatTlv(TYPE, retBytes);
}
-
- @Override
- public int getType() {
- return TYPE;
- }
}
ByteArray.copyWhole(ByteArray.longToBytes(otlv.getSetup(), ORDR_SETUP_LENGTH), bytes, offset);
return TlvUtil.formatTlv(TYPE, bytes);
}
-
- @Override
- public int getType() {
- return TYPE;
- }
}
final OverloadDuration odt = (OverloadDuration) tlv;
return TlvUtil.formatTlv(TYPE, ByteArray.longToBytes(odt.getDuration(), OVERLOADED_DURATION_LENGTH));
}
-
- @Override
- public int getType() {
- return TYPE;
- }
}
final ReqMissing req = (ReqMissing) tlv;
return TlvUtil.formatTlv(TYPE, ByteArray.longToBytes(req.getRequestId().getValue(), REQ_ID_LENGTH));
}
-
- @Override
- public int getType() {
- return TYPE;
- }
}
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.explicit.route.object.ero.Subobject;
public interface EROSubobjectSerializer {
- @Deprecated
- int getType();
byte[] serializeSubobject(Subobject subobject);
}
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev130820.label.subobject.LabelType;
public interface LabelSerializer {
- @Deprecated
- int getType();
+
byte[] serializeLabel(boolean unidirectional, boolean global, LabelType subobject);
}
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.Message;
public interface MessageSerializer {
- @Deprecated
- int getMessageType();
+
void serializeMessage(Message message, ByteBuf buffer);
}
public interface ObjectSerializer {
- @Deprecated
- int getObjectType();
-
- @Deprecated
- int getObjectClass();
-
byte[] serializeObject(Object object);
}
public interface RROSubobjectSerializer {
- @Deprecated
- int getType();
-
byte[] serializeSubobject(Subobject subobject);
}
public interface TlvSerializer {
- @Deprecated
- int getType();
-
byte[] serializeTlv(Tlv tlv);
}
public interface XROSubobjectSerializer {
- @Deprecated
- int getType();
-
byte[] serializeSubobject(Subobject subobject);
}