当前位置: 首页>>代码示例>>Java>>正文


Java U16.f方法代码示例

本文整理汇总了Java中org.openflow.util.U16.f方法的典型用法代码示例。如果您正苦于以下问题:Java U16.f方法的具体用法?Java U16.f怎么用?Java U16.f使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.openflow.util.U16的用法示例。


在下文中一共展示了U16.f方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: toStringUnmasked

import org.openflow.util.U16; //导入方法依赖的package包/类
/**
 * Return a string including all match fields, regardless whether they
 * are wildcarded or not.
 */
public String toStringUnmasked() {
    String str = "";

    // l1
    str += STR_IN_PORT + "=" + U16.f(this.inputPort);

    // l2
    str += "," + STR_DL_DST + "="
            + HexString.toHexString(this.dataLayerDestination);
    str += "," + STR_DL_SRC + "="
            + HexString.toHexString(this.dataLayerSource);
    str += "," + STR_DL_TYPE + "=0x"
            + Integer.toHexString(U16.f(this.dataLayerType));
    str += "," + STR_DL_VLAN + "=0x"
            + Integer.toHexString(U16.f(this.dataLayerVirtualLan));
    str += "," + STR_DL_VLAN_PCP + "="
            + Integer.toHexString(U8.f(this.dataLayerVirtualLanPriorityCodePoint));

    // l3
    str += "," + STR_NW_DST + "="
            + cidrToString(networkDestination,
                           getNetworkDestinationMaskLen());
    str += "," + STR_NW_SRC + "="
            + cidrToString(networkSource,
                           getNetworkSourceMaskLen());
    str += "," + STR_NW_PROTO + "=" + this.networkProtocol;
    str += "," + STR_NW_TOS + "=" + this.getNetworkTypeOfService();

    // l4
    str += "," + STR_TP_DST + "=" + this.transportDestination;
    str += "," + STR_TP_SRC + "=" + this.transportSource;

    // wildcards
    str += ", wildcards=" + debugWildCards(wildcards);
    return "OFMatch[" + str + "]";
}
 
开发者ID:JianqingJiang,项目名称:QoS-floodlight,代码行数:41,代码来源:OFMatch.java

示例2: compare

import org.openflow.util.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.f(f1.getPriority()) - U16.f(f2.getPriority());
}
 
开发者ID:JianqingJiang,项目名称:QoS-floodlight,代码行数:9,代码来源:StaticFlowEntryPusher.java

示例3: updatePortInfo

import org.openflow.util.U16; //导入方法依赖的package包/类
protected void updatePortInfo(IOFSwitch sw, OFPhysicalPort port) {
    if (role == Role.SLAVE) {
        return;
    }
    String datapathIdString = sw.getStringId();
    Map<String, Object> portInfo = new HashMap<String, Object>();
    int portNumber = U16.f(port.getPortNumber());
    String id = datapathIdString + "|" + portNumber;
    portInfo.put(PORT_ID, id);
    portInfo.put(PORT_SWITCH, datapathIdString);
    portInfo.put(PORT_NUMBER, portNumber);
    byte[] hardwareAddress = port.getHardwareAddress();
    String hardwareAddressString = HexString.toHexString(hardwareAddress);
    portInfo.put(PORT_HARDWARE_ADDRESS, hardwareAddressString);
    String name = port.getName();
    portInfo.put(PORT_NAME, name);
    long config = U32.f(port.getConfig());
    portInfo.put(PORT_CONFIG, config);
    long state = U32.f(port.getState());
    portInfo.put(PORT_STATE, state);
    long currentFeatures = U32.f(port.getCurrentFeatures());
    portInfo.put(PORT_CURRENT_FEATURES, currentFeatures);
    long advertisedFeatures = U32.f(port.getAdvertisedFeatures());
    portInfo.put(PORT_ADVERTISED_FEATURES, advertisedFeatures);
    long supportedFeatures = U32.f(port.getSupportedFeatures());
    portInfo.put(PORT_SUPPORTED_FEATURES, supportedFeatures);
    long peerFeatures = U32.f(port.getPeerFeatures());
    portInfo.put(PORT_PEER_FEATURES, peerFeatures);
    storageSource.updateRowAsync(PORT_TABLE_NAME, portInfo);
}
 
开发者ID:vishalshubham,项目名称:Multipath-Hedera-system-in-Floodlight-controller,代码行数:31,代码来源:Controller.java

示例4: getLength

import org.openflow.util.U16; //导入方法依赖的package包/类
@Override
@JsonIgnore
public int getLength() {
    return U16.f(length);
}
 
开发者ID:JianqingJiang,项目名称:QoS-floodlight,代码行数:6,代码来源:OFFlowStatisticsReply.java

示例5: toString

import org.openflow.util.U16; //导入方法依赖的package包/类
/**
 * Output a dpctl-styled string, i.e., only list the elements that are not
 * wildcarded
 * 
 * A match-everything OFMatch outputs "OFMatch[]"
 * 
 * @return 
 *         "OFMatch[dl_src:00:20:01:11:22:33,nw_src:192.168.0.0/24,tp_dst:80]"
 */
