Class EzControlT10
java.lang.Object
org.harctoolbox.harchardware.misc.EzControlT10
- All Implemented Interfaces:
Closeable,AutoCloseable,IWeb,IHarcHardware
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumAn enum consisting of the commands this class understands.static enumstatic enumInterfaces that can be used to command an T10 -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionEzControlT10(String hostname) EzControlT10(String hostname, boolean verbose) EzControlT10(String hostname, boolean verbose, EzControlT10.Interface interfaze) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidgenerateXml(File file) voidgetConfiguration(File file) getPresetName(int n) getPresetStatus(int n) getPresetString(int n) intgetStatus(int n) static StringgetTimer(int n) static Stringstatic Stringstatic StringReturns an URI to be used for browsing the device, possibly containing user and password information.Dummy implementation.static booleanisPresetCommand(String cmd) booleanisValid()Dummy implementation, always returns truestatic voidvoidopen()Opens the device with previously set parameters.powerToggle(String preset) booleansendManual(EzControlT10.EZSystem system, String house, int device, int value, int arg, int n) booleansendManual(EzControlT10.EZSystem system, String house, int device, EzControlT10.Command cmd, int arg, int n) booleansendManual(EzControlT10.EZSystem system, String house, int device, EzControlT10.Command cmd, int power, int arg, int n) booleansendPreset(int switchNumber, int value) booleansendPreset(int switchNumber, int value, int count) booleansendPreset(int switchNumber, EzControlT10.Command cmd) booleansendPreset(int switchNumber, EzControlT10.Command cmd, int count) voidsetDebug(int debug) Sets a debug parameter.voidsetInterface(EzControlT10.Interface interfaze) voidsetTimeout(int timeout) Set timeout in milliseconds.voidsetVerbose(boolean verbose) Sets a verbosity flag, causing commands to be executed verbosely.urlManual(EzControlT10.EZSystem system, String house, int device, int value, int arg, int n) urlPreset(int switchNumber, int value) urlPreset(int switchNumber, EzControlT10.Command cmd)
-
Field Details
-
defaultEzcontrolIP
- See Also:
-
t10NumberPresets
public static final int t10NumberPresets- See Also:
-
t10NumberTimers
public static final int t10NumberTimers- See Also:
-
-
Constructor Details
-
EzControlT10
-
EzControlT10
-
EzControlT10
-
-
Method Details
-
getTimers
-
getTimer
-
getTimer
-
getStatus
-
main
-
isPresetCommand
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
getUri
Description copied from interface:IWebReturns an URI to be used for browsing the device, possibly containing user and password information. -
open
public void open()Description copied from interface:IHarcHardwareOpens the device with previously set parameters.- Specified by:
openin interfaceIHarcHardware
-
setDebug
public void setDebug(int debug) Description copied from interface:IHarcHardwareSets a debug parameter. Exact semantic depends on the implementation.- Specified by:
setDebugin interfaceIHarcHardware
-
setTimeout
public void setTimeout(int timeout) Description copied from interface:IHarcHardwareSet timeout in milliseconds. Exact semantics may be dependent on the hardware.- Specified by:
setTimeoutin interfaceIHarcHardware- Parameters:
timeout- Timeout in milliseconds.
-
getVersion
Dummy implementation.- Specified by:
getVersionin interfaceIHarcHardware- Returns:
- The String "unknown".
-
isValid
public boolean isValid()Dummy implementation, always returns true- Specified by:
isValidin interfaceIHarcHardware- Returns:
- true
-
setVerbose
public void setVerbose(boolean verbose) Description copied from interface:IHarcHardwareSets a verbosity flag, causing commands to be executed verbosely. Exact semantic depends on the implementation. Typically, all communication with the device is echoed to stderr.- Specified by:
setVerbosein interfaceIHarcHardware- Parameters:
verbose- on or off
-
setInterface
-
sendManual
public boolean sendManual(EzControlT10.EZSystem system, String house, int device, int value, int arg, int n) throws HarcHardwareException - Throws:
HarcHardwareException
-
sendManual
public boolean sendManual(EzControlT10.EZSystem system, String house, int device, EzControlT10.Command cmd, int power, int arg, int n) throws HarcHardwareException - Throws:
HarcHardwareException
-
sendManual
public boolean sendManual(EzControlT10.EZSystem system, String house, int device, EzControlT10.Command cmd, int arg, int n) throws HarcHardwareException - Throws:
HarcHardwareException
-
urlManual
-
urlManual
public String urlManual(EzControlT10.EZSystem system, String house, int device, int value, int arg, int n) -
powerToggle
- Throws:
HarcHardwareException
-
sendPreset
- Throws:
HarcHardwareException
-
sendPreset
public boolean sendPreset(int switchNumber, EzControlT10.Command cmd, int count) throws HarcHardwareException - Throws:
HarcHardwareException
-
sendPreset
public boolean sendPreset(int switchNumber, int value) throws IllegalArgumentException, HarcHardwareException -
sendPreset
- Throws:
HarcHardwareException
-
urlPreset
-
urlPreset
- Throws:
IllegalArgumentException
-
getStatus
-
getStatus
public int getStatus(int n) -
getPresetStatus
-
getPresetName
-
getPresetString
-
getTimers
-
getTimer
-
getTimer
-
xmlConfig
-
generateXml
- Throws:
FileNotFoundException
-
getConfiguration
-