|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.wcb.autohome.implementations.MacroTrigger
Filename: $Id: MacroTrigger.java,v 1.4 2004/02/28 00:21:49 wbogaardt Exp $ Abstract: This is the triggering event that will cause a macro and its associated events to execut. A trigger can be thought of as an action sent or started by an X10Module or a time period being met. Macro triggers are capable of running only on CM11A enabled interfaces. CM17A devices do not have any capability to store information or macros. If you want to run timed events with the CM17A then you are required to have a program running constantly such as a daemon. This also means that your computer is always on. $Log: MacroTrigger.java,v $ Revision 1.4 2004/02/28 00:21:49 wbogaardt fixed formating to be compliant with sun coding convention Revision 1.3 2004/01/15 21:05:20 wbogaardt major revamp of Modules and interfaces changes overall structure of how information is stored Revision 1.2 2003/10/10 21:39:07 wbogaardt modified macro triggers to use calendar in stead of strings
Field Summary |
Fields inherited from interface org.wcb.autohome.interfaces.X10DeviceConstants |
APPLIANCE_MODULE_OFF, APPLIANCE_MODULE_ON, BAUD, BAUD_RATE_ARRAY, BRIGHT_ACTION, BROWSER, CM11A_TRANSMITTER, CM17A_TRANSMITTER, CONNECT_ON_START, COUNTRY, DATA_BIT, DATA_BITS_ARRAY, DEVICE_ARRAY, DIM_ACTION, EMAIL_AUTHORIZE, EMAIL_FREQUENCY, EMAIL_FROM, EMAIL_PASSWORD, EMAIL_SMTP, EMAIL_TO, EMAIL_USERNAME, FALSE, HOUSE_CODES_ARRAY, INTERFACE_TYPE, LAMP_MODULE_OFF, LAMP_MODULE_ON, LANGUAGE, LAST_FILE, LOCALHOST, LOOK_AND_FEEL, MAC, METAL, MOTIF, OFF_ACTION, ON_ACTION, PARITY, PARITY_ARRAY, RECOVER_CM11A, RMI_HOST, SEPARATOR, SERIAL_PORT, SPEECH_ENGINE, STOP_BIT, STOP_BITS_ARRAY, TEST_TRANSMITTER, TIMER_EVENT, TRIGGER_EVENT, TRUE, USER_HOME, WINDOWS |
Constructor Summary | |
MacroTrigger()
Default Constructor for macro triggers |
|
MacroTrigger(IMacroTrigger newO)
This will clone and create an object from the macro trigger interface |
|
MacroTrigger(int t,
IX10Module iModule,
java.lang.String desc,
java.lang.String act,
java.util.Calendar start,
java.util.Calendar end,
IMacro[] m)
Full constructor to build a macro trigger |
Method Summary | |
java.lang.String |
getAction()
The action that this trigger will execute on this is either the ON_ACTION or OFF_ACTION commands |
java.lang.String |
getDescription()
Get the description of the macro trigger |
int |
getDeviceCode()
the zone code of is used in instances for module activated events. |
boolean |
getFriday()
Execute trigger on a Friday |
java.lang.String |
getFullDeviceCode()
Returns the full X10 module identifier which is in housecode followed by zone code. |
char |
getHouseCode()
the house code of is used in instances for module activated events. |
java.lang.String |
getInitiator()
Get the initator type for the trigger this can be either a detected event as identified by TRIGGER_EVENT constants or a time of day to execute the trigger which is startTime/stopTime |
IMacro[] |
getMacros()
This method returns an array of IMacros which are stored as the first element in the array as the start macro and the second element is the stop macro Start and stop macros are also associated mainly with timer based triggers and not trigger or action related. |
boolean |
getMonday()
Execute trigger on a monday |
boolean |
getSaturday()
Execute trigger on a Saturday |
java.util.Calendar |
getStartTime()
Returns simple string with 24 hour formated start time of this trigger; |
java.util.Calendar |
getStopTime()
Returns simple string with 24 hour formated start time of this trigger; |
boolean |
getSunday()
Execute trigger on a Sunday |
boolean |
getThursday()
Execute trigger on a Thursday |
int |
getTriggerType()
The types of triggers that can fire off a macro. |
boolean |
getTuesday()
Execute trigger on a Tuesday |
boolean |
getWednesday()
Execute trigger on a Wednesday |
IX10Module |
getX10Module()
The X10 Module associated witht he macro trigger. |
void |
print()
Used to do debug printing |
void |
setAction(java.lang.String act)
Set the action of the trigger. |
void |
setDescription(java.lang.String desc)
User defined description of the Trigger macro |
void |
setDeviceCode(int i)
Device or zone code of x10 device being executed. |
void |
setFriday(boolean f)
For time based triggers enable execution on Friday |
void |
setHouseCode(char a)
House code for action or trigger based event X10 module. |
void |
setInitiator(java.lang.String initiat)
Based on trigger type this is the initiators information. |
void |
setMacros(IMacro[] mac)
Allows seting of the Macro by name and not by type which should be IMacro |
void |
setMonday(boolean m)
For time based triggers enable execution on Monday |
void |
setSaturday(boolean s)
For time based triggers enable execution on Saturday |
void |
setStartTime(java.util.Calendar startTime)
This is the the time in 24 hour format this is in hh:mm format. |
void |
setStopTime(java.util.Calendar stp)
This is the the time in 24 hour format this is in hh:mm format. |
void |
setSunday(boolean s)
For time based triggers enable execution on Sunday |
void |
setThursday(boolean t)
For time based triggers enable execution on Thursday |
void |
setTriggerType(int n)
Trigger type is either a time event or X10 module excuting some action. |
void |
setTuesday(boolean t)
For time based triggers enable execution on Tuesday |
void |
setWednesday(boolean w)
For time based triggers enable execution on Wednesday |
void |
setX10Module(IX10Module imod)
Sets the X10 module that will execute based on the trigger. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MacroTrigger(int t, IX10Module iModule, java.lang.String desc, java.lang.String act, java.util.Calendar start, java.util.Calendar end, IMacro[] m)
t
- Trigger type either event detected type or time basediModule
- X10 module to execute the trigger event ondesc
- Description of the triggeract
- Type of action that the X10 module should take placestart
- The start time of the triggerend
- The end time of the triggerm
- List of macros associated with this triggerpublic MacroTrigger()
public MacroTrigger(IMacroTrigger newO)
newO
- The interface to clone as an object.Method Detail |
public void print()
public void setTriggerType(int n)
setTriggerType
in interface IMacroTrigger
n
- - See X10DeviceConstants for TRIGGER_EVENT or TIMER_EVENTpublic void setHouseCode(char a)
a
- - House code of X10 device.public void setDeviceCode(int i)
i
- - Device/zone code.public void setX10Module(IX10Module imod)
setX10Module
in interface IMacroTrigger
imod
- X10Module to run when trigger requirements are met.public void setInitiator(java.lang.String initiat)
setInitiator
in interface IMacroTrigger
initiat
- - Initiator information this is a an X10 module code such as A1public void setAction(java.lang.String act)
setAction
in interface IMacroTrigger
act
- Action type for the trigger ON_ACTION OR OFF_ACTIONpublic void setDescription(java.lang.String desc)
setDescription
in interface IMacroTrigger
desc
- - description for userpublic void setMacros(IMacro[] mac)
mac
- An array of IMacro objectspublic void setStartTime(java.util.Calendar startTime)
setStartTime
in interface IMacroTrigger
startTime
- For time based triggers the calendar time of startingpublic void setStopTime(java.util.Calendar stp)
setStopTime
in interface IMacroTrigger
stp
- for time based triggers the calendar time of stoping the triggerpublic int getTriggerType()
getTriggerType
in interface IMacroTrigger
public char getHouseCode()
public int getDeviceCode()
public IX10Module getX10Module()
getX10Module
in interface IMacroTrigger
public java.lang.String getInitiator()
getInitiator
in interface IMacroTrigger
public java.lang.String getAction()
getAction
in interface IMacroTrigger
public void setSunday(boolean s)
setSunday
in interface IMacroTrigger
s
- True enables execute trigger on specified weekday.public void setMonday(boolean m)
setMonday
in interface IMacroTrigger
m
- True enables execute trigger on specified weekday.public void setTuesday(boolean t)
setTuesday
in interface IMacroTrigger
t
- True enables execute trigger on specified weekday.public void setWednesday(boolean w)
setWednesday
in interface IMacroTrigger
w
- True enables execute trigger on specified weekday.public void setThursday(boolean t)
setThursday
in interface IMacroTrigger
t
- True enables execute trigger on specified weekday.public void setFriday(boolean f)
setFriday
in interface IMacroTrigger
f
- True enables execute trigger on specified weekday.public void setSaturday(boolean s)
setSaturday
in interface IMacroTrigger
s
- True enables execute trigger on specified weekday.public boolean getSunday()
getSunday
in interface IMacroTrigger
public boolean getMonday()
getMonday
in interface IMacroTrigger
public boolean getTuesday()
getTuesday
in interface IMacroTrigger
public boolean getWednesday()
getWednesday
in interface IMacroTrigger
public boolean getThursday()
getThursday
in interface IMacroTrigger
public boolean getFriday()
getFriday
in interface IMacroTrigger
public boolean getSaturday()
getSaturday
in interface IMacroTrigger
public java.lang.String getDescription()
getDescription
in interface IMacroTrigger
public IMacro[] getMacros()
getMacros
in interface IMacroTrigger
public java.util.Calendar getStartTime()
getStartTime
in interface IMacroTrigger
public java.util.Calendar getStopTime()
getStopTime
in interface IMacroTrigger
public java.lang.String getFullDeviceCode()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |