當前位置: 首頁>>代碼示例>>Java>>正文


Java HmInterface.CUXD屬性代碼示例

本文整理匯總了Java中org.openhab.binding.homematic.internal.model.HmInterface.CUXD屬性的典型用法代碼示例。如果您正苦於以下問題:Java HmInterface.CUXD屬性的具體用法?Java HmInterface.CUXD怎麽用?Java HmInterface.CUXD使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在org.openhab.binding.homematic.internal.model.HmInterface的用法示例。


在下文中一共展示了HmInterface.CUXD屬性的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: setChannelDatapointValues

/**
 * Sets all datapoint values for the given channel.
 */
public void setChannelDatapointValues(HmChannel channel, HmParamsetType paramsetType) throws IOException {
    RpcRequest<T> request = createRpcRequest("getParamset");
    request.addArg(getRpcAddress(channel.getDevice().getAddress()) + ":" + channel.getNumber());
    request.addArg(paramsetType.toString());
    if (channel.getDevice().getHmInterface() == HmInterface.CUXD && paramsetType == HmParamsetType.VALUES) {
        setChannelDatapointValues(channel);
    } else {
        try {
            new GetParamsetParser(channel, paramsetType).parse(sendMessage(config.getRpcPort(channel), request));
        } catch (UnknownRpcFailureException ex) {
            if (paramsetType == HmParamsetType.VALUES) {
                logger.debug(
                        "RpcResponse unknown RPC failure (-1 Failure), fetching values with another API method for device: {}, channel: {}, paramset: {}",
                        channel.getDevice().getAddress(), channel.getNumber(), paramsetType);
                setChannelDatapointValues(channel);
            } else {
                throw ex;
            }
        }
    }
}
 
開發者ID:openhab,項目名稱:openhab2-addons,代碼行數:24,代碼來源:RpcClient.java

示例2: initialize

@Override
public void initialize(HmDevice device) {
    if (device.getType().startsWith(DEVICE_TYPE_19_REMOTE_CONTROL)
            && !(device.getHmInterface() == HmInterface.CUXD)) {
        addDatapoint(device, 18, getName(), HmValueType.STRING, null, false);
    }
}
 
開發者ID:openhab,項目名稱:openhab2-addons,代碼行數:7,代碼來源:DisplayOptionsVirtualDatapointHandler.java

示例3: initialize

@Override
public void initialize(HmDevice device) {
    if (!device.isGatewayExtras() && !(device.getHmInterface() == HmInterface.CUXD)) {
        HmDatapoint dp = addDatapoint(device, 0, getName(), HmValueType.ENUM, 0, false);
        dp.setOptions(new String[] { MODE_LOCKED, MODE_RESET, MODE_FORCE, MODE_DEFER });
        dp.setMinValue(0);
        dp.setMaxValue(dp.getOptions().length - 1);
    }
}
 
開發者ID:openhab,項目名稱:openhab2-addons,代碼行數:9,代碼來源:DeleteDeviceModeVirtualDatapointHandler.java

示例4: loadRssiValues

@Override
public void loadRssiValues() throws IOException {
    for (HmInterface hmInterface : availableInterfaces.keySet()) {
        if (hmInterface == HmInterface.RF || hmInterface == HmInterface.CUXD) {
            List<HmRssiInfo> rssiInfos = getRpcClient(hmInterface).loadRssiInfo(hmInterface);
            for (HmRssiInfo hmRssiInfo : rssiInfos) {
                updateRssiInfo(hmRssiInfo.getAddress(), DATAPOINT_NAME_RSSI_DEVICE, hmRssiInfo.getDevice());
                updateRssiInfo(hmRssiInfo.getAddress(), DATAPOINT_NAME_RSSI_PEER, hmRssiInfo.getPeer());
            }
        }
    }
}
 
開發者ID:openhab,項目名稱:openhab2-addons,代碼行數:12,代碼來源:AbstractHomematicGateway.java

示例5: initialize

@Override
public void initialize(HmDevice device) {
    if (!device.isGatewayExtras() && !(device.getHmInterface() == HmInterface.CUXD)) {
        addDatapoint(device, 0, getName(), HmValueType.BOOL, Boolean.FALSE, false);
    }
}
 
開發者ID:openhab,項目名稱:openhab2-addons,代碼行數:6,代碼來源:DeleteDeviceVirtualDatapointHandler.java


注:本文中的org.openhab.binding.homematic.internal.model.HmInterface.CUXD屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。