public class WolSwitch extends Object implements io.github.hapjava.accessories.SwitchAccessory, io.github.hapjava.accessories.optionalcharacteristic.AccessoryWithHardwareRevision
| 构造器和说明 |
|---|
WolSwitch(int id,
String ipAddress,
String macAddress) |
WolSwitch(int id,
String ipAddress,
String macAddress,
PlatformEnum platform) |
| 限定符和类型 | 方法和说明 |
|---|---|
CompletableFuture<String> |
getFirmwareRevision() |
CompletableFuture<String> |
getHardwareRevision() |
int |
getId() |
String |
getIpAddress() |
String |
getMacAddress() |
CompletableFuture<String> |
getManufacturer() |
CompletableFuture<String> |
getModel() |
CompletableFuture<String> |
getName() |
CompletableFuture<String> |
getSerialNumber() |
CompletableFuture<Boolean> |
getSwitchState()
Retrieves the current binary state of the switch.
|
void |
identify() |
void |
setIpAddress(String ipAddress) |
void |
setMacAddress(String macAddress) |
CompletableFuture<Void> |
setSwitchState(boolean state)
Sets the binary state of the switch
|
void |
subscribeSwitchState(io.github.hapjava.characteristics.HomekitCharacteristicChangeCallback callback)
Subscribes to changes in the binary state of the switch.
|
void |
unsubscribeSwitchState()
Unsubscribes from changes in the binary state of the switch.
|
public WolSwitch(int id,
String ipAddress,
String macAddress,
PlatformEnum platform)
public int getId()
getId 在接口中 io.github.hapjava.accessories.HomekitAccessorypublic String getIpAddress()
public void setIpAddress(String ipAddress)
public String getMacAddress()
public void setMacAddress(String macAddress)
public CompletableFuture<String> getName()
getName 在接口中 io.github.hapjava.accessories.HomekitAccessorypublic void identify()
identify 在接口中 io.github.hapjava.accessories.HomekitAccessorypublic CompletableFuture<String> getSerialNumber()
getSerialNumber 在接口中 io.github.hapjava.accessories.HomekitAccessorypublic CompletableFuture<String> getModel()
getModel 在接口中 io.github.hapjava.accessories.HomekitAccessorypublic CompletableFuture<String> getManufacturer()
getManufacturer 在接口中 io.github.hapjava.accessories.HomekitAccessorypublic CompletableFuture<String> getFirmwareRevision()
getFirmwareRevision 在接口中 io.github.hapjava.accessories.HomekitAccessorypublic CompletableFuture<String> getHardwareRevision()
getHardwareRevision 在接口中 io.github.hapjava.accessories.optionalcharacteristic.AccessoryWithHardwareRevisionpublic CompletableFuture<Boolean> getSwitchState()
getSwitchState 在接口中 io.github.hapjava.accessories.SwitchAccessorypublic CompletableFuture<Void> setSwitchState(boolean state) throws Exception
setSwitchState 在接口中 io.github.hapjava.accessories.SwitchAccessorystate - the binary state to setException - when the change cannot be madepublic void subscribeSwitchState(io.github.hapjava.characteristics.HomekitCharacteristicChangeCallback callback)
subscribeSwitchState 在接口中 io.github.hapjava.accessories.SwitchAccessorycallback - the function to call when the state changes.public void unsubscribeSwitchState()
unsubscribeSwitchState 在接口中 io.github.hapjava.accessories.SwitchAccessoryCopyright © 2021. All rights reserved.