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


Java OFCapabilities类代码示例

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


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

示例1: SwitchSyncRepresentation

import org.projectfloodlight.openflow.protocol.OFCapabilities; //导入依赖的package包/类
/**
 * @param dpid
 * @param buffers
 * @param tables
 * @param capabilities
 * @param actions
 * @param ports
 * @param manufacturerDescription
 * @param hardwareDescription
 * @param softwareDescription
 * @param serialNumber
 * @param datapathDescription
 */
@JsonCreator
public SwitchSyncRepresentation(
        @JsonProperty("dpid") DatapathId dpid,
        @JsonProperty("buffers") int buffers,
        @JsonProperty("tables") byte tables,
        @JsonProperty("capabilities") Set<OFCapabilities> capabilities,
        @JsonProperty("actions") Set<OFActionType> actions,
        @JsonProperty("ports") List<SyncedPort> ports,
        @JsonProperty("manufacturerDescription") String manufacturerDescription,
        @JsonProperty("hardwareDescription") String hardwareDescription,
        @JsonProperty("softwareDescription") String softwareDescription,
        @JsonProperty("serialNumber") String serialNumber,
        @JsonProperty("datapathDescription") String datapathDescription) {
    this.dpid = dpid;
    this.buffers = buffers;
    this.tables = tables;
    this.capabilities = capabilities;
    this.actions = actions;
    this.ports = ports;
    this.manufacturerDescription = manufacturerDescription;
    this.hardwareDescription = hardwareDescription;
    this.softwareDescription = softwareDescription;
    this.serialNumber = serialNumber;
    this.datapathDescription = datapathDescription;
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:39,代码来源:SwitchSyncRepresentation.java

示例2: ofWireValue

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

    if((val & FLOW_STATS_VAL) != 0)
        set.add(OFCapabilities.FLOW_STATS);
    if((val & TABLE_STATS_VAL) != 0)
        set.add(OFCapabilities.TABLE_STATS);
    if((val & PORT_STATS_VAL) != 0)
        set.add(OFCapabilities.PORT_STATS);
    if((val & IP_REASM_VAL) != 0)
        set.add(OFCapabilities.IP_REASM);
    if((val & QUEUE_STATS_VAL) != 0)
        set.add(OFCapabilities.QUEUE_STATS);
    if((val & GROUP_STATS_VAL) != 0)
        set.add(OFCapabilities.GROUP_STATS);
    if((val & PORT_BLOCKED_VAL) != 0)
        set.add(OFCapabilities.PORT_BLOCKED);
    return Collections.unmodifiableSet(set);
}
 
开发者ID:o3project,项目名称:openflowj-otn,代码行数:20,代码来源:OFCapabilitiesSerializerVer12.java

示例3: ofWireValue

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

    if((val & FLOW_STATS_VAL) != 0)
        set.add(OFCapabilities.FLOW_STATS);
    if((val & TABLE_STATS_VAL) != 0)
        set.add(OFCapabilities.TABLE_STATS);
    if((val & PORT_STATS_VAL) != 0)
        set.add(OFCapabilities.PORT_STATS);
    if((val & STP_VAL) != 0)
        set.add(OFCapabilities.STP);
    if((val & RESERVED_VAL) != 0)
        set.add(OFCapabilities.RESERVED);
    if((val & IP_REASM_VAL) != 0)
        set.add(OFCapabilities.IP_REASM);
    if((val & QUEUE_STATS_VAL) != 0)
        set.add(OFCapabilities.QUEUE_STATS);
    if((val & ARP_MATCH_IP_VAL) != 0)
        set.add(OFCapabilities.ARP_MATCH_IP);
    return Collections.unmodifiableSet(set);
}
 
开发者ID:o3project,项目名称:openflowj-otn,代码行数:22,代码来源:OFCapabilitiesSerializerVer10.java

示例4: ofWireValue

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

    if((val & FLOW_STATS_VAL) != 0)
        set.add(OFCapabilities.FLOW_STATS);
    if((val & TABLE_STATS_VAL) != 0)
        set.add(OFCapabilities.TABLE_STATS);
    if((val & PORT_STATS_VAL) != 0)
        set.add(OFCapabilities.PORT_STATS);
    if((val & IP_REASM_VAL) != 0)
        set.add(OFCapabilities.IP_REASM);
    if((val & QUEUE_STATS_VAL) != 0)
        set.add(OFCapabilities.QUEUE_STATS);
    if((val & ARP_MATCH_IP_VAL) != 0)
        set.add(OFCapabilities.ARP_MATCH_IP);
    if((val & GROUP_STATS_VAL) != 0)
        set.add(OFCapabilities.GROUP_STATS);
    return Collections.unmodifiableSet(set);
}
 
