Java 类org.projectfloodlight.openflow.protocol.OFObject 实例源码

项目:athena    文件:OfOpticalSwitchImplLinc13.java   
@Override
public List<? extends OFObject> getPortsOf(PortDescPropertyType type) {
    if (!type.equals(PortDescPropertyType.OPTICAL_TRANSPORT)) {
        return Collections.EMPTY_LIST;
    }

    return opticalPorts;
}
项目:onos    文件:OplinkPowerConfigUtil.java   
/**
 * 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;
}
项目:onos    文件:OplinkRoadmHandshaker.java   
@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();
}
项目:onos    文件:OfOpticalSwitchImplLinc13.java   
@Override
public List<? extends OFObject> getPortsOf(PortDescPropertyType type) {
    if (!type.equals(PortDescPropertyType.OPTICAL_TRANSPORT)) {
        return ImmutableList.of();
    }

    return opticalPorts;
}
项目:onos    文件:OplinkEdfaHandshaker.java   
@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();
}
项目:onos    文件:OpenFlowDeviceProvider.java   
private PortDescription buildPortDescription(PortDescPropertyType ptype, OFObject port,
        OpenFlowOpticalSwitch opsw) {
    if (port instanceof OFPortOptical) {
        return buildPortDescription(ptype, (OFPortOptical) port, opsw);
    }
    return buildPortDescription(ptype, (OFExpPort) port);
}
项目:athena    文件:OFOpticalSwitch13.java   
@Override
public List<? extends OFObject> getPortsOf(PortDescPropertyType type) {
    return ImmutableList.copyOf(expPortDes);
}
项目:athena    文件:OplinkRoadmHandshaker.java   
@Override
public List<? extends OFObject> getPortsOf(PortDescPropertyType type) {
    return ImmutableList.copyOf(opticalPorts);
}
项目:athena    文件:CalientFiberSwitchHandshaker.java   
@Override
public List<? extends OFObject> getPortsOf(PortDescPropertyType type) {
    return ImmutableList.copyOf(fiberPorts);
}
项目:athena    文件:OpenFlowDeviceProvider.java   
private PortDescription buildPortDescription(PortDescPropertyType ptype, OFObject port) {
    if (port instanceof OFPortOptical) {
        return buildPortDescription(ptype, (OFPortOptical) port);
    }
    return buildPortDescription(ptype, (OFExpPort) port);
}
项目:onos    文件:OFOpticalSwitch13.java   
@Override
public List<? extends OFObject> getPortsOf(PortDescPropertyType type) {
    return ImmutableList.copyOf(expPortDes);
}
项目:onos    文件:OplinkSwitchHandshaker.java   
@Override
public List<? extends OFObject> getPortsOf(PortDescPropertyType type) {
    return ImmutableList.copyOf(opticalPorts);
}
项目:onos    文件:CalientFiberSwitchHandshaker.java   
@Override
public List<? extends OFObject> getPortsOf(PortDescPropertyType type) {
    return ImmutableList.copyOf(fiberPorts);
}
项目:athena    文件:WithTypedPorts.java   
/**
 * 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);
项目:onos    文件:WithTypedPorts.java   
/**
 * 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);
项目:onos    文件:FlowEntryBuilder.java   
/**
 * @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;
}