本文整理汇总了Java中org.projectfloodlight.openflow.protocol.OFDescStatsReply.getMfrDesc方法的典型用法代码示例。如果您正苦于以下问题:Java OFDescStatsReply.getMfrDesc方法的具体用法?Java OFDescStatsReply.getMfrDesc怎么用?Java OFDescStatsReply.getMfrDesc使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.projectfloodlight.openflow.protocol.OFDescStatsReply
的用法示例。
在下文中一共展示了OFDescStatsReply.getMfrDesc方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getOFSwitchImpl
import org.projectfloodlight.openflow.protocol.OFDescStatsReply; //导入方法依赖的package包/类
/**
* Return an IOFSwitch object based on switch's manufacturer description
* from OFDescStatsReply.
*
* @param desc DescriptionStatistics reply from the switch
* @return A IOFSwitch instance if the driver found an implementation for
* the given description. Otherwise it returns OFSwitchImplBase
*/
public static IOFSwitch getOFSwitchImpl(OFDescStatsReply desc, OFVersion ofv) {
String vendor = desc.getMfrDesc();
String hw = desc.getHwDesc();
if (vendor.startsWith("Stanford University, Ericsson Research and CPqD Research")
&&
hw.startsWith("OpenFlow 1.3 Reference Userspace Switch")) {
return new OFSwitchImplCpqdOSR(desc, cpqdUsePipeline13);
}
if (vendor.contains("Dell")
&&
hw.contains("OpenFlow switch HW ver. 1.0")) {
return new OFSwitchImplDellOSR(desc, cpqdUsePipeline13);
}
if (!disableOvsClassification && vendor.startsWith("Nicira") &&
hw.startsWith("Open vSwitch")) {
if (ofv == OFVersion.OF_10) {
return new OFSwitchImplOVS10(desc);
} else if (ofv == OFVersion.OF_13) {
return new OFSwitchImplOVS13(desc);
}
}
log.warn("DriverManager could not identify switch desc: {}. "
+ "Assigning OFSwitchImplBase", desc);
OFSwitchImplBase base = new OFSwitchImplBase();
base.setSwitchDescription(desc);
// XXX S must set counter here - unidentified switch
return base;
}
示例2: SwitchDescription
import org.projectfloodlight.openflow.protocol.OFDescStatsReply; //导入方法依赖的package包/类
public SwitchDescription(OFDescStatsReply descStatsReply) {
this(descStatsReply.getMfrDesc(), descStatsReply.getHwDesc(),
descStatsReply.getSwDesc(), descStatsReply.getSerialNum(),
descStatsReply.getDpDesc());
}