本文整理汇总了Java中org.projectfloodlight.openflow.protocol.OFTableFeaturePropType类的典型用法代码示例。如果您正苦于以下问题:Java OFTableFeaturePropType类的具体用法?Java OFTableFeaturePropType怎么用?Java OFTableFeaturePropType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
OFTableFeaturePropType类属于org.projectfloodlight.openflow.protocol包,在下文中一共展示了OFTableFeaturePropType类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getTableFeaturePropType
import org.projectfloodlight.openflow.protocol.OFTableFeaturePropType; //导入依赖的package包/类
private static OFTableFeaturePropType getTableFeaturePropType(OFTableFeatureProp p) {
switch (p.getVersion()) {
case OF_13:
return OFTableFeaturePropTypeSerializerVer13.ofWireValue((short) p.getType());
case OF_14:
return OFTableFeaturePropTypeSerializerVer14.ofWireValue((short) p.getType());
default:
throw new IllegalArgumentException("OFVersion " + p.getVersion().toString() + " does not support OFTableFeature messages.");
}
}
示例2: readFrom
import org.projectfloodlight.openflow.protocol.OFTableFeaturePropType; //导入依赖的package包/类
public static OFTableFeaturePropType readFrom(ChannelBuffer bb) throws OFParseError {
try {
return ofWireValue(bb.readShort());
} catch (IllegalArgumentException e) {
throw new OFParseError(e);
}
}
示例3: ofWireValue
import org.projectfloodlight.openflow.protocol.OFTableFeaturePropType; //导入依赖的package包/类
public static OFTableFeaturePropType ofWireValue(short val) {
switch(val) {
case INSTRUCTIONS_VAL:
return OFTableFeaturePropType.INSTRUCTIONS;
case INSTRUCTIONS_MISS_VAL:
return OFTableFeaturePropType.INSTRUCTIONS_MISS;
case NEXT_TABLES_VAL:
return OFTableFeaturePropType.NEXT_TABLES;
case NEXT_TABLES_MISS_VAL:
return OFTableFeaturePropType.NEXT_TABLES_MISS;
case WRITE_ACTIONS_VAL:
return OFTableFeaturePropType.WRITE_ACTIONS;
case WRITE_ACTIONS_MISS_VAL:
return OFTableFeaturePropType.WRITE_ACTIONS_MISS;
case APPLY_ACTIONS_VAL:
return OFTableFeaturePropType.APPLY_ACTIONS;
case APPLY_ACTIONS_MISS_VAL:
return OFTableFeaturePropType.APPLY_ACTIONS_MISS;
case MATCH_VAL:
return OFTableFeaturePropType.MATCH;
case WILDCARDS_VAL:
return OFTableFeaturePropType.WILDCARDS;
case WRITE_SETFIELD_VAL:
return OFTableFeaturePropType.WRITE_SETFIELD;
case WRITE_SETFIELD_MISS_VAL:
return OFTableFeaturePropType.WRITE_SETFIELD_MISS;
case APPLY_SETFIELD_VAL:
return OFTableFeaturePropType.APPLY_SETFIELD;
case APPLY_SETFIELD_MISS_VAL:
return OFTableFeaturePropType.APPLY_SETFIELD_MISS;
case EXPERIMENTER_VAL:
return OFTableFeaturePropType.EXPERIMENTER;
case EXPERIMENTER_MISS_VAL:
return OFTableFeaturePropType.EXPERIMENTER_MISS;
default:
throw new IllegalArgumentException("Illegal wire value for type OFTableFeaturePropType in version 1.3: " + val);
}
}
示例4: toWireValue
import org.projectfloodlight.openflow.protocol.OFTableFeaturePropType; //导入依赖的package包/类
public static short toWireValue(OFTableFeaturePropType e) {
switch(e) {
case INSTRUCTIONS:
return INSTRUCTIONS_VAL;
case INSTRUCTIONS_MISS:
return INSTRUCTIONS_MISS_VAL;
case NEXT_TABLES:
return NEXT_TABLES_VAL;
case NEXT_TABLES_MISS:
return NEXT_TABLES_MISS_VAL;
case WRITE_ACTIONS:
return WRITE_ACTIONS_VAL;
case WRITE_ACTIONS_MISS:
return WRITE_ACTIONS_MISS_VAL;
case APPLY_ACTIONS:
return APPLY_ACTIONS_VAL;
case APPLY_ACTIONS_MISS:
return APPLY_ACTIONS_MISS_VAL;
case MATCH:
return MATCH_VAL;
case WILDCARDS:
return WILDCARDS_VAL;
case WRITE_SETFIELD:
return WRITE_SETFIELD_VAL;
case WRITE_SETFIELD_MISS:
return WRITE_SETFIELD_MISS_VAL;
case APPLY_SETFIELD:
return APPLY_SETFIELD_VAL;
case APPLY_SETFIELD_MISS:
return APPLY_SETFIELD_MISS_VAL;
case EXPERIMENTER:
return EXPERIMENTER_VAL;
case EXPERIMENTER_MISS:
return EXPERIMENTER_MISS_VAL;
default:
throw new IllegalArgumentException("Illegal enum value for type OFTableFeaturePropType in version 1.3: " + e);
}
}
示例5: ofWireValue
import org.projectfloodlight.openflow.protocol.OFTableFeaturePropType; //导入依赖的package包/类
public static OFTableFeaturePropType ofWireValue(short val) {
switch(val) {
case INSTRUCTIONS_VAL:
return OFTableFeaturePropType.INSTRUCTIONS;
case INSTRUCTIONS_MISS_VAL:
return OFTableFeaturePropType.INSTRUCTIONS_MISS;
case NEXT_TABLES_VAL:
return OFTableFeaturePropType.NEXT_TABLES;
case NEXT_TABLES_MISS_VAL:
return OFTableFeaturePropType.NEXT_TABLES_MISS;
case WRITE_ACTIONS_VAL:
return OFTableFeaturePropType.WRITE_ACTIONS;
case WRITE_ACTIONS_MISS_VAL:
return OFTableFeaturePropType.WRITE_ACTIONS_MISS;
case APPLY_ACTIONS_VAL:
return OFTableFeaturePropType.APPLY_ACTIONS;
case APPLY_ACTIONS_MISS_VAL:
return OFTableFeaturePropType.APPLY_ACTIONS_MISS;
case MATCH_VAL:
return OFTableFeaturePropType.MATCH;
case WILDCARDS_VAL:
return OFTableFeaturePropType.WILDCARDS;
case WRITE_SETFIELD_VAL:
return OFTableFeaturePropType.WRITE_SETFIELD;
case WRITE_SETFIELD_MISS_VAL:
return OFTableFeaturePropType.WRITE_SETFIELD_MISS;
case APPLY_SETFIELD_VAL:
return OFTableFeaturePropType.APPLY_SETFIELD;
case APPLY_SETFIELD_MISS_VAL:
return OFTableFeaturePropType.APPLY_SETFIELD_MISS;
case TABLE_SYNC_FROM_VAL:
return OFTableFeaturePropType.TABLE_SYNC_FROM;
case EXPERIMENTER_VAL:
return OFTableFeaturePropType.EXPERIMENTER;
case EXPERIMENTER_MISS_VAL:
return OFTableFeaturePropType.EXPERIMENTER_MISS;
default:
throw new IllegalArgumentException("Illegal wire value for type OFTableFeaturePropType in version 1.4: " + val);
}
}
示例6: toWireValue
import org.projectfloodlight.openflow.protocol.OFTableFeaturePropType; //导入依赖的package包/类
public static short toWireValue(OFTableFeaturePropType e) {
switch(e) {
case INSTRUCTIONS:
return INSTRUCTIONS_VAL;
case INSTRUCTIONS_MISS:
return INSTRUCTIONS_MISS_VAL;
case NEXT_TABLES:
return NEXT_TABLES_VAL;
case NEXT_TABLES_MISS:
return NEXT_TABLES_MISS_VAL;
case WRITE_ACTIONS:
return WRITE_ACTIONS_VAL;
case WRITE_ACTIONS_MISS:
return WRITE_ACTIONS_MISS_VAL;
case APPLY_ACTIONS:
return APPLY_ACTIONS_VAL;
case APPLY_ACTIONS_MISS:
return APPLY_ACTIONS_MISS_VAL;
case MATCH:
return MATCH_VAL;
case WILDCARDS:
return WILDCARDS_VAL;
case WRITE_SETFIELD:
return WRITE_SETFIELD_VAL;
case WRITE_SETFIELD_MISS:
return WRITE_SETFIELD_MISS_VAL;
case APPLY_SETFIELD:
return APPLY_SETFIELD_VAL;
case APPLY_SETFIELD_MISS:
return APPLY_SETFIELD_MISS_VAL;
case TABLE_SYNC_FROM:
return TABLE_SYNC_FROM_VAL;
case EXPERIMENTER:
return EXPERIMENTER_VAL;
case EXPERIMENTER_MISS:
return EXPERIMENTER_MISS_VAL;
default:
throw new IllegalArgumentException("Illegal enum value for type OFTableFeaturePropType in version 1.4: " + e);
}
}
示例7: readFrom
import org.projectfloodlight.openflow.protocol.OFTableFeaturePropType; //导入依赖的package包/类
public static OFTableFeaturePropType readFrom(ByteBuf bb) throws OFParseError {
try {
return ofWireValue(bb.readShort());
} catch (IllegalArgumentException e) {
throw new OFParseError(e);
}
}
示例8: TableFeatures
import org.projectfloodlight.openflow.protocol.OFTableFeaturePropType; //导入依赖的package包/类
private TableFeatures(OFTableFeatures tf) {
/*
* First, get the properties.
*/
List<OFTableFeatureProp> properties = tf.getProperties();
for (OFTableFeatureProp p : properties) {
OFTableFeaturePropType pt = getTableFeaturePropType(p);
switch (pt) {
case APPLY_ACTIONS:
aa = (OFTableFeaturePropApplyActions) p;
break;
case APPLY_ACTIONS_MISS:
aam = (OFTableFeaturePropApplyActionsMiss) p;
break;
case APPLY_SETFIELD:
asf = (OFTableFeaturePropApplySetfield) p;
break;
case APPLY_SETFIELD_MISS:
asfm = (OFTableFeaturePropApplySetfieldMiss) p;
break;
case EXPERIMENTER:
e = (OFTableFeaturePropExperimenter) p;
break;
case EXPERIMENTER_MISS:
em = (OFTableFeaturePropExperimenterMiss) p;
break;
case INSTRUCTIONS:
i = (OFTableFeaturePropInstructions) p;
break;
case INSTRUCTIONS_MISS:
im = (OFTableFeaturePropInstructionsMiss) p;
break;
case MATCH:
m = (OFTableFeaturePropMatch) p;
break;
case NEXT_TABLES:
nt = (OFTableFeaturePropNextTables) p;
break;
case NEXT_TABLES_MISS:
ntm = (OFTableFeaturePropNextTablesMiss) p;
break;
case TABLE_SYNC_FROM:
tsf = (OFTableFeaturePropTableSyncFrom) p;
break;
case WILDCARDS:
w = (OFTableFeaturePropWildcards) p;
break;
case WRITE_ACTIONS:
wa = (OFTableFeaturePropWriteActions) p;
break;
case WRITE_ACTIONS_MISS:
wam = (OFTableFeaturePropWriteActionsMiss) p;
break;
case WRITE_SETFIELD:
wsf = (OFTableFeaturePropWriteSetfield) p;
break;
case WRITE_SETFIELD_MISS:
wsfm = (OFTableFeaturePropWriteSetfieldMiss) p;
break;
default:
throw new UnsupportedOperationException("OFTableFeaturePropType " + pt.toString() + " not accounted for in " + this.getClass().getCanonicalName());
}
}
/*
* Next, get the other info e.g. name, ID, etc.
*/
config = tf.getConfig();
maxEntries = tf.getMaxEntries();
metadataMatch = tf.getMetadataMatch();
metadataWrite = tf.getMetadataWrite();
tableId = tf.getTableId();
tableName = tf.getName();
}
示例9: TableFeatures
import org.projectfloodlight.openflow.protocol.OFTableFeaturePropType; //导入依赖的package包/类
private TableFeatures(OFTableFeatures tf) {
/*
* First, get the properties.
*/
List<OFTableFeatureProp> properties = tf.getProperties();
for (OFTableFeatureProp p : properties) {
OFTableFeaturePropType pt = getTableFeaturePropType(p);
switch (pt) {
case APPLY_ACTIONS:
aa = (OFTableFeaturePropApplyActions) p;
break;
case APPLY_ACTIONS_MISS:
aam = (OFTableFeaturePropApplyActionsMiss) p;
break;
case APPLY_SETFIELD:
asf = (OFTableFeaturePropApplySetfield) p;
break;
case APPLY_SETFIELD_MISS:
asfm = (OFTableFeaturePropApplySetfieldMiss) p;
break;
case EXPERIMENTER:
e = (OFTableFeaturePropExperimenter) p;
break;
case EXPERIMENTER_MISS:
em = (OFTableFeaturePropExperimenterMiss) p;
break;
case INSTRUCTIONS:
i = (OFTableFeaturePropInstructions) p;
break;
case INSTRUCTIONS_MISS:
im = (OFTableFeaturePropInstructionsMiss) p;
break;
case MATCH:
m = (OFTableFeaturePropMatch) p;
break;
case NEXT_TABLES:
nt = (OFTableFeaturePropNextTables) p;
break;
case NEXT_TABLES_MISS:
ntm = (OFTableFeaturePropNextTablesMiss) p;
break;
case TABLE_SYNC_FROM:
tsf = (OFTableFeaturePropTableSyncFrom) p;
break;
case WILDCARDS:
w = (OFTableFeaturePropWildcards) p;
break;
case WRITE_ACTIONS:
wa = (OFTableFeaturePropWriteActions) p;
break;
case WRITE_ACTIONS_MISS:
wam = (OFTableFeaturePropWriteActionsMiss) p;
break;
case WRITE_SETFIELD:
wsf = (OFTableFeaturePropWriteSetfield) p;
break;
case WRITE_SETFIELD_MISS:
wsfm = (OFTableFeaturePropWriteSetfieldMiss) p;
break;
default:
throw new UnsupportedOperationException("OFTableFeaturePropType " + pt.toString() + " not accounted for in " + this.getClass().getCanonicalName());
}
}
/*
* Next, get the other info e.g. name, ID, etc.
*/
config = tf.getConfig();
maxEntries = tf.getMaxEntries();
metadataMatch = tf.getMetadataMatch();
metadataWrite = tf.getMetadataWrite();
tableId = tf.getTableId();
tableName = tf.getName();
}
示例10: writeTo
import org.projectfloodlight.openflow.protocol.OFTableFeaturePropType; //导入依赖的package包/类
public static void writeTo(ChannelBuffer bb, OFTableFeaturePropType e) {
bb.writeShort(toWireValue(e));
}
示例11: putTo
import org.projectfloodlight.openflow.protocol.OFTableFeaturePropType; //导入依赖的package包/类
public static void putTo(OFTableFeaturePropType e, PrimitiveSink sink) {
sink.putShort(toWireValue(e));
}
示例12: writeTo
import org.projectfloodlight.openflow.protocol.OFTableFeaturePropType; //导入依赖的package包/类
public static void writeTo(ByteBuf bb, OFTableFeaturePropType e) {
bb.writeShort(toWireValue(e));
}
示例13: ofWireValue
import org.projectfloodlight.openflow.protocol.OFTableFeaturePropType; //导入依赖的package包/类
public static OFTableFeaturePropType ofWireValue(short val) {
switch(val) {
case INSTRUCTIONS_VAL:
return OFTableFeaturePropType.INSTRUCTIONS;
case INSTRUCTIONS_MISS_VAL:
return OFTableFeaturePropType.INSTRUCTIONS_MISS;
case NEXT_TABLES_VAL:
return OFTableFeaturePropType.NEXT_TABLES;
case NEXT_TABLES_MISS_VAL:
return OFTableFeaturePropType.NEXT_TABLES_MISS;
case WRITE_ACTIONS_VAL:
return OFTableFeaturePropType.WRITE_ACTIONS;
case WRITE_ACTIONS_MISS_VAL:
return OFTableFeaturePropType.WRITE_ACTIONS_MISS;
case APPLY_ACTIONS_VAL:
return OFTableFeaturePropType.APPLY_ACTIONS;
case APPLY_ACTIONS_MISS_VAL:
return OFTableFeaturePropType.APPLY_ACTIONS_MISS;
case MATCH_VAL:
return OFTableFeaturePropType.MATCH;
case WILDCARDS_VAL:
return OFTableFeaturePropType.WILDCARDS;
case WRITE_SETFIELD_VAL:
return OFTableFeaturePropType.WRITE_SETFIELD;
case WRITE_SETFIELD_MISS_VAL:
return OFTableFeaturePropType.WRITE_SETFIELD_MISS;
case APPLY_SETFIELD_VAL:
return OFTableFeaturePropType.APPLY_SETFIELD;
case APPLY_SETFIELD_MISS_VAL:
return OFTableFeaturePropType.APPLY_SETFIELD_MISS;
case TABLE_SYNC_FROM_VAL:
return OFTableFeaturePropType.TABLE_SYNC_FROM;
case WRITE_COPYFIELD_VAL:
return OFTableFeaturePropType.WRITE_COPYFIELD;
case WRITE_COPYFIELD_MISS_VAL:
return OFTableFeaturePropType.WRITE_COPYFIELD_MISS;
case APPLY_COPYFIELD_VAL:
return OFTableFeaturePropType.APPLY_COPYFIELD;
case APPLY_COPYFIELD_MISS_VAL:
return OFTableFeaturePropType.APPLY_COPYFIELD_MISS;
case PACKET_TYPES_VAL:
return OFTableFeaturePropType.PACKET_TYPES;
case EXPERIMENTER_VAL:
return OFTableFeaturePropType.EXPERIMENTER;
case EXPERIMENTER_MISS_VAL:
return OFTableFeaturePropType.EXPERIMENTER_MISS;
default:
throw new IllegalArgumentException("Illegal wire value for type OFTableFeaturePropType in version 1.5: " + val);
}
}
示例14: toWireValue
import org.projectfloodlight.openflow.protocol.OFTableFeaturePropType; //导入依赖的package包/类
public static short toWireValue(OFTableFeaturePropType e) {
switch(e) {
case INSTRUCTIONS:
return INSTRUCTIONS_VAL;
case INSTRUCTIONS_MISS:
return INSTRUCTIONS_MISS_VAL;
case NEXT_TABLES:
return NEXT_TABLES_VAL;
case NEXT_TABLES_MISS:
return NEXT_TABLES_MISS_VAL;
case WRITE_ACTIONS:
return WRITE_ACTIONS_VAL;
case WRITE_ACTIONS_MISS:
return WRITE_ACTIONS_MISS_VAL;
case APPLY_ACTIONS:
return APPLY_ACTIONS_VAL;
case APPLY_ACTIONS_MISS:
return APPLY_ACTIONS_MISS_VAL;
case MATCH:
return MATCH_VAL;
case WILDCARDS:
return WILDCARDS_VAL;
case WRITE_SETFIELD:
return WRITE_SETFIELD_VAL;
case WRITE_SETFIELD_MISS:
return WRITE_SETFIELD_MISS_VAL;
case APPLY_SETFIELD:
return APPLY_SETFIELD_VAL;
case APPLY_SETFIELD_MISS:
return APPLY_SETFIELD_MISS_VAL;
case TABLE_SYNC_FROM:
return TABLE_SYNC_FROM_VAL;
case WRITE_COPYFIELD:
return WRITE_COPYFIELD_VAL;
case WRITE_COPYFIELD_MISS:
return WRITE_COPYFIELD_MISS_VAL;
case APPLY_COPYFIELD:
return APPLY_COPYFIELD_VAL;
case APPLY_COPYFIELD_MISS:
return APPLY_COPYFIELD_MISS_VAL;
case PACKET_TYPES:
return PACKET_TYPES_VAL;
case EXPERIMENTER:
return EXPERIMENTER_VAL;
case EXPERIMENTER_MISS:
return EXPERIMENTER_MISS_VAL;
default:
throw new IllegalArgumentException("Illegal enum value for type OFTableFeaturePropType in version 1.5: " + e);
}
}