本文整理汇总了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;
}
示例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());
}
示例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;
}
示例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());
}
}
示例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;
}
示例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;
}