• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java OFObject类的典型用法和代码示例

java 3次浏览

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

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

示例1: getPortsOf

点赞 2

import org.projectfloodlight.openflow.protocol.OFObject; //导入依赖的package包/类
@Override
public List<? extends OFObject> getPortsOf(PortDescPropertyType type) {
    if (!type.equals(PortDescPropertyType.OPTICAL_TRANSPORT)) {
        return Collections.EMPTY_LIST;
    }

    return opticalPorts;
}
 

开发者ID:shlee89,
项目名称:athena,
代码行数:9,
代码来源:OfOpticalSwitchImplLinc13.java

示例2: getPortDescType

点赞 2

import org.projectfloodlight.openflow.protocol.OFObject; //导入依赖的package包/类
/**
 * Find oplink port description type from optical ports.
 *
 * @param opsw switch
 * @param portNum the port number
 * @return port oplink port description type
 */
private PortDescType getPortDescType(OpenFlowOpticalSwitch opsw, PortNumber portNum) {
    for (PortDescPropertyType type : opsw.getPortTypes()) {
        List<? extends OFObject> portsOf = opsw.getPortsOf(type);
        for (OFObject op : portsOf) {
            if (op instanceof OFPortOptical) {
                OFPortOptical opticalPort = (OFPortOptical) op;
                if ((long) opticalPort.getPortNo().getPortNumber() == portNum.toLong()) {
                    return PortDescType.values()[opticalPort.getDesc().get(0).getPortType()];
                }
            }
        }
    }
    return PortDescType.NONE;
}
 

开发者ID:opennetworkinglab,
项目名称:onos,
代码行数:22,
代码来源:OplinkPowerConfigUtil.java

示例3: getPortsOf

点赞 2

import org.projectfloodlight.openflow.protocol.OFObject; //导入依赖的package包/类
@Override
public List<? extends OFObject> getPortsOf(PortDescPropertyType type) {
    // Expected type is OPTICAL_TRANSPORT
    if (type == PortDescPropertyType.OPTICAL_TRANSPORT) {
        return ImmutableList.copyOf(opticalPorts);
    }
    // Any other type, return empty
    log.warn("Unexpected port description property type: {}", type);
    return ImmutableList.of();
}
 

开发者ID:opennetworkinglab,
项目名称:onos,
代码行数:11,
代码来源:OplinkRoadmHandshaker.java

示例4: getPortsOf

点赞 2

import org.projectfloodlight.openflow.protocol.OFObject; //导入依赖的package包/类
@Override
public List<? extends OFObject> getPortsOf(PortDescPropertyType type) {
    if (!type.equals(PortDescPropertyType.OPTICAL_TRANSPORT)) {
        return ImmutableList.of();
    }

    return opticalPorts;
}
 

开发者ID:opennetworkinglab,
项目名称:onos,
代码行数:9,
代码来源:OfOpticalSwitchImplLinc13.java

示例5: buildPortDescription

点赞 2

import org.projectfloodlight.openflow.protocol.OFObject; //导入依赖的package包/类
private PortDescription buildPortDescription(PortDescPropertyType ptype, OFObject port,
        OpenFlowOpticalSwitch opsw) {
    if (port instanceof OFPortOptical) {
        return buildPortDescription(ptype, (OFPortOptical) port, opsw);
    }
    return buildPortDescription(ptype, (OFExpPort) port);
}
 

开发者ID:opennetworkinglab,
项目名称:onos,
代码行数:8,
代码来源:OpenFlowDeviceProvider.java

示例6: getPortsOf

点赞 2

import org.projectfloodlight.openflow.protocol.OFObject; //导入依赖的package包/类
@Override
public List<? extends OFObject> getPortsOf(PortDescPropertyType type) {
    return ImmutableList.copyOf(expPortDes);
}
 

开发者ID:shlee89,
项目名称:athena,
代码行数:5,
代码来源:OFOpticalSwitch13.java

示例7: getPortsOf

点赞 2

import org.projectfloodlight.openflow.protocol.OFObject; //导入依赖的package包/类
@Override
public List<? extends OFObject> getPortsOf(PortDescPropertyType type) {
    return ImmutableList.copyOf(opticalPorts);
}
 

开发者ID:shlee89,
项目名称:athena,
代码行数:5,
代码来源:OplinkRoadmHandshaker.java

示例8: getPortsOf

点赞 2

import org.projectfloodlight.openflow.protocol.OFObject; //导入依赖的package包/类
@Override
public List<? extends OFObject> getPortsOf(PortDescPropertyType type) {
    return ImmutableList.copyOf(fiberPorts);
}
 

开发者ID:shlee89,
项目名称:athena,
代码行数:5,
代码来源:CalientFiberSwitchHandshaker.java

示例9: buildPortDescription

点赞 2

import org.projectfloodlight.openflow.protocol.OFObject; //导入依赖的package包/类
private PortDescription buildPortDescription(PortDescPropertyType ptype, OFObject port) {
    if (port instanceof OFPortOptical) {
        return buildPortDescription(ptype, (OFPortOptical) port);
    }
    return buildPortDescription(ptype, (OFExpPort) port);
}
 

开发者ID:shlee89,
项目名称:athena,
代码行数:7,
代码来源:OpenFlowDeviceProvider.java

示例10: getPortsOf

点赞 1

import org.projectfloodlight.openflow.protocol.OFObject; //导入依赖的package包/类
/**
 * Return a list of interfaces (ports) of the type associated with this
 * OpenFlow switch.
 *
 * @param type The port description property type of requested ports
 * @return A potentially empty list of ports.
 */
List<? extends OFObject> getPortsOf(PortDescPropertyType type);
 

开发者ID:shlee89,
项目名称:athena,
代码行数:9,
代码来源:WithTypedPorts.java

示例11: isOF13OrLater

点赞 1

import org.projectfloodlight.openflow.protocol.OFObject; //导入依赖的package包/类
/**
 * @param obj OpenFlow object to test
 * @return true if OFObject is OF_13 or later
 */
private static boolean isOF13OrLater(OFObject obj) {
    return obj.getVersion().wireVersion >= OFVersion.OF_13.wireVersion;
}
 

开发者ID:opennetworkinglab,
项目名称:onos,
代码行数:8,
代码来源:FlowEntryBuilder.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)