本文整理汇总了Java中org.projectfloodlight.openflow.types.U16类的典型用法代码示例。如果您正苦于以下问题:Java U16类的具体用法?Java U16怎么用?Java U16使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
U16类属于org.projectfloodlight.openflow.types包,在下文中一共展示了U16类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createFRESCOFlowMod
import org.projectfloodlight.openflow.types.U16; //导入依赖的package包/类
private OFFlowMod createFRESCOFlowMod(IOFSwitch sw, Match match, List<OFAction> actions, int priority){
OFFlowMod.Builder fmb = sw.getOFFactory().buildFlowAdd();;
fmb.setIdleTimeout(FlowModUtils.INFINITE_TIMEOUT);
fmb.setHardTimeout(FlowModUtils.INFINITE_TIMEOUT);
fmb.setBufferId(OFBufferId.NO_BUFFER);
fmb.setOutPort(OFPort.ANY);
fmb.setCookie(U64.of(0));
fmb.setPriority(U16.t(priority));
fmb.setMatch(match);
fmb.setActions(actions);
return fmb.build();
}
示例2: mapSelector
import org.projectfloodlight.openflow.types.U16; //导入依赖的package包/类
@Override
public OFOxm<?> mapSelector(OFFactory factory, ExtensionSelector extensionSelector) {
ExtensionSelectorType type = extensionSelector.type();
if (type.equals(ExtensionSelectorType.ExtensionSelectorTypes.NICIRA_MATCH_NSH_SPI.type())) {
NiciraMatchNshSpi niciraNshSpi = (NiciraMatchNshSpi) extensionSelector;
return factory.oxms().nsp(U32.of(niciraNshSpi.nshSpi().servicePathId()));
}
if (type.equals(ExtensionSelectorType.ExtensionSelectorTypes.NICIRA_MATCH_NSH_SI.type())) {
NiciraMatchNshSi niciraNshSi = (NiciraMatchNshSi) extensionSelector;
return factory.oxms().nsi(U8.of(niciraNshSi.nshSi().serviceIndex()));
}
if (type.equals(ExtensionSelectorType.ExtensionSelectorTypes.NICIRA_MATCH_ENCAP_ETH_TYPE.type())) {
NiciraMatchEncapEthType niciraEncapEthType = (NiciraMatchEncapEthType) extensionSelector;
return factory.oxms().encapEthType(U16.of(niciraEncapEthType.encapEthType()));
}
if (type.equals(ExtensionSelectorType.ExtensionSelectorTypes.NICIRA_MATCH_NSH_CH1.type())) {
// TODO
}
if (type.equals(ExtensionSelectorType.ExtensionSelectorTypes.NICIRA_MATCH_NSH_CH2.type())) {
// TODO
}
if (type.equals(ExtensionSelectorType.ExtensionSelectorTypes.NICIRA_MATCH_NSH_CH3.type())) {
// TODO
}
if (type.equals(ExtensionSelectorType.ExtensionSelectorTypes.NICIRA_MATCH_NSH_CH4.type())) {
// TODO
}
return null;
}
示例3: compare
import org.projectfloodlight.openflow.types.U16; //导入依赖的package包/类
@Override
public int compare(String o1, String o2) {
OFFlowMod f1 = entriesFromStorage.get(dpid).get(o1);
OFFlowMod f2 = entriesFromStorage.get(dpid).get(o2);
if (f1 == null || f2 == null) // sort active=false flows by key
return o1.compareTo(o2);
return U16.of(f1.getPriority()).getValue() - U16.of(f2.getPriority()).getValue();
}
示例4: createL2DCOFloodOverUnicastTunnels
import org.projectfloodlight.openflow.types.U16; //导入依赖的package包/类
/**
* Only bits 0-9 of index are used. Bits 10-15 are ignored.
* @param index
* @param tunnelId
* @return
*/
public static OFGroup createL2DCOFloodOverUnicastTunnels(U16 index, U16 tunnelId) { //8
return OFGroup.of(0 | (index.getRaw() & 0x03ff)
| (tunnelId.getRaw() << 12)
| (L2OverlaySubType.L2_OVERLAY_FLOOD_OVER_UNICAST_TUNNELS << 10)
| (OFDPAGroupType.L2_DATA_CENTER_OVERLAY << 28));
}
示例5: createL2DCOFloodOverMulticastTunnels
import org.projectfloodlight.openflow.types.U16; //导入依赖的package包/类
/**
* Only bits 0-9 of index are used. Bits 10-15 are ignored.
* @param index
* @param tunnelId
* @return
*/
public static OFGroup createL2DCOFloodOverMulticastTunnels(U16 index, U16 tunnelId) { //8
return OFGroup.of(0 | (index.getRaw() & 0x03ff)
| (tunnelId.getRaw() << 12)
| (L2OverlaySubType.L2_OVERLAY_FLOOD_OVER_MULTICAST_TUNNELS << 10)
| (OFDPAGroupType.L2_DATA_CENTER_OVERLAY << 28));
}
示例6: createL2DCOMulticastOverUnicastTunnels
import org.projectfloodlight.openflow.types.U16; //导入依赖的package包/类
/**
* Only bits 0-9 of index are used. Bits 10-15 are ignored.
* @param index
* @param tunnelId
* @return
*/
public static OFGroup createL2DCOMulticastOverUnicastTunnels(U16 index, U16 tunnelId) { //8
return OFGroup.of(0 | (index.getRaw() & 0x03ff)
| (tunnelId.getRaw() << 12)
| (L2OverlaySubType.L2_OVERLAY_MULTICAST_OVER_UNICAST_TUNNELS << 10)
| (OFDPAGroupType.L2_DATA_CENTER_OVERLAY << 28));
}
示例7: createL2DCOMulticastOverMulticastTunnels
import org.projectfloodlight.openflow.types.U16; //导入依赖的package包/类
/**
* Only bits 0-9 of index are used. Bits 10-15 are ignored.
* @param index
* @param tunnelId
* @return
*/
public static OFGroup createL2DCOMulticastOverMulticastTunnels(U16 index, U16 tunnelId) { //8
return OFGroup.of(0 | (index.getRaw() & 0x03ff)
| (tunnelId.getRaw() << 12)
| (L2OverlaySubType.L2_OVERLAY_MULTICAST_OVER_MULTICAST_TUNNELS << 10)
| (OFDPAGroupType.L2_DATA_CENTER_OVERLAY << 28));
}
示例8: createL2DCOFloodOverUnicastTunnels
import org.projectfloodlight.openflow.types.U16; //导入依赖的package包/类
/**
* Only bits 0-9 of index are used. Bits 10-15 are ignored.
* @param index
* @param tunnelId
* @return
*/
public static OFGroup createL2DCOFloodOverUnicastTunnels(U16 index, U16 tunnelId) { //8
return OFGroup.of(0 | (index.getRaw() & 0x03ff)
| (tunnelId.getRaw() << 12)
| (L2OverlaySubType.L2_OVERLAY_FLOOD_OVER_UNICAST_TUNNELS << 10)
| (OFDPAGroupType.L2_DATA_CENTER_OVERLAY << 28));
}
示例9: createL2DCOFloodOverMulticastTunnels
import org.projectfloodlight.openflow.types.U16; //导入依赖的package包/类
/**
* Only bits 0-9 of index are used. Bits 10-15 are ignored.
* @param index
* @param tunnelId
* @return
*/
public static OFGroup createL2DCOFloodOverMulticastTunnels(U16 index, U16 tunnelId) { //8
return OFGroup.of(0 | (index.getRaw() & 0x03ff)
| (tunnelId.getRaw() << 12)
| (L2OverlaySubType.L2_OVERLAY_FLOOD_OVER_MULTICAST_TUNNELS << 10)
| (OFDPAGroupType.L2_DATA_CENTER_OVERLAY << 28));
}
示例10: createL2DCOMulticastOverUnicastTunnels
import org.projectfloodlight.openflow.types.U16; //导入依赖的package包/类
/**
* Only bits 0-9 of index are used. Bits 10-15 are ignored.
* @param index
* @param tunnelId
* @return
*/
public static OFGroup createL2DCOMulticastOverUnicastTunnels(U16 index, U16 tunnelId) { //8
return OFGroup.of(0 | (index.getRaw() & 0x03ff)
| (tunnelId.getRaw() << 12)
| (L2OverlaySubType.L2_OVERLAY_MULTICAST_OVER_UNICAST_TUNNELS << 10)
| (OFDPAGroupType.L2_DATA_CENTER_OVERLAY << 28));
}
示例11: createL2DCOMulticastOverMulticastTunnels
import org.projectfloodlight.openflow.types.U16; //导入依赖的package包/类
/**
* Only bits 0-9 of index are used. Bits 10-15 are ignored.
* @param index
* @param tunnelId
* @return
*/
public static OFGroup createL2DCOMulticastOverMulticastTunnels(U16 index, U16 tunnelId) { //8
return OFGroup.of(0 | (index.getRaw() & 0x03ff)
| (tunnelId.getRaw() << 12)
| (L2OverlaySubType.L2_OVERLAY_MULTICAST_OVER_MULTICAST_TUNNELS << 10)
| (OFDPAGroupType.L2_DATA_CENTER_OVERLAY << 28));
}