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


Java OFStatsType.PORT_DESC属性代码示例

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


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

示例1: processOFStatisticsReply

@Override
void processOFStatisticsReply(OFChannelHandler h, OFStatsReply m)
        throws SwitchStateException {
    // Read port description
    if (m.getStatsType() != OFStatsType.PORT_DESC) {
        log.warn("Expecting port description stats but received stats "
                + "type {} from {}. Ignoring ...", m.getStatsType(),
                h.channel.getRemoteAddress());
        return;
    }
    if (m.getFlags().contains(OFStatsReplyFlags.REPLY_MORE)) {
        log.warn("Stats reply indicates more stats from sw {} for "
                + "port description - not currently handled",
                h.getSwitchInfoString());
    }
    h.portDescReply = (OFPortDescStatsReply) m; // temp store
    log.info("Received port desc reply for switch at {}",
            h.getSwitchInfoString());
    try {
        h.sendHandshakeSetConfig();
    } catch (IOException e) {
        log.error("Unable to send setConfig after PortDescReply. "
                + "Error: {}", e.getMessage());
    }
    h.setState(WAIT_CONFIG_REPLY);
}
 
开发者ID:ravikumaran2015,项目名称:ravikumaran201504,代码行数:26,代码来源:OFChannelHandler.java

示例2: processOFStatisticsReply

@Override
void processOFStatisticsReply(OFChannelHandler h, OFStatsReply m)
        throws SwitchStateException {
    // Read port description
    if (m.getStatsType() != OFStatsType.PORT_DESC) {
        log.warn("Expecting port description stats but received stats "
                + "type {} from {}. Ignoring ...", m.getStatsType(),
                h.channel.getRemoteAddress());
        return;
    }
    if (m.getFlags().contains(OFStatsReplyFlags.REPLY_MORE)) {
        log.debug("Stats reply indicates more stats from sw {} for "
                + "port description",
                h.getSwitchInfoString());
        h.portDescReplies.add((OFPortDescStatsReply)m);
        return;
    }
    else {
        h.portDescReplies.add((OFPortDescStatsReply)m);
    }
    //h.portDescReply = (OFPortDescStatsReply) m; // temp store
    log.info("Received port desc reply for switch at {}",
            h.getSwitchInfoString());
    try {
        h.sendHandshakeSetConfig();
    } catch (IOException e) {
        log.error("Unable to send setConfig after PortDescReply. "
                + "Error: {}", e.getMessage());
    }
    h.setState(WAIT_CONFIG_REPLY);
}
 
开发者ID:shlee89,项目名称:athena,代码行数:31,代码来源:OFChannelHandler.java

示例3: ofWireValue

public static OFStatsType ofWireValue(short val) {
    switch(val) {
        case DESC_VAL:
            return OFStatsType.DESC;
        case FLOW_VAL:
            return OFStatsType.FLOW;
        case AGGREGATE_VAL:
            return OFStatsType.AGGREGATE;
        case TABLE_VAL:
            return OFStatsType.TABLE;
        case PORT_VAL:
            return OFStatsType.PORT;
        case QUEUE_VAL:
            return OFStatsType.QUEUE;
        case GROUP_VAL:
            return OFStatsType.GROUP;
        case GROUP_DESC_VAL:
            return OFStatsType.GROUP_DESC;
        case GROUP_FEATURES_VAL:
            return OFStatsType.GROUP_FEATURES;
        case METER_VAL:
            return OFStatsType.METER;
        case METER_CONFIG_VAL:
            return OFStatsType.METER_CONFIG;
        case METER_FEATURES_VAL:
            return OFStatsType.METER_FEATURES;
        case TABLE_FEATURES_VAL:
            return OFStatsType.TABLE_FEATURES;
        case PORT_DESC_VAL:
            return OFStatsType.PORT_DESC;
        case EXPERIMENTER_VAL:
            return OFStatsType.EXPERIMENTER;
        default:
            throw new IllegalArgumentException("Illegal wire value for type OFStatsType in version 1.3: " + val);
    }
}
 
开发者ID:o3project,项目名称:openflowj-otn,代码行数:36,代码来源:OFStatsTypeSerializerVer13.java

示例4: processOFStatisticsReply

@Override
void processOFStatisticsReply(OFChannelHandler h, OFStatsReply m)
        throws SwitchStateException {
    // Read port description
    if (m.getStatsType() != OFStatsType.PORT_DESC) {
        log.warn("Expecting port description stats but received stats "
                + "type {} from {}. Ignoring ...", m.getStatsType(),
                h.channel.remoteAddress());
        return;
    }
    if (m.getFlags().contains(OFStatsReplyFlags.REPLY_MORE)) {
        log.debug("Stats reply indicates more stats from sw {} for "
                + "port description",
                h.getSwitchInfoString());
        h.portDescReplies.add((OFPortDescStatsReply) m);
        return;
    } else {
        h.portDescReplies.add((OFPortDescStatsReply) m);
    }
    //h.portDescReply = (OFPortDescStatsReply) m; // temp store
    log.debug("Received port desc reply for switch at {}: {}",
             h.getSwitchInfoString(),
             ((OFPortDescStatsReply) m).getEntries());
    try {
        h.sendHandshakeSetConfig();
    } catch (IOException e) {
        log.error("Unable to send setConfig after PortDescReply. "
                + "Error: {}", e.getMessage());
    }
    h.setState(WAIT_CONFIG_REPLY);
}
 
开发者ID:opennetworkinglab,项目名称:onos,代码行数:31,代码来源:OFChannelHandler.java

示例5: ofWireValue

public static OFStatsType ofWireValue(short val) {
    switch(val) {
        case DESC_VAL:
            return OFStatsType.DESC;
        case FLOW_VAL:
            return OFStatsType.FLOW;
        case AGGREGATE_VAL:
            return OFStatsType.AGGREGATE;
        case TABLE_VAL:
            return OFStatsType.TABLE;
        case PORT_VAL:
            return OFStatsType.PORT;
        case QUEUE_VAL:
            return OFStatsType.QUEUE;
        case GROUP_VAL:
            return OFStatsType.GROUP;
        case GROUP_DESC_VAL:
            return OFStatsType.GROUP_DESC;
        case GROUP_FEATURES_VAL:
            return OFStatsType.GROUP_FEATURES;
        case METER_VAL:
            return OFStatsType.METER;
        case METER_CONFIG_VAL:
            return OFStatsType.METER_CONFIG;
        case METER_FEATURES_VAL:
            return OFStatsType.METER_FEATURES;
        case TABLE_FEATURES_VAL:
            return OFStatsType.TABLE_FEATURES;
        case PORT_DESC_VAL:
            return OFStatsType.PORT_DESC;
        case TABLE_DESC_VAL:
            return OFStatsType.TABLE_DESC;
        case QUEUE_DESC_VAL:
            return OFStatsType.QUEUE_DESC;
        case FLOW_MONITOR_VAL:
            return OFStatsType.FLOW_MONITOR;
        case EXPERIMENTER_VAL:
            return OFStatsType.EXPERIMENTER;
        default:
            throw new IllegalArgumentException("Illegal wire value for type OFStatsType in version 1.4: " + val);
    }
}
 
开发者ID:o3project,项目名称:openflowj-otn,代码行数:42,代码来源:OFStatsTypeSerializerVer14.java

示例6: processOFStatisticsReply

@Override
void processOFStatisticsReply(OFChannelHandler h, OFStatsReply m)
        throws SwitchStateException {
    // Read port description
    if (m.getStatsType() != OFStatsType.PORT_DESC) {
        log.warn("Expecting port description stats but received stats "
                + "type {} from {}. Ignoring ...", m.getStatsType(),
                h.channel.getRemoteAddress());
        return;
    }
    if (h.portDescReplies.isEmpty()) {
        //h.portDescReplies = new ArrayList<OFPortDescStatsReply>();
        h.portDescReplies.add((OFPortDescStatsReply) m);
        if (m.getFlags().contains(OFStatsReplyFlags.REPLY_MORE)) {
            log.warn("Stats reply indicates more stats from sw {} for "
                    + "port description - not currently handled",
                    h.getSwitchInfoString());
            return;
        }

    }
    else if (m.getFlags().contains(OFStatsReplyFlags.REPLY_MORE)) {
        log.warn("Stats reply indicates more stats from sw {} for "
                + "port description - not currently handled",
                h.getSwitchInfoString());
        h.portDescReplies.add((OFPortDescStatsReply)m);
        return;
    }
    else {
        h.portDescReplies.add((OFPortDescStatsReply)m);
    }
    //h.portDescReply = (OFPortDescStatsReply) m; // temp store
    log.info("Received port desc reply for switch at {}",
            h.getSwitchInfoString());
    try {
        h.sendHandshakeSetConfig();
    } catch (IOException e) {
        log.error("Unable to send setConfig after PortDescReply. "
                + "Error: {}", e.getMessage());
    }
    h.setState(WAIT_CONFIG_REPLY);
}
 
开发者ID:opennetworkinglab,项目名称:spring-open,代码行数:42,代码来源:OFChannelHandler.java

示例7: ofWireValue

public static OFStatsType ofWireValue(short val) {
    switch(val) {
        case DESC_VAL:
            return OFStatsType.DESC;
        case FLOW_VAL:
            return OFStatsType.FLOW;
        case AGGREGATE_VAL:
            return OFStatsType.AGGREGATE;
        case TABLE_VAL:
            return OFStatsType.TABLE;
        case PORT_VAL:
            return OFStatsType.PORT;
        case QUEUE_VAL:
            return OFStatsType.QUEUE;
        case GROUP_VAL:
            return OFStatsType.GROUP;
        case GROUP_DESC_VAL:
            return OFStatsType.GROUP_DESC;
        case GROUP_FEATURES_VAL:
            return OFStatsType.GROUP_FEATURES;
        case METER_VAL:
            return OFStatsType.METER;
        case METER_CONFIG_VAL:
            return OFStatsType.METER_CONFIG;
        case METER_FEATURES_VAL:
            return OFStatsType.METER_FEATURES;
        case TABLE_FEATURES_VAL:
            return OFStatsType.TABLE_FEATURES;
        case PORT_DESC_VAL:
            return OFStatsType.PORT_DESC;
        case TABLE_DESC_VAL:
            return OFStatsType.TABLE_DESC;
        case QUEUE_DESC_VAL:
            return OFStatsType.QUEUE_DESC;
        case FLOW_MONITOR_VAL:
            return OFStatsType.FLOW_MONITOR;
        case FLOW_LIGHTWEIGHT_VAL:
            return OFStatsType.FLOW_LIGHTWEIGHT;
        case CONTROLLER_STATUS_VAL:
            return OFStatsType.CONTROLLER_STATUS;
        case BUNDLE_FEATURES_VAL:
            return OFStatsType.BUNDLE_FEATURES;
        case EXPERIMENTER_VAL:
            return OFStatsType.EXPERIMENTER;
        default:
            throw new IllegalArgumentException("Illegal wire value for type OFStatsType in version 1.5: " + val);
    }
}
 
开发者ID:floodlight,项目名称:loxigen-artifacts,代码行数:48,代码来源:OFStatsTypeSerializerVer15.java


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