当前位置: 首页>>代码示例>>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;未经允许,请勿转载。