@Override
public String toString() {
    String str = "";

    // l1
    if ((wildcards & OFPFW_IN_PORT) == 0)
        str += "," + STR_IN_PORT + "=" + U16.f(this.inputPort);

    // l2
    if ((wildcards & OFPFW_DL_DST) == 0)
        str += "," + STR_DL_DST + "="
                + HexString.toHexString(this.dataLayerDestination);
    if ((wildcards & OFPFW_DL_SRC) == 0)
        str += "," + STR_DL_SRC + "="
                + HexString.toHexString(this.dataLayerSource);
    if ((wildcards & OFPFW_DL_TYPE) == 0)
        str += "," + STR_DL_TYPE + "=0x"
                + Integer.toHexString(U16.f(this.dataLayerType));
    if ((wildcards & OFPFW_DL_VLAN) == 0)
        str += "," + STR_DL_VLAN + "=0x"
                + Integer.toHexString(U16.f(this.dataLayerVirtualLan));
    if ((wildcards & OFPFW_DL_VLAN_PCP) == 0)
        str += ","
                + STR_DL_VLAN_PCP
                + "="
                + Integer.toHexString(U8
                        .f(this.dataLayerVirtualLanPriorityCodePoint));

    // l3
    if (getNetworkDestinationMaskLen() > 0)
        str += ","
                + STR_NW_DST
                + "="
                + cidrToString(networkDestination,
                        getNetworkDestinationMaskLen());
    if (getNetworkSourceMaskLen() > 0)
        str += "," + STR_NW_SRC + "="
                + cidrToString(networkSource, getNetworkSourceMaskLen());
    if ((wildcards & OFPFW_NW_PROTO) == 0)
        str += "," + STR_NW_PROTO + "=" + this.networkProtocol;
    if ((wildcards & OFPFW_NW_TOS) == 0)
        str += "," + STR_NW_TOS + "=" + this.getNetworkTypeOfService();

    // l4
    if ((wildcards & OFPFW_TP_DST) == 0)
        str += "," + STR_TP_DST + "=" + this.transportDestination;
    if ((wildcards & OFPFW_TP_SRC) == 0)
        str += "," + STR_TP_SRC + "=" + this.transportSource;
    if ((str.length() > 0) && (str.charAt(0) == ','))
        str = str.substring(1); // trim the leading ","
    // done
    return "OFMatch[" + str + "]";
}
 
开发者ID:vishalshubham,项目名称:Multipath-Hedera-system-in-Floodlight-controller,代码行数:63,代码来源:OFMatch.java

示例6: toString

import org.openflow.util.U16; //导入方法依赖的package包/类
@Override
public String toString() {
    return "OFActionOutput [maxLength=" + maxLength + ", port=" + U16.f(port)
            + ", length=" + length + ", type=" + type + "]";
}
 
开发者ID:vishalshubham,项目名称:Multipath-Hedera-system-in-Floodlight-controller,代码行数:6,代码来源:OFActionOutput.java

示例7: toStringUnmasked

import org.openflow.util.U16; //导入方法依赖的package包/类
/**
 * Return a string including all match fields, regardless whether they are
 * wildcarded or not.
 */
public String toStringUnmasked() {
    String str = "";

    // l1
    str += OFMatch.STR_IN_PORT + "=" + U16.f(this.inputPort);

    // l2
    str += "," + OFMatch.STR_DL_DST + "="
            + HexString.toHexString(this.dataLayerDestination);
    str += "," + OFMatch.STR_DL_SRC + "="
            + HexString.toHexString(this.dataLayerSource);
    str += "," + OFMatch.STR_DL_TYPE + "=0x"
            + Integer.toHexString(U16.f(this.dataLayerType));
    str += "," + OFMatch.STR_DL_VLAN + "=0x"
            + Integer.toHexString(U16.f(this.dataLayerVirtualLan));
    str += ","
            + OFMatch.STR_DL_VLAN_PCP
            + "="
            + Integer.toHexString(U8
                    .f(this.dataLayerVirtualLanPriorityCodePoint));

    // l3
    str += ","
            + OFMatch.STR_NW_DST
            + "="
            + this.cidrToString(this.networkDestination,
                    this.getNetworkDestinationMaskLen());
    str += ","
            + OFMatch.STR_NW_SRC
            + "="
            + this.cidrToString(this.networkSource,
                    this.getNetworkSourceMaskLen());
    str += "," + OFMatch.STR_NW_PROTO + "=" + this.networkProtocol;
    str += "," + OFMatch.STR_NW_TOS + "=" + this.getNetworkTypeOfService();

    // l4
    str += "," + OFMatch.STR_TP_DST + "=" + this.transportDestination;
    str += "," + OFMatch.STR_TP_SRC + "=" + this.transportSource;

    // wildcards
    str += ", wildcards=" + OFMatch.debugWildCards(this.wildcards);
    return "OFMatch[" + str + "]";
}
 
开发者ID:CoVisor,项目名称:CoVisor,代码行数:48,代码来源:OFMatch.java

示例8: getActionsLengthU

import org.openflow.util.U16; //导入方法依赖的package包/类
/**
 * Get actions_len, unsigned
 * @return
 */
public int getActionsLengthU() {
    return U16.f(this.actionsLength);
}
 
开发者ID:JianqingJiang,项目名称:QoS-floodlight,代码行数:8,代码来源:OFPacketOut.java

示例9: getLengthU

import org.openflow.util.U16; //导入方法依赖的package包/类
/**
 * Get the length of this message, unsigned
 *
 * @return
 */
public int getLengthU() {
    return U16.f(length);
}
 
开发者ID:JianqingJiang,项目名称:QoS-floodlight,代码行数:9,代码来源:OFMessage.java

示例10: getActionsLengthU

import org.openflow.util.U16; //导入方法依赖的package包/类
/**
 * Get actions_len, unsigned
 *
 * @return
 */
public int getActionsLengthU() {
    return U16.f(this.actionsLength);
}
 
开发者ID:CoVisor,项目名称:CoVisor,代码行数:9,代码来源:OFPacketOut.java


注:本文中的org.openflow.util.U16.f方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。