本文整理汇总了Java中org.openflow.protocol.statistics.OFDescriptionStatistics.getManufacturerDescription方法的典型用法代码示例。如果您正苦于以下问题:Java OFDescriptionStatistics.getManufacturerDescription方法的具体用法?Java OFDescriptionStatistics.getManufacturerDescription怎么用?Java OFDescriptionStatistics.getManufacturerDescription使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.openflow.protocol.statistics.OFDescriptionStatistics
的用法示例。
在下文中一共展示了OFDescriptionStatistics.getManufacturerDescription方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: SwitchSyncRepresentation
import org.openflow.protocol.statistics.OFDescriptionStatistics; //导入方法依赖的package包/类
public SwitchSyncRepresentation(OFFeaturesReply fr,
OFDescriptionStatistics d) {
this.dpid = fr.getDatapathId();
this.buffers = fr.getBuffers();
this.tables = fr.getTables();
this.capabilities = fr.getCapabilities();
this.actions = fr.getActions();
this.ports = toSyncedPortList(
ImmutablePort.immutablePortListOf(fr.getPorts()));
this.manufacturerDescription = d.getManufacturerDescription();
this.hardwareDescription = d.getHardwareDescription();
this.softwareDescription = d.getSoftwareDescription();
this.serialNumber = d.getSerialNumber();
this.datapathDescription = d.getDatapathDescription();
}
示例2: getOFSwitchImpl
import org.openflow.protocol.statistics.OFDescriptionStatistics; //导入方法依赖的package包/类
@Override
public IOFSwitch getOFSwitchImpl(String regis_desc,
OFDescriptionStatistics description) {
String model = description.getDatapathDescription();
if (regis_desc.startsWith("big switch networks")) {
// BigTest Mininet, avoid OVS optimization
if (model.startsWith("bigtest")) {
return new BetterOFSwitchImpl();
}
}
if (regis_desc.equals("Big Switch Networks")) {
if (description.getHardwareDescription().startsWith("Open vSwitch")) {
return new BetterOFSwitchBSNOVS();
} else if (description.getHardwareDescription().startsWith("Xenon")) {
return new BetterOFSwitchXenon();
}
}
if (regis_desc.equals("")) {
String vendor = description.getManufacturerDescription();
String make = description.getHardwareDescription();
// Production OVS, optimize topology probing
if (vendor.startsWith("Nicira") &&
make.startsWith("Open vSwitch")) {
return new BetterOFSwitchOVS();
}
return new BetterOFSwitchImpl();
}
log.warn("Unknown model registered: " + regis_desc);
return null;
}