开发者ID:o3project,项目名称:openflowj-otn,代码行数:20,代码来源:OFCapabilitiesSerializerVer11.java

示例5: setFeaturesReply

import org.projectfloodlight.openflow.protocol.OFCapabilities; //导入依赖的package包/类
@Override
public void setFeaturesReply(OFFeaturesReply featuresReply) {

    OFFeaturesReply.Builder builder = featuresReply.createBuilder();

    // do not try to set PORTS or ACTIONS,
    // they are not supported for this openflow version
    builder.setAuxiliaryId(featuresReply.getAuxiliaryId());
    builder.setDatapathId(featuresReply.getDatapathId());
    builder.setNBuffers(featuresReply.getNBuffers());
    builder.setReserved(featuresReply.getReserved());
    builder.setXid(featuresReply.getXid());

    Set<OFCapabilities> capabilities = new HashSet<>(featuresReply.getCapabilities());
    capabilities.add(OFCapabilities.GROUP_STATS);
    builder.setCapabilities(capabilities);

    super.setFeaturesReply(builder.build());
}
 
开发者ID:opennetworkinglab,项目名称:onos,代码行数:20,代码来源:Ofdpa3SwitchHandshaker.java

示例6: ofWireValue

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

    if((val & FLOW_STATS_VAL) != 0)
        set.add(OFCapabilities.FLOW_STATS);
    if((val & TABLE_STATS_VAL) != 0)
        set.add(OFCapabilities.TABLE_STATS);
    if((val & PORT_STATS_VAL) != 0)
        set.add(OFCapabilities.PORT_STATS);
    if((val & IP_REASM_VAL) != 0)
        set.add(OFCapabilities.IP_REASM);
    if((val & QUEUE_STATS_VAL) != 0)
        set.add(OFCapabilities.QUEUE_STATS);
    if((val & GROUP_STATS_VAL) != 0)
        set.add(OFCapabilities.GROUP_STATS);
    if((val & PORT_BLOCKED_VAL) != 0)
        set.add(OFCapabilities.PORT_BLOCKED);
    if((val & BUNDLES_VAL) != 0)
        set.add(OFCapabilities.BUNDLES);
    if((val & FLOW_MONITORING_VAL) != 0)
        set.add(OFCapabilities.FLOW_MONITORING);
    return Collections.unmodifiableSet(set);
}
 
开发者ID:floodlight,项目名称:loxigen-artifacts,代码行数:24,代码来源:OFCapabilitiesSerializerVer15.java

示例7: serializeCapabilities

import org.projectfloodlight.openflow.protocol.OFCapabilities; //导入依赖的package包/类
public void serializeCapabilities(Set<OFCapabilities> ofCapabilities, JsonGenerator jGen)
        throws IOException, JsonProcessingException {
    if (null == ofCapabilities)
        jGen.writeStringField("capabilities","null");
    else{
        jGen.writeFieldName("capabilities");
        jGen.writeStartArray();
        for(OFCapabilities ofCapability : ofCapabilities){
            jGen.writeString(ofCapability.toString());
        }
        jGen.writeEndArray();
    }
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:14,代码来源:IOFSwitchSerializer.java

示例8: setUpFeaturesReply

import org.projectfloodlight.openflow.protocol.OFCapabilities; //导入依赖的package包/类
public void setUpFeaturesReply() {
	portDesc = factory.buildPortDesc()
			.setName("Eth1")
			.setPortNo(OFPort.of(1))
			.build();
	featuresReply = factory.buildFeaturesReply()
			.setDatapathId(dpid)
			.setNBuffers(1)
			.setNTables((short)1)
			.setCapabilities(EnumSet.<OFCapabilities>of(OFCapabilities.FLOW_STATS, OFCapabilities.TABLE_STATS))
			.setAuxiliaryId(OFAuxId.MAIN)
			.build();
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:14,代码来源:OFChannelHandlerVer13Test.java

示例9: getFeaturesReply

import org.projectfloodlight.openflow.protocol.OFCapabilities; //导入依赖的package包/类
@Override
OFFeaturesReply getFeaturesReply() {
    return factory.buildFeaturesReply()
            .setDatapathId(dpid)
            .setNBuffers(1)
            .setNTables((short)1)
            .setCapabilities(EnumSet.<OFCapabilities>of(OFCapabilities.FLOW_STATS, OFCapabilities.TABLE_STATS))
            .setAuxiliaryId(OFAuxId.MAIN)
            .build();
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:11,代码来源:OFSwitchHandshakeHandlerVer13Test.java

示例10: setUpFeaturesReply

import org.projectfloodlight.openflow.protocol.OFCapabilities; //导入依赖的package包/类
public void setUpFeaturesReply() {
   portDesc = factory.buildPortDesc()
            .setName("Eth1")
            .setPortNo(OFPort.of(1))
            .build();
    featuresReply = factory.buildFeaturesReply()
            .setDatapathId(DatapathId.of(0x42L))
            .setNBuffers(1)
            .setNTables((short)1)
            .setCapabilities(EnumSet.<OFCapabilities>of(OFCapabilities.FLOW_STATS, OFCapabilities.TABLE_STATS))
            .setActions(EnumSet.<OFActionType>of(OFActionType.SET_VLAN_PCP))
            .setPorts(ImmutableList.<OFPortDesc>of(portDesc))
            .build();
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:15,代码来源:OFChannelHandlerVer10Test.java

示例11: getFeaturesReply

import org.projectfloodlight.openflow.protocol.OFCapabilities; //导入依赖的package包/类
@Override
OFFeaturesReply getFeaturesReply() {
    OFPortDesc portDesc = factory.buildPortDesc()
            .setName("Eth1")
            .setPortNo(OFPort.of(1))
            .build();
    return factory.buildFeaturesReply()
            .setDatapathId(dpid)
            .setNBuffers(1)
            .setNTables((short)1)
            .setCapabilities(EnumSet.<OFCapabilities>of(OFCapabilities.FLOW_STATS, OFCapabilities.TABLE_STATS))
            .setActions(EnumSet.<OFActionType>of(OFActionType.SET_VLAN_PCP))
            .setPorts(ImmutableList.<OFPortDesc>of(portDesc))
            .build();
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:16,代码来源:OFSwitchHandshakeHandlerVer10Test.java

示例12: setUpFeaturesReply

import org.projectfloodlight.openflow.protocol.OFCapabilities; //导入依赖的package包/类
@Before
public void setUpFeaturesReply() {
    portDesc = factory.buildPortDesc()
            .setName("Eth1")
            .setPortNo(OFPort.of(1))
            .build();
    featuresReply = factory.buildFeaturesReply()
            .setDatapathId(dpid)
            .setNBuffers(1)
            .setNTables((short)1)
            .setCapabilities(EnumSet.<OFCapabilities>of(OFCapabilities.FLOW_STATS, OFCapabilities.TABLE_STATS))
            .setAuxiliaryId(OFAuxId.MAIN)
            .build();
}
 
开发者ID:nsg-ethz,项目名称:iTAP-controller,代码行数:15,代码来源:OFChannelHandlerVer13Test.java

示例13: setUpFeaturesReply

import org.projectfloodlight.openflow.protocol.OFCapabilities; //导入依赖的package包/类
@Before
public void setUpFeaturesReply() {
   portDesc = factory.buildPortDesc()
            .setName("Eth1")
            .setPortNo(OFPort.of(1))
            .build();
    featuresReply = factory.buildFeaturesReply()
            .setDatapathId(DatapathId.of(0x42L))
            .setNBuffers(1)
            .setNTables((short)1)
            .setCapabilities(EnumSet.<OFCapabilities>of(OFCapabilities.FLOW_STATS, OFCapabilities.TABLE_STATS))
            .setActions(EnumSet.<OFActionType>of(OFActionType.SET_VLAN_PCP))
            .setPorts(ImmutableList.<OFPortDesc>of(portDesc))
            .build();
}
 
开发者ID:nsg-ethz,项目名称:iTAP-controller,代码行数:16,代码来源:OFChannelHandlerVer10Test.java


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