Class EzControlT10
java.lang.Object
org.harctoolbox.harchardware.misc.EzControlT10
- All Implemented Interfaces:
Closeable
,AutoCloseable
,IWeb
,IHarcHardware
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
An enum consisting of the commands this class understands.static enum
static enum
Interfaces that can be used to command an T10 -
Field Summary
-
Constructor Summary
ConstructorDescriptionEzControlT10
(String hostname) EzControlT10
(String hostname, boolean verbose) EzControlT10
(String hostname, boolean verbose, EzControlT10.Interface interfaze) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
void
generateXml
(File file) void
getConfiguration
(File file) getPresetName
(int n) getPresetStatus
(int n) getPresetString
(int n) int
getStatus
(int n) static String
getTimer
(int n) static String
static String
static String
Returns an URI to be used for browsing the device, possibly containing user and password information.Dummy implementation.static boolean
isPresetCommand
(String cmd) boolean
isValid()
Dummy implementation, always returns truestatic void
void
open()
Opens the device with previously set parameters.powerToggle
(String preset) boolean
sendManual
(EzControlT10.EZSystem system, String house, int device, int value, int arg, int n) boolean
sendManual
(EzControlT10.EZSystem system, String house, int device, EzControlT10.Command cmd, int arg, int n) boolean
sendManual
(EzControlT10.EZSystem system, String house, int device, EzControlT10.Command cmd, int power, int arg, int n) boolean
sendPreset
(int switchNumber, int value) boolean
sendPreset
(int switchNumber, int value, int count) boolean
sendPreset
(int switchNumber, EzControlT10.Command cmd) boolean
sendPreset
(int switchNumber, EzControlT10.Command cmd, int count) void
setDebug
(int debug) Sets a debug parameter.void
setInterface
(EzControlT10.Interface interfaze) void
setTimeout
(int timeout) Set timeout in milliseconds.void
setVerbose
(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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
getUri
Description copied from interface:IWeb
Returns an URI to be used for browsing the device, possibly containing user and password information. -
open
public void open()Description copied from interface:IHarcHardware
Opens the device with previously set parameters.- Specified by:
open
in interfaceIHarcHardware
-
setDebug
public void setDebug(int debug) Description copied from interface:IHarcHardware
Sets a debug parameter. Exact semantic depends on the implementation.- Specified by:
setDebug
in interfaceIHarcHardware
-
setTimeout
public void setTimeout(int timeout) Description copied from interface:IHarcHardware
Set timeout in milliseconds. Exact semantics may be dependent on the hardware.- Specified by:
setTimeout
in interfaceIHarcHardware
- Parameters:
timeout
- Timeout in milliseconds.
-
getVersion
Dummy implementation.- Specified by:
getVersion
in interfaceIHarcHardware
- Returns:
- The String "unknown".
-
isValid
public boolean isValid()Dummy implementation, always returns true- Specified by:
isValid
in interfaceIHarcHardware
- Returns:
- true
-
setVerbose
public void setVerbose(boolean verbose) Description copied from interface:IHarcHardware
Sets 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:
setVerbose
in 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
-