本文整理汇总了Java中org.onosproject.pcepio.protocol.PcepInterLayerObject类的典型用法代码示例。如果您正苦于以下问题:Java PcepInterLayerObject类的具体用法?Java PcepInterLayerObject怎么用?Java PcepInterLayerObject使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PcepInterLayerObject类属于org.onosproject.pcepio.protocol包,在下文中一共展示了PcepInterLayerObject类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: read
import org.onosproject.pcepio.protocol.PcepInterLayerObject; //导入依赖的package包/类
/**
* Reads channel buffer and returns object of PcepInterLayerObject.
*
* @param cb of type channel buffer
* @return object of PcepInterLayerObject
* @throws PcepParseException when fails to read from channel buffer
*/
public static PcepInterLayerObject read(ChannelBuffer cb) throws PcepParseException {
PcepObjectHeader interLayerObjHeader;
boolean bNFlag;
boolean bIFlag;
interLayerObjHeader = PcepObjectHeader.read(cb);
//take only InterLayerObject buffer.
ChannelBuffer tempCb = cb.readBytes(interLayerObjHeader.getObjLen() - OBJECT_HEADER_LENGTH);
int iTemp = tempCb.readInt();
bIFlag = ((iTemp & (byte) IFLAG_SHIFT_VALUE) == IFLAG_SHIFT_VALUE);
bNFlag = ((iTemp & (byte) NFLAG_SHIFT_VALUE) == NFLAG_SHIFT_VALUE);
return new PcepInterLayerObjectVer1(interLayerObjHeader, bNFlag, bIFlag);
}
示例2: build
import org.onosproject.pcepio.protocol.PcepInterLayerObject; //导入依赖的package包/类
@Override
public PcepInterLayerObject build() {
PcepObjectHeader interLayerObjHeader = this.bIsHeaderSet ? this.interLayerObjHeader
: DEFAULT_INTER_LAYER_OBJECT_HEADER;
boolean bNFlag = this.bIsNFlagset ? this.bNFlag : DEFAULT_NFLAG;
boolean bIFlag = this.bIsIFlagset ? this.bIFlag : DEFAULT_IFLAG;
if (bIsPFlagSet) {
interLayerObjHeader.setPFlag(bPFalg);
}
if (bIsIFlagSet) {
interLayerObjHeader.setIFlag(iFlag);
}
return new PcepInterLayerObjectVer1(interLayerObjHeader, bNFlag, bIFlag);
}