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


Java OFFlowModFlags类代码示例

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


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

示例1: buildFlowDel

import org.projectfloodlight.openflow.protocol.OFFlowModFlags; //导入依赖的package包/类
@Override
public OFFlowMod buildFlowDel() {
    Match match = buildMatch();

    long cookie = flowRule().id().value();

    OFFlowDeleteStrict fm = factory().buildFlowDeleteStrict()
            .setXid(xid)
            .setCookie(U64.of(cookie))
            .setBufferId(OFBufferId.NO_BUFFER)
            .setMatch(match)
            .setFlags(Collections.singleton(OFFlowModFlags.SEND_FLOW_REM))
            .setPriority(flowRule().priority())
            .setTableId(TableId.of(flowRule().tableId()))
            .build();

    return fm;
}
 
开发者ID:shlee89,项目名称:athena,代码行数:19,代码来源:FlowModBuilderVer13.java

示例2: buildFlowAdd

import org.projectfloodlight.openflow.protocol.OFFlowModFlags; //导入依赖的package包/类
@Override
public OFFlowAdd buildFlowAdd() {
    Match match = buildMatch();
    List<OFAction> actions = buildActions();

    long cookie = flowRule().id().value();


    OFFlowAdd fm = factory().buildFlowAdd()
            .setXid(xid)
            .setCookie(U64.of(cookie))
            .setBufferId(OFBufferId.NO_BUFFER)
            .setActions(actions)
            .setMatch(match)
            .setFlags(Collections.singleton(OFFlowModFlags.SEND_FLOW_REM))
            .setPriority(flowRule().priority())
            .build();

    return fm;
}
 
开发者ID:shlee89,项目名称:athena,代码行数:21,代码来源:FlowModBuilderVer10.java

示例3: buildFlowMod

import org.projectfloodlight.openflow.protocol.OFFlowModFlags; //导入依赖的package包/类
@Override
public OFFlowMod buildFlowMod() {
    Match match = buildMatch();
    List<OFAction> actions = buildActions();

    long cookie = flowRule().id().value();

    OFFlowMod fm = factory().buildFlowModify()
            .setXid(xid)
            .setCookie(U64.of(cookie))
            .setBufferId(OFBufferId.NO_BUFFER)
            .setActions(actions)
            .setMatch(match)
            .setFlags(Collections.singleton(OFFlowModFlags.SEND_FLOW_REM))
            .setPriority(flowRule().priority())
            .build();

    return fm;
}
 
开发者ID:shlee89,项目名称:athena,代码行数:20,代码来源:FlowModBuilderVer10.java

示例4: buildFlowDel

import org.projectfloodlight.openflow.protocol.OFFlowModFlags; //导入依赖的package包/类
@Override
public OFFlowDelete buildFlowDel() {
    Match match = buildMatch();

    long cookie = flowRule().id().value();

    OFFlowDelete fm = factory().buildFlowDelete()
            .setXid(xid)
            .setCookie(U64.of(cookie))
            .setBufferId(OFBufferId.NO_BUFFER)
            .setMatch(match)
            .setFlags(Collections.singleton(OFFlowModFlags.SEND_FLOW_REM))
            .setPriority(flowRule().priority())
            .build();

    return fm;
}
 
开发者ID:shlee89,项目名称:athena,代码行数:18,代码来源:FlowModBuilderVer10.java

示例5: buildFlowDel

import org.projectfloodlight.openflow.protocol.OFFlowModFlags; //导入依赖的package包/类
@Override
public OFFlowDelete buildFlowDel() {
    Match match = buildMatch();

    long cookie = flowRule().id().value();

    OFFlowDelete fm = factory().buildFlowDelete()
            .setXid(xid)
            .setCookie(U64.of(cookie))
            .setBufferId(OFBufferId.NO_BUFFER)
            .setMatch(match)
            .setFlags(Collections.singleton(OFFlowModFlags.SEND_FLOW_REM))
            .setPriority(flowRule().priority())
            .setTableId(TableId.of(flowRule().type().ordinal()))
            .build();

    return fm;
}
 
开发者ID:ravikumaran2015,项目名称:ravikumaran201504,代码行数:19,代码来源:FlowModBuilderVer13.java

示例6: toWireValue

import org.projectfloodlight.openflow.protocol.OFFlowModFlags; //导入依赖的package包/类
public static short toWireValue(Set<OFFlowModFlags> set) {
    short wireValue = 0;

    for(OFFlowModFlags e: set) {
        switch(e) {
            case SEND_FLOW_REM:
                wireValue |= SEND_FLOW_REM_VAL;
                break;
            case CHECK_OVERLAP:
                wireValue |= CHECK_OVERLAP_VAL;
                break;
            case RESET_COUNTS:
                wireValue |= RESET_COUNTS_VAL;
                break;
            default:
                throw new IllegalArgumentException("Illegal enum value for type OFFlowModFlags in version 1.2: " + e);
        }
    }
    return wireValue;
}
 
