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


Java OFBundleCtrlType类代码示例

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


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

示例1: ofWireValue

import org.projectfloodlight.openflow.protocol.OFBundleCtrlType; //导入依赖的package包/类
public static OFBundleCtrlType ofWireValue(short val) {
    switch(val) {
        case OPEN_REQUEST_VAL:
            return OFBundleCtrlType.OPEN_REQUEST;
        case OPEN_REPLY_VAL:
            return OFBundleCtrlType.OPEN_REPLY;
        case CLOSE_REQUEST_VAL:
            return OFBundleCtrlType.CLOSE_REQUEST;
        case CLOSE_REPLY_VAL:
            return OFBundleCtrlType.CLOSE_REPLY;
        case COMMIT_REQUEST_VAL:
            return OFBundleCtrlType.COMMIT_REQUEST;
        case COMMIT_REPLY_VAL:
            return OFBundleCtrlType.COMMIT_REPLY;
        case DISCARD_REQUEST_VAL:
            return OFBundleCtrlType.DISCARD_REQUEST;
        case DISCARD_REPLY_VAL:
            return OFBundleCtrlType.DISCARD_REPLY;
        default:
            throw new IllegalArgumentException("Illegal wire value for type OFBundleCtrlType in version 1.4: " + val);
    }
}
 
开发者ID:o3project,项目名称:openflowj-otn,代码行数:23,代码来源:OFBundleCtrlTypeSerializerVer14.java

示例2: toWireValue

import org.projectfloodlight.openflow.protocol.OFBundleCtrlType; //导入依赖的package包/类
public static short toWireValue(OFBundleCtrlType e) {
    switch(e) {
        case OPEN_REQUEST:
            return OPEN_REQUEST_VAL;
        case OPEN_REPLY:
            return OPEN_REPLY_VAL;
        case CLOSE_REQUEST:
            return CLOSE_REQUEST_VAL;
        case CLOSE_REPLY:
            return CLOSE_REPLY_VAL;
        case COMMIT_REQUEST:
            return COMMIT_REQUEST_VAL;
        case COMMIT_REPLY:
            return COMMIT_REPLY_VAL;
        case DISCARD_REQUEST:
            return DISCARD_REQUEST_VAL;
        case DISCARD_REPLY:
            return DISCARD_REPLY_VAL;
        default:
            throw new IllegalArgumentException("Illegal enum value for type OFBundleCtrlType in version 1.4: " + e);
    }
}
 
开发者ID:o3project,项目名称:openflowj-otn,代码行数:23,代码来源:OFBundleCtrlTypeSerializerVer14.java

示例3: ofWireValue

import org.projectfloodlight.openflow.protocol.OFBundleCtrlType; //导入依赖的package包/类
public static OFBundleCtrlType ofWireValue(short val) {
    switch(val) {
        case OPEN_REQUEST_VAL:
            return OFBundleCtrlType.OPEN_REQUEST;
        case OPEN_REPLY_VAL:
            return OFBundleCtrlType.OPEN_REPLY;
        case CLOSE_REQUEST_VAL:
            return OFBundleCtrlType.CLOSE_REQUEST;
        case CLOSE_REPLY_VAL:
            return OFBundleCtrlType.CLOSE_REPLY;
        case COMMIT_REQUEST_VAL:
            return OFBundleCtrlType.COMMIT_REQUEST;
        case COMMIT_REPLY_VAL:
            return OFBundleCtrlType.COMMIT_REPLY;
        case DISCARD_REQUEST_VAL:
            return OFBundleCtrlType.DISCARD_REQUEST;
        case DISCARD_REPLY_VAL:
            return OFBundleCtrlType.DISCARD_REPLY;
        default:
            throw new IllegalArgumentException("Illegal wire value for type OFBundleCtrlType in version 1.5: " + val);
    }
}
 
开发者ID:floodlight,项目名称:loxigen-artifacts,代码行数:23,代码来源:OFBundleCtrlTypeSerializerVer15.java

示例4: toWireValue

import org.projectfloodlight.openflow.protocol.OFBundleCtrlType; //导入依赖的package包/类
public static short toWireValue(OFBundleCtrlType e) {
    switch(e) {
        case OPEN_REQUEST:
            return OPEN_REQUEST_VAL;
        case OPEN_REPLY:
            return OPEN_REPLY_VAL;
        case CLOSE_REQUEST:
            return CLOSE_REQUEST_VAL;
        case CLOSE_REPLY:
            return CLOSE_REPLY_VAL;
        case COMMIT_REQUEST:
            return COMMIT_REQUEST_VAL;
        case COMMIT_REPLY:
            return COMMIT_REPLY_VAL;
        case DISCARD_REQUEST:
            return DISCARD_REQUEST_VAL;
        case DISCARD_REPLY:
            return DISCARD_REPLY_VAL;
        default:
            throw new IllegalArgumentException("Illegal enum value for type OFBundleCtrlType in version 1.5: " + e);
    }
}
 
开发者ID:floodlight,项目名称:loxigen-artifacts,代码行数:23,代码来源:OFBundleCtrlTypeSerializerVer15.java

示例5: readFrom

import org.projectfloodlight.openflow.protocol.OFBundleCtrlType; //导入依赖的package包/类
public static OFBundleCtrlType readFrom(ChannelBuffer bb) throws OFParseError {
    try {
        return ofWireValue(bb.readShort());
    } catch (IllegalArgumentException e) {
        throw new OFParseError(e);
    }
}
 
开发者ID:o3project,项目名称:openflowj-otn,代码行数:8,代码来源:OFBundleCtrlTypeSerializerVer14.java

示例6: readFrom

import org.projectfloodlight.openflow.protocol.OFBundleCtrlType; //导入依赖的package包/类
public static OFBundleCtrlType readFrom(ByteBuf bb) throws OFParseError {
    try {
        return ofWireValue(bb.readShort());
    } catch (IllegalArgumentException e) {
        throw new OFParseError(e);
    }
}
 
开发者ID:floodlight,项目名称:loxigen-artifacts,代码行数:8,代码来源:OFBundleCtrlTypeSerializerVer15.java

示例7: writeTo

import org.projectfloodlight.openflow.protocol.OFBundleCtrlType; //导入依赖的package包/类
public static void writeTo(ChannelBuffer bb, OFBundleCtrlType e) {
    bb.writeShort(toWireValue(e));
}
 
开发者ID:o3project,项目名称:openflowj-otn,代码行数:4,代码来源:OFBundleCtrlTypeSerializerVer14.java

示例8: putTo

import org.projectfloodlight.openflow.protocol.OFBundleCtrlType; //导入依赖的package包/类
public static void putTo(OFBundleCtrlType e, PrimitiveSink sink) {
    sink.putShort(toWireValue(e));
}
 
开发者ID:o3project,项目名称:openflowj-otn,代码行数:4,代码来源:OFBundleCtrlTypeSerializerVer14.java

示例9: writeTo

import org.projectfloodlight.openflow.protocol.OFBundleCtrlType; //导入依赖的package包/类
public static void writeTo(ByteBuf bb, OFBundleCtrlType e) {
    bb.writeShort(toWireValue(e));
}
 
开发者ID:floodlight,项目名称:loxigen-artifacts,代码行数:4,代码来源:OFBundleCtrlTypeSerializerVer15.java


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