當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。