开发者ID:o3project,项目名称:openflowj-otn,代码行数:21,代码来源:OFFlowModFlagsSerializerVer12.java

示例7: ofWireValue

import org.projectfloodlight.openflow.protocol.OFFlowModFlags; //导入依赖的package包/类
public static Set<OFFlowModFlags> ofWireValue(short val) {
    EnumSet<OFFlowModFlags> set = EnumSet.noneOf(OFFlowModFlags.class);

    if((val & SEND_FLOW_REM_VAL) != 0)
        set.add(OFFlowModFlags.SEND_FLOW_REM);
    if((val & CHECK_OVERLAP_VAL) != 0)
        set.add(OFFlowModFlags.CHECK_OVERLAP);
    if((val & RESET_COUNTS_VAL) != 0)
        set.add(OFFlowModFlags.RESET_COUNTS);
    if((val & NO_PKT_COUNTS_VAL) != 0)
        set.add(OFFlowModFlags.NO_PKT_COUNTS);
    if((val & NO_BYT_COUNTS_VAL) != 0)
        set.add(OFFlowModFlags.NO_BYT_COUNTS);
    if((val & BSN_SEND_IDLE_VAL) != 0)
        set.add(OFFlowModFlags.BSN_SEND_IDLE);
    return Collections.unmodifiableSet(set);
}
 
开发者ID:o3project,项目名称:openflowj-otn,代码行数:18,代码来源:OFFlowModFlagsSerializerVer13.java

示例8: toWireValue

import org.projectfloodlight.openflow.protocol.OFFlowModFlags; //导入依赖的package包/类
public static short toWireValue(Set<OFFlowModFlags> set) {
    short wireValue = 0;

    for(OFFlowModFlags e: set) {
        switch(e) {
            case SEND_FLOW_REM:
                wireValue |= SEND_FLOW_REM_VAL;
                break;
            case CHECK_OVERLAP:
                wireValue |= CHECK_OVERLAP_VAL;
                break;
            case EMERG:
                wireValue |= EMERG_VAL;
                break;
            default:
                throw new IllegalArgumentException("Illegal enum value for type OFFlowModFlags in version 1.0: " + e);
        }
    }
    return wireValue;
}
 
开发者ID:o3project,项目名称:openflowj-otn,代码行数:21,代码来源:OFFlowModFlagsSerializerVer10.java

示例9: toWireValue

import org.projectfloodlight.openflow.protocol.OFFlowModFlags; //导入依赖的package包/类
public static short toWireValue(Set<OFFlowModFlags> set) {
    short wireValue = 0;

    for(OFFlowModFlags e: set) {
        switch(e) {
            case SEND_FLOW_REM:
                wireValue |= SEND_FLOW_REM_VAL;
                break;
            case CHECK_OVERLAP:
                wireValue |= CHECK_OVERLAP_VAL;
                break;
            default:
                throw new IllegalArgumentException("Illegal enum value for type OFFlowModFlags in version 1.1: " + e);
        }
    }
    return wireValue;
}
 
开发者ID:o3project,项目名称:openflowj-otn,代码行数:18,代码来源:OFFlowModFlagsSerializerVer11.java

示例10: buildFlowDel

import org.projectfloodlight.openflow.protocol.OFFlowModFlags; //导入依赖的package包/类
@Override
public OFFlowMod buildFlowDel() {
    Match match = buildMatch();

    long cookie = flowRule().id().value();

    OFFlowDeleteStrict.Builder fm = factory().buildFlowDeleteStrict()
            .setXid(xid)
            .setCookie(U64.of(cookie))
            .setBufferId(OFBufferId.NO_BUFFER)
            .setMatch(match)
            .setFlags(Collections.singleton(OFFlowModFlags.SEND_FLOW_REM))
            .setPriority(flowRule().priority())
            .setTableId(TableId.of(flowRule().tableId()));

    if (flowRule().timeout() != 0) {
        fm.setIdleTimeout(flowRule().timeout());
    } else {
        fm.setHardTimeout(flowRule().hardTimeout());
    }

    return fm.build();
}
 
开发者ID:fp7-netide,项目名称:Engine,代码行数:24,代码来源:FlowModBuilderVer13.java

示例11: buildFlowAdd

import org.projectfloodlight.openflow.protocol.OFFlowModFlags; //导入依赖的package包/类
@Override
public OFFlowAdd buildFlowAdd() {
    Match match = buildMatch();
    List<OFAction> actions = buildActions();

    long cookie = flowRule().id().value();


    OFFlowAdd.Builder fm = factory().buildFlowAdd()
            .setXid(xid)
            .setCookie(U64.of(cookie))
            .setBufferId(OFBufferId.NO_BUFFER)
            .setActions(actions)
            .setMatch(match)
            .setFlags(Collections.singleton(OFFlowModFlags.SEND_FLOW_REM))
            .setPriority(flowRule().priority());
    
    if (flowRule().timeout() != 0) {
        fm.setIdleTimeout(flowRule().timeout());
    } else {
        fm.setHardTimeout(flowRule().hardTimeout());
    }

    return fm.build();
}
 
开发者ID:fp7-netide,项目名称:Engine,代码行数:26,代码来源:FlowModBuilderVer10.java

示例12: buildFlowMod

import org.projectfloodlight.openflow.protocol.OFFlowModFlags; //导入依赖的package包/类
@Override
public OFFlowMod buildFlowMod() {
    Match match = buildMatch();
    List<OFAction> actions = buildActions();

    long cookie = flowRule().id().value();

    OFFlowMod.Builder fm = factory().buildFlowModify()
            .setXid(xid)
            .setCookie(U64.of(cookie))
            .setBufferId(OFBufferId.NO_BUFFER)
            .setActions(actions)
            .setMatch(match)
            .setFlags(Collections.singleton(OFFlowModFlags.SEND_FLOW_REM))
            .setPriority(flowRule().priority())
            .setPriority(flowRule().priority());

    if (flowRule().timeout() != 0) {
        fm.setIdleTimeout(flowRule().timeout());
    } else {
        fm.setHardTimeout(flowRule().hardTimeout());
    }

    return fm.build();
}
 
开发者ID:fp7-netide,项目名称:Engine,代码行数:26,代码来源:FlowModBuilderVer10.java

示例13: buildFlowDel

import org.projectfloodlight.openflow.protocol.OFFlowModFlags; //导入依赖的package包/类
@Override
public OFFlowDelete buildFlowDel() {
    Match match = buildMatch();

    long cookie = flowRule().id().value();

    OFFlowDelete.Builder fm = factory().buildFlowDelete()
            .setXid(xid)
            .setCookie(U64.of(cookie))
            .setBufferId(OFBufferId.NO_BUFFER)
            .setMatch(match)
            .setFlags(Collections.singleton(OFFlowModFlags.SEND_FLOW_REM))
            .setPriority(flowRule().priority());

    if (flowRule().timeout() != 0) {
        fm.setIdleTimeout(flowRule().timeout());
    } else {
        fm.setHardTimeout(flowRule().hardTimeout());
    }

    return fm.build();
}
 
开发者ID:fp7-netide,项目名称:Engine,代码行数:23,代码来源:FlowModBuilderVer10.java

示例14: buildFlowDel

import org.projectfloodlight.openflow.protocol.OFFlowModFlags; //导入依赖的package包/类
@Override
public OFFlowMod buildFlowDel() {
    Match match = buildMatch();

    long cookie = flowRule().id().value();

    OFFlowDeleteStrict fm = factory().buildFlowDeleteStrict()
            .setXid(xid)
            .setCookie(U64.of(cookie))
            .setBufferId(OFBufferId.NO_BUFFER)
            .setMatch(match)
            .setFlags(Collections.singleton(OFFlowModFlags.SEND_FLOW_REM))
            .setPriority(flowRule().priority())
            .setTableId(TableId.of(flowRule().tableId()))
            .setHardTimeout(flowRule().hardTimeout())
            .build();

    return fm;
}
 
开发者ID:opennetworkinglab,项目名称:onos,代码行数:20,代码来源:FlowModBuilderVer13.java

示例15: buildFlowAdd

import org.projectfloodlight.openflow.protocol.OFFlowModFlags; //导入依赖的package包/类
@Override
public OFFlowAdd buildFlowAdd() {
    Match match = buildMatch();
    List<OFAction> actions = buildActions();

    long cookie = flowRule().id().value();


    OFFlowAdd fm = factory().buildFlowAdd()
            .setXid(xid)
            .setCookie(U64.of(cookie))
            .setBufferId(OFBufferId.NO_BUFFER)
            .setActions(actions)
            .setMatch(match)
            .setFlags(Collections.singleton(OFFlowModFlags.SEND_FLOW_REM))
            .setPriority(flowRule().priority())
            .setHardTimeout(flowRule().hardTimeout())
            .build();

    return fm;
}
 
开发者ID:opennetworkinglab,项目名称:onos,代码行数:22,代码来源:FlowModBuilderVer10.java


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