本文整理匯總了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;
}