本文整理汇总了Java中org.projectfloodlight.openflow.protocol.OFStatsRequestFlags类的典型用法代码示例。如果您正苦于以下问题:Java OFStatsRequestFlags类的具体用法?Java OFStatsRequestFlags怎么用?Java OFStatsRequestFlags使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
OFStatsRequestFlags类属于org.projectfloodlight.openflow.protocol包,在下文中一共展示了OFStatsRequestFlags类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: readFrom
import org.projectfloodlight.openflow.protocol.OFStatsRequestFlags; //导入依赖的package包/类
public static Set<OFStatsRequestFlags> readFrom(ChannelBuffer bb) throws OFParseError {
try {
return ofWireValue(bb.readShort());
} catch (IllegalArgumentException e) {
throw new OFParseError(e);
}
}
示例2: toWireValue
import org.projectfloodlight.openflow.protocol.OFStatsRequestFlags; //导入依赖的package包/类
public static short toWireValue(Set<OFStatsRequestFlags> set) {
short wireValue = 0;
for(OFStatsRequestFlags e: set) {
switch(e) {
default:
throw new IllegalArgumentException("Illegal enum value for type OFStatsRequestFlags in version 1.2: " + e);
}
}
return wireValue;
}
示例3: ofWireValue
import org.projectfloodlight.openflow.protocol.OFStatsRequestFlags; //导入依赖的package包/类
public static Set<OFStatsRequestFlags> ofWireValue(short val) {
EnumSet<OFStatsRequestFlags> set = EnumSet.noneOf(OFStatsRequestFlags.class);
if((val & REQ_MORE_VAL) != 0)
set.add(OFStatsRequestFlags.REQ_MORE);
return Collections.unmodifiableSet(set);
}
示例4: toWireValue
import org.projectfloodlight.openflow.protocol.OFStatsRequestFlags; //导入依赖的package包/类
public static short toWireValue(Set<OFStatsRequestFlags> set) {
short wireValue = 0;
for(OFStatsRequestFlags e: set) {
switch(e) {
case REQ_MORE:
wireValue |= REQ_MORE_VAL;
break;
default:
throw new IllegalArgumentException("Illegal enum value for type OFStatsRequestFlags in version 1.3: " + e);
}
}
return wireValue;
}
示例5: toWireValue
import org.projectfloodlight.openflow.protocol.OFStatsRequestFlags; //导入依赖的package包/类
public static short toWireValue(Set<OFStatsRequestFlags> set) {
short wireValue = 0;
for(OFStatsRequestFlags e: set) {
switch(e) {
default:
throw new IllegalArgumentException("Illegal enum value for type OFStatsRequestFlags in version 1.0: " + e);
}
}
return wireValue;
}
示例6: toWireValue
import org.projectfloodlight.openflow.protocol.OFStatsRequestFlags; //导入依赖的package包/类
public static short toWireValue(Set<OFStatsRequestFlags> set) {
short wireValue = 0;
for(OFStatsRequestFlags e: set) {
switch(e) {
default:
throw new IllegalArgumentException("Illegal enum value for type OFStatsRequestFlags in version 1.1: " + e);
}
}
return wireValue;
}
示例7: toWireValue
import org.projectfloodlight.openflow.protocol.OFStatsRequestFlags; //导入依赖的package包/类
public static short toWireValue(Set<OFStatsRequestFlags> set) {
short wireValue = 0;
for(OFStatsRequestFlags e: set) {
switch(e) {
case REQ_MORE:
wireValue |= REQ_MORE_VAL;
break;
default:
throw new IllegalArgumentException("Illegal enum value for type OFStatsRequestFlags in version 1.4: " + e);
}
}
return wireValue;
}
示例8: readFrom
import org.projectfloodlight.openflow.protocol.OFStatsRequestFlags; //导入依赖的package包/类
public static Set<OFStatsRequestFlags> readFrom(ByteBuf bb) throws OFParseError {
try {
return ofWireValue(bb.readShort());
} catch (IllegalArgumentException e) {
throw new OFParseError(e);
}
}
示例9: toWireValue
import org.projectfloodlight.openflow.protocol.OFStatsRequestFlags; //导入依赖的package包/类
public static short toWireValue(Set<OFStatsRequestFlags> set) {
short wireValue = 0;
for(OFStatsRequestFlags e: set) {
switch(e) {
case REQ_MORE:
wireValue |= REQ_MORE_VAL;
break;
default:
throw new IllegalArgumentException("Illegal enum value for type OFStatsRequestFlags in version 1.5: " + e);
}
}
return wireValue;
}
示例10: sendPortDescRequest
import org.projectfloodlight.openflow.protocol.OFStatsRequestFlags; //导入依赖的package包/类
protected void sendPortDescRequest() {
mainConnection.write(factory.portDescStatsRequest(ImmutableSet.<OFStatsRequestFlags>of()));
}
示例11: writeTo
import org.projectfloodlight.openflow.protocol.OFStatsRequestFlags; //导入依赖的package包/类
public static void writeTo(ChannelBuffer bb, Set<OFStatsRequestFlags> set) {
bb.writeShort(toWireValue(set));
}
示例12: putTo
import org.projectfloodlight.openflow.protocol.OFStatsRequestFlags; //导入依赖的package包/类
public static void putTo(Set<OFStatsRequestFlags> set, PrimitiveSink sink) {
sink.putShort(toWireValue(set));
}