本文整理汇总了Java中org.onosproject.net.CltSignalType.CLT_100GBE属性的典型用法代码示例。如果您正苦于以下问题:Java CltSignalType.CLT_100GBE属性的具体用法?Java CltSignalType.CLT_100GBE怎么用?Java CltSignalType.CLT_100GBE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.onosproject.net.CltSignalType
的用法示例。
在下文中一共展示了CltSignalType.CLT_100GBE属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: parseT100OduPort
private static PortDescription parseT100OduPort(HierarchicalConfiguration cfg, long count) {
PortNumber portNumber = PortNumber.portNumber(count);
HierarchicalConfiguration ethernetConfig = cfg.configurationAt("ethernet");
boolean enabled = ethernetConfig.getString("administrative-state").equals("up");
//Rate is in kbps
CltSignalType signalType = ethernetConfig.getString("rate").equals("100000000") ?
CltSignalType.CLT_100GBE : null;
DefaultAnnotations annotations = DefaultAnnotations.builder().
set(AnnotationKeys.PORT_NAME, cfg.getString("name")).
build();
return oduCltPortDescription(portNumber, enabled, signalType, annotations);
}
示例2: buildOduCltPortDescription
private PortDescription buildOduCltPortDescription(OFPortDesc port) {
PortNumber portNo = PortNumber.portNumber(port.getPortNo().getPortNumber());
boolean enabled = !port.getState().contains(OFPortState.LINK_DOWN) &&
!port.getConfig().contains(OFPortConfig.PORT_DOWN);
Long portSpeedInMbps = portSpeed(port);
CltSignalType sigType = null;
switch (portSpeedInMbps.toString()) {
case "1000":
sigType = CltSignalType.CLT_1GBE;
break;
case "10000":
sigType = CltSignalType.CLT_10GBE;
break;
case "40000":
sigType = CltSignalType.CLT_40GBE;
break;
case "100000":
sigType = CltSignalType.CLT_100GBE;
break;
default:
throw new RuntimeException("Un recognize OduClt speed: " + portSpeedInMbps.toString());
}
SparseAnnotations annotations = buildOduCltAnnotation(port);
return oduCltPortDescription(portNo, enabled, sigType, annotations);
}
示例3: parseT100OduPort
private static PortDescription parseT100OduPort(HierarchicalConfiguration cfg, long count) {
PortNumber portNumber = PortNumber.portNumber(count);
HierarchicalConfiguration ethernetConfig = cfg.configurationAt("ethernet");
boolean enabled = "up".equals(ethernetConfig.getString("administrative-state"));
//Rate is in kbps
CltSignalType signalType = "100000000".equals(ethernetConfig.getString("rate")) ?
CltSignalType.CLT_100GBE : null;
DefaultAnnotations annotations = DefaultAnnotations.builder().
set(AnnotationKeys.PORT_NAME, cfg.getString("name")).
build();
return oduCltPortDescription(portNumber, enabled, signalType, annotations);
}
示例4: buildOduCltPortDescription
private PortDescription buildOduCltPortDescription(OFPortDesc port) {
PortNumber portNo = PortNumber.portNumber(port.getPortNo().getPortNumber());
boolean enabled = !port.getState().contains(OFPortState.LINK_DOWN) &&
!port.getConfig().contains(OFPortConfig.PORT_DOWN);
Long portSpeedInMbps = portSpeed(port);
CltSignalType sigType = null;
switch (portSpeedInMbps.toString()) {
case "1000":
sigType = CltSignalType.CLT_1GBE;
break;
case "10000":
sigType = CltSignalType.CLT_10GBE;
break;
case "40000":
sigType = CltSignalType.CLT_40GBE;
break;
case "100000":
sigType = CltSignalType.CLT_100GBE;
break;
default:
throw new IllegalArgumentException("Un recognize OduClt speed: " + portSpeedInMbps.toString());
}
SparseAnnotations annotations = buildOduCltAnnotation(port);
return oduCltPortDescription(portNo, enabled, sigType, annotations);
}
示例5: createOduCltPort
private static Port createOduCltPort(Device device, ConnectPoint cp) {
return new DefaultOduCltPort(new DefaultPort(device, cp.port(), true),
CltSignalType.CLT_100GBE);
}