|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.jpeterson.x10.module.Macro
A macro, when triggered by being initiated by a TimerInitiator
or MacroInitiator
, will issue X10 events. A macro's execution
can be delayed up to 4 hours once it is initiaited. A macro contains one or
more macro element. Each macro element is an X10 function. When the macro
executes, all of the macro's MacroElement function's will be executed.
Constructor Summary | |
Macro()
Create a new macro with no timer offset. |
|
Macro(int timerOffset)
Create a new macro. |
Method Summary | |
void |
addCommand(FunctionEvent function)
Add a command for this macro to execute. |
void |
addCommand(int device,
FunctionEvent function)
Add a command for this macro to execute. |
void |
addCommand(int device,
FunctionEvent function,
boolean brightenFirst)
Add a command for this macro to execute. |
java.util.Enumeration |
elements()
Returns an enumeration of the MacroElements for this macro. |
boolean |
equals(java.lang.Object object)
Determine if this Macro is equal to the target object. |
byte[] |
getBytes()
Get the byte array representing this macro and all of its macro elements. |
int |
getTimerOffset()
Retrieve the macro's timer offset value. |
void |
removeElement(MacroElement element)
This method provides a way to remove a macro element from the macro. |
Methods inherited from class java.lang.Object |
clone,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public Macro()
public Macro(int timerOffset)
timerOffset
- Offset in minutes from the time at which the macro is
called to the time when the macro actually takes effect. 0 to
240 minutes (4 hours).Method Detail |
public int getTimerOffset()
public void addCommand(int device, FunctionEvent function) throws java.lang.IllegalArgumentException
device
- Device number. Must be between 1 and 16, inclusive.function
- A FunctionEvent for a command that the macro will execute.
For proper use in this case for a macro, the source of the X10Event
will be ignored.public void addCommand(int device, FunctionEvent function, boolean brightenFirst) throws java.lang.IllegalArgumentException
device
- Device number. Must be between 1 and 16, inclusive.function
- A FunctionEvent for a command that the macro will execute.
For proper use in this case for a macro, the source of the X10Event
will be ignored.brightenFirst
- If true and Functin Event is a dim or bright command,
the device will be brought to maximum brightness before applying the
dim amount. This functionality is global per dim/bright command per
macro. It is updated each time a device is added.public void addCommand(FunctionEvent function)
function
- A FunctionEvent command that the macro will execute.
For proper use in this case for a macro, the source of the X10Event
will be ignored.public void removeElement(MacroElement element)
elements
method.element
- the macro element to remove.public java.util.Enumeration elements()
public boolean equals(java.lang.Object object)
object
- Target object to determine if it is equal to this Macro.public byte[] getBytes()
src
array could not be stored into the dest
array
because of a type mismatch.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |