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


Java Device類代碼示例

本文整理匯總了Java中org.openhab.binding.maxcube.internal.message.Device的典型用法代碼示例。如果您正苦於以下問題:Java Device類的具體用法?Java Device怎麽用?Java Device使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


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

示例1: findDeviceInList

import org.openhab.binding.maxcube.internal.message.Device; //導入依賴的package包/類
private Device findDeviceInList( String serialNum ) {
	Device dev = null;
	for (Device d : deviceList) {
		if (d.getSerialNumber().equals(serialNum)) {
			dev = d;
			break;
		}
	}
	return dev;
}
 
開發者ID:cyclingengineer,項目名稱:UpnpHomeAutomationBridge,代碼行數:11,代碼來源:CubeConnectionManager.java

示例2: sendSetpointCommand

import org.openhab.binding.maxcube.internal.message.Device; //導入依賴的package包/類
/**
 * Create and send a new setpoint command request
 * @param newSetPoint Setpoint value to send to target
 * @param devSerial Target device serial
 */
public void sendSetpointCommand( String devSerial, int newSetPoint ) {
	S_Command cmd = null;
	ThermostatModeType commandThermoType = ThermostatModeType.MANUAL;
	double setTemp = newSetPoint / 100;		
	Device d = findDeviceInList(devSerial);		
	
	logger.info("Sending setpoint update for device "+devSerial+" to value of "+setTemp);
	cmd = new S_Command(d.getRFAddress(), d.getRoomId(), commandThermoType, setTemp);
	queueCommand(cmd.getCommandString());
}
 
開發者ID:cyclingengineer,項目名稱:UpnpHomeAutomationBridge,代碼行數:16,代碼來源:CubeConnectionManager.java

示例3: findDevice

import org.openhab.binding.maxcube.internal.message.Device; //導入依賴的package包/類
private Device findDevice(String serialNumber, ArrayList<Device> devices) {
	for (Device device : devices) {
		if (device.getSerialNumber().toUpperCase().equals(serialNumber)) {
			return device;
		}
	}
	return null;
}
 
開發者ID:andrey-desman,項目名稱:openhab-hdl,代碼行數:9,代碼來源:MaxCubeBinding.java

示例4: logAvailableMaxDevices

import org.openhab.binding.maxcube.internal.message.Device; //導入依賴的package包/類
private void logAvailableMaxDevices() {
    if (logger.isDebugEnabled()) {
        StringBuilder sb = new StringBuilder();
        sb.append("Available MAX! devices are:");
        for (Device d : devices) {
            sb.append("\n\t");
            sb.append(d.getSerialNumber());
        }
        logger.debug(sb.toString());
    }
}
 
開發者ID:openhab,項目名稱:openhab1-addons,代碼行數:12,代碼來源:MaxCubeBinding.java

示例5: findDevice

import org.openhab.binding.maxcube.internal.message.Device; //導入依賴的package包/類
private Device findDevice(String serialNumber, List<Device> devices) {
    for (Device device : devices) {
        if (device.getSerialNumber().toUpperCase().equals(serialNumber)) {
            return device;
        }
    }
    return null;
}
 
開發者ID:openhab,項目名稱:openhab1-addons,代碼行數:9,代碼來源:MaxCubeBinding.java

示例6: CubeConnectionManager

import org.openhab.binding.maxcube.internal.message.Device; //導入依賴的package包/類
public CubeConnectionManager(ArrayList<Device> deviceList, String cubeIp, int cubePort) {		
	this.deviceList = deviceList;
	this.cubeIp = cubeIp;
	this.cubePort = cubePort;
}
 
開發者ID:cyclingengineer,項目名稱:UpnpHomeAutomationBridge,代碼行數:6,代碼來源:CubeConnectionManager.java


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