Preconditions.checkArgument(pk.getPathKey() != null, "PathKey is mandatory.");
writeUnsignedShort(pk.getPathKey().getValue(), body);
Preconditions.checkArgument(pk.getPceId() != null, "PceId is mandatory.");
- body.writeBytes(pk.getPceId().getBinary());
+ body.writeBytes(pk.getPceId().getValue());
RROSubobjectUtil.formatSubobject(TYPE, body, buffer);
}
}
.subobject.type.path.key._case.PathKey pk = pkcase.getPathKey();
final ByteBuf body = Unpooled.buffer();
Preconditions.checkArgument(pk.getPceId() != null, "PceId is mandatory.");
- if(pk.getPceId().getBinary().length == RROPathKey128SubobjectParser.PCE128_ID_F_LENGTH) {
+
+ final byte[] pceId = pk.getPceId().getValue();
+ if (pceId.length == RROPathKey128SubobjectParser.PCE128_ID_F_LENGTH) {
RROPathKey128SubobjectParser.serializeSubobject(subobject,buffer);
}
Preconditions.checkArgument(pk.getPathKey() != null, "PathKey is mandatory.");
writeUnsignedShort(pk.getPathKey().getValue(), body);
- Preconditions.checkArgument(pk.getPceId().getBinary().length == PCE_ID_F_LENGTH, "PceId 32 Bit required.");
- body.writeBytes(pk.getPceId().getBinary());
+ Preconditions.checkArgument(pceId.length == PCE_ID_F_LENGTH, "PceId 32 Bit required.");
+ body.writeBytes(pceId);
RROSubobjectUtil.formatSubobject(TYPE, body, buffer);
}
}
Preconditions.checkArgument(pk.getPathKey() != null, "PathKey is mandatory.");
writeUnsignedShort(pk.getPathKey().getValue(), body);
Preconditions.checkArgument(pk.getPceId() != null, "PceId is mandatory.");
- body.writeBytes(pk.getPceId().getBinary());
+ body.writeBytes(pk.getPceId().getValue());
XROSubobjectUtil.formatSubobject(TYPE, subobject.isMandatory(), body, buffer);
}
}
.subobjects.subobject.type.path.key._case.PathKey pk = ((PathKeyCase) subobject.getSubobjectType()).getPathKey();
final ByteBuf body = Unpooled.buffer();
Preconditions.checkArgument(pk.getPceId() != null, "PceId is mandatory.");
- if(pk.getPceId().getBinary().length == XROPathKey128SubobjectParser.PCE128_ID_F_LENGTH) {
+
+ final byte[] pceId = pk.getPceId().getValue();
+ if (pceId.length == XROPathKey128SubobjectParser.PCE128_ID_F_LENGTH) {
XROPathKey128SubobjectParser.serializeSubobject(subobject,buffer);
}
Preconditions.checkArgument(pk.getPathKey() != null, "PathKey is mandatory.");
writeUnsignedShort(pk.getPathKey().getValue(), body);
- Preconditions.checkArgument(pk.getPceId().getBinary().length == PCE_ID_F_LENGTH, "PceId 32 Bit required.");
- body.writeBytes(pk.getPceId().getBinary());
+ Preconditions.checkArgument(pceId.length == PCE_ID_F_LENGTH, "PceId 32 Bit required.");
+ body.writeBytes(pceId);
XROSubobjectUtil.formatSubobject(TYPE, subobject.isMandatory(), body, buffer);
}
}
.subobjects.subobject.type.path.key._case.PathKey pk = ((PathKeyCase) subobject.getSubobjectType()).getPathKey();
Preconditions.checkArgument(pk.getPceId() != null, "PceId is mandatory.");
Preconditions.checkArgument(pk.getPathKey() != null, "PathKey is mandatory.");
- final byte[] pceID = pk.getPceId().getBinary();
+ final byte[] pceID = pk.getPceId().getValue();
Preconditions.checkArgument(pceID.length == PCE_ID_F_LENGTH || pceID.length == PCE128_ID_F_LENGTH, "PceId 32/128 Bit required.");
final ByteBuf body = Unpooled.buffer();
writeUnsignedShort(pk.getPathKey().getValue(), body);
}
typedef pce-id {
- type union {
- type binary {
- length 4;
- }
- type binary {
- length 16;
- }
+ type binary {
+ length 4|16;
}
}
.subobjects.subobject.type.path.key._case.PathKey pk = ((PathKeyCase) subobject.getSubobjectType())
.getPathKey();
final ByteBuf body = serializePathKey(pk);
- if (pk.getPceId().getBinary().length == PCE_ID_F_LENGTH) {
+ if (pk.getPceId().getValue().length == PCE_ID_F_LENGTH) {
EROSubobjectUtil.formatSubobject(TYPE, subobject.isLoose(), body, buffer);
- } else if (pk.getPceId().getBinary().length == EROPathKey128SubobjectParser.PCE128_ID_F_LENGTH) {
+ } else if (pk.getPceId().getValue().length == EROPathKey128SubobjectParser.PCE128_ID_F_LENGTH) {
EROSubobjectUtil.formatSubobject(EROPathKey128SubobjectParser.TYPE, subobject.isLoose(), body, buffer);
}
}
Preconditions.checkArgument(pk.getPathKey() != null, "PathKey is mandatory.");
writeUnsignedShort(pk.getPathKey().getValue(), body);
Preconditions.checkArgument(pk.getPceId() != null, "PceId is mandatory.");
- body.writeBytes(pk.getPceId().getBinary());
+ body.writeBytes(pk.getPceId().getValue());
RROSubobjectUtil.formatSubobject(TYPE, body, buffer);
}
.subobject.type.path.key._case.PathKey pk = pkcase.getPathKey();
final ByteBuf body = Unpooled.buffer();
Preconditions.checkArgument(pk.getPceId() != null, "PceId is mandatory.");
- if (pk.getPceId().getBinary().length == RROPathKey128SubobjectParser.PCE128_ID_F_LENGTH) {
+
+ final byte[] pceId = pk.getPceId().getValue();
+ if (pceId.length == RROPathKey128SubobjectParser.PCE128_ID_F_LENGTH) {
RROPathKey128SubobjectParser.serializeSubobject(subobject, buffer);
}
Preconditions.checkArgument(pk.getPathKey() != null, "PathKey is mandatory.");
- Preconditions.checkArgument(pk.getPceId().getBinary().length == PCE_ID_F_LENGTH,
- "PathKey 32Bit is mandatory.");
+ Preconditions.checkArgument(pceId.length == PCE_ID_F_LENGTH, "PathKey 32Bit is mandatory.");
writeUnsignedShort(pk.getPathKey().getValue(), body);
- body.writeBytes(pk.getPceId().getBinary());
+ body.writeBytes(pceId);
RROSubobjectUtil.formatSubobject(TYPE, body, buffer);
}
}
.subobjects.subobject.type.path.key._case.PathKey pk = ((PathKeyCase) subobject.getSubobjectType())
.getPathKey();
final ByteBuf body = serializePathKey(pk);
- if (pk.getPceId().getBinary().length == PCE_ID_F_LENGTH) {
+ final byte[] pceId = pk.getPceId().getValue();
+ if (pceId.length == PCE_ID_F_LENGTH) {
XROSubobjectUtil.formatSubobject(TYPE, subobject.isMandatory(), body, buffer);
- } else if (pk.getPceId().getBinary().length == XROPathKey128SubobjectParser.PCE128_ID_F_LENGTH) {
+ } else if (pceId.length == XROPathKey128SubobjectParser.PCE128_ID_F_LENGTH) {
XROSubobjectUtil.formatSubobject(XROPathKey128SubobjectParser.TYPE, subobject.isMandatory(), body, buffer);
}
}
Preconditions.checkArgument(pk.getPathKey() != null, "PathKey is mandatory.");
writeUnsignedShort(pk.getPathKey().getValue(), body);
Preconditions.checkArgument(pk.getPceId() != null, "PceId is mandatory.");
- body.writeBytes(pk.getPceId().getBinary());
+ body.writeBytes(pk.getPceId().getValue());
return body;
}
}