当前位置: 首页>>代码示例>>Java>>正文


Java CltSignalType.CLT_100GBE属性代码示例

本文整理汇总了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);
}
 
开发者ID:shlee89,项目名称:athena,代码行数:12,代码来源:PortGetterFujitsuImpl.java

示例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);
}
 
开发者ID:shlee89,项目名称:athena,代码行数:27,代码来源:OpenFlowDeviceProvider.java

示例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);
}
 
开发者ID:opennetworkinglab,项目名称:onos,代码行数:12,代码来源:FujitsuT100DeviceDescription.java

示例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);
}
 
开发者ID:opennetworkinglab,项目名称:onos,代码行数:27,代码来源:OpenFlowDeviceProvider.java

示例5: createOduCltPort

private static Port createOduCltPort(Device device, ConnectPoint cp) {
    return new DefaultOduCltPort(new DefaultPort(device, cp.port(), true),
            CltSignalType.CLT_100GBE);
}
 
开发者ID:opennetworkinglab,项目名称:onos,代码行数:4,代码来源:OpticalPathProvisionerTest.java


注:本文中的org.onosproject.net.CltSignalType.CLT_100GBE属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。