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


Java DriverData类代码示例

本文整理汇总了Java中org.onosproject.net.driver.DriverData的典型用法代码示例。如果您正苦于以下问题:Java DriverData类的具体用法?Java DriverData怎么用?Java DriverData使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


DriverData类属于org.onosproject.net.driver包,在下文中一共展示了DriverData类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: connectStandbyDevice

import org.onosproject.net.driver.DriverData; //导入依赖的package包/类
private void connectStandbyDevice(DeviceId deviceId) {

        //if device is pipeline programmable we merge pipeconf + base driver for every other role
        GeneralProviderDeviceConfig providerConfig =
                cfgService.getConfig(deviceId, GeneralProviderDeviceConfig.class);

        Driver driver = getDriver(deviceId);


        DriverData driverData = new DefaultDriverData(driver, deviceId);
        DeviceHandshaker handshaker = getBehaviour(driver, DeviceHandshaker.class, driverData);
        if (handshaker == null) {
            log.error("Device {}, with driver {} does not support DeviceHandshaker " +
                    "behaviour, supported behaviours={}", deviceId, driver.name(), driver.behaviours());
            return;
        }
        addConfigData(providerConfig, driverData);

        //Connecting to the device
        handshaker.connect().thenAcceptAsync(result -> {
            if (result) {
                handlePipeconf(deviceId, driver, driverData, false);
            }
        });
    }
 
开发者ID:opennetworkinglab,项目名称:onos,代码行数:26,代码来源:GeneralDeviceProvider.java

示例2: getBehaviour

import org.onosproject.net.driver.DriverData; //导入依赖的package包/类
private <T extends Behaviour> T getBehaviour(Driver driver, Class<T> type,
                                             DriverData data) {
    if (driver != null && driver.hasBehaviour(type)) {
        DefaultDriverHandler handler = new DefaultDriverHandler(data);
        return driver.createBehaviour(handler, type);
    } else {
        return null;
    }
}
 
开发者ID:opennetworkinglab,项目名称:onos,代码行数:10,代码来源:GeneralDeviceProvider.java

示例3: addConfigData

import org.onosproject.net.driver.DriverData; //导入依赖的package包/类
private void addConfigData(GeneralProviderDeviceConfig providerConfig, DriverData driverData) {
    //Storing deviceKeyId and all other config values
    // as data in the driver with protocol_<info>
    // name as the key. e.g protocol_ip
    providerConfig.protocolsInfo()
            .forEach((protocol, deviceInfoConfig) -> {
                deviceInfoConfig.configValues()
                        .forEach((k, v) -> driverData.set(protocol + "_" + k, v));
                driverData.set(protocol + "_key", deviceInfoConfig.deviceKeyId());
            });
}
 
开发者ID:opennetworkinglab,项目名称:onos,代码行数:12,代码来源:GeneralDeviceProvider.java

示例4: data

import org.onosproject.net.driver.DriverData; //导入依赖的package包/类
@Override
public DriverData data() {
    return null;
}
 
开发者ID:shlee89,项目名称:athena,代码行数:5,代码来源:OpenflowSwitchDriverAdapter.java

示例5: setData

import org.onosproject.net.driver.DriverData; //导入依赖的package包/类
@Override
public void setData(DriverData data) {
}
 
开发者ID:shlee89,项目名称:athena,代码行数:4,代码来源:MockExtensionSelectorResolver.java

示例6: createBehaviour

import org.onosproject.net.driver.DriverData; //导入依赖的package包/类
@Override
@SuppressWarnings("unchecked")
public <T extends Behaviour> T createBehaviour(DriverData data, Class<T> behaviourClass) {
    return (T) new TestPipeliner();
}
 
开发者ID:shlee89,项目名称:athena,代码行数:6,代码来源:FlowObjectiveManagerTest.java

示例7: data

import org.onosproject.net.driver.DriverData; //导入依赖的package包/类
@Override
public DriverData data() {
    return mockDriverData;
}
 
开发者ID:opennetworkinglab,项目名称:onos,代码行数:5,代码来源:MockDriverHandler.java

示例8: data

import org.onosproject.net.driver.DriverData; //导入依赖的package包/类
@Override
public DriverData data() {
    // Just create a fake driver data
    return new DefaultDriverData(null, deviceId);
}
 
开发者ID:opennetworkinglab,项目名称:onos,代码行数:6,代码来源:OpenFlowPolicerConfigurableTest.java

示例9: setData

import org.onosproject.net.driver.DriverData; //导入依赖的package包/类
@Override
public void setData(DriverData data) {

}
 
开发者ID:shlee89,项目名称:athena,代码行数:5,代码来源:OpenflowSwitchDriverAdapter.java

示例10: asData

import org.onosproject.net.driver.DriverData; //导入依赖的package包/类
/**
 * Returns self as an immutable driver data instance.
 *
 * @return self as driver data
 */
protected DriverData asData() {
    return new DeviceDriverData();
}
 
开发者ID:shlee89,项目名称:athena,代码行数:9,代码来源:DefaultDevice.java

示例11: asData

import org.onosproject.net.driver.DriverData; //导入依赖的package包/类
/**
 * Returns self as an immutable driver data instance.
 *
 * @return self as driver data
 */
protected DriverData asData() {
    return new AnnotationDriverData();
}
 
开发者ID:shlee89,项目名称:athena,代码行数:9,代码来源:AbstractProjectableModel.java

示例12: FujitsuDriverHandlerAdapter

import org.onosproject.net.driver.DriverData; //导入依赖的package包/类
/**
 * Creates new driver handler with the attached driver data.
 *
 * @param data driver data to attach
 */
public FujitsuDriverHandlerAdapter(DriverData data) {
    super(data);
}
 
开发者ID:opennetworkinglab,项目名称:onos,代码行数:9,代码来源:FujitsuDriverHandlerAdapter.java


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