com.jpeterson.x10.event
Class FunctionEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--com.jpeterson.x10.event.X10Event
              |
              +--com.jpeterson.x10.event.FunctionEvent
Direct Known Subclasses:
AllLightsOffEvent, AllLightsOnEvent, AllUnitsOffEvent, BrightEvent, DimEvent, ExtendedCodeEvent, ExtendedDataTransferEvent, HailAcknowledgeEvent, HailRequestEvent, OffEvent, OnEvent, PresetDim1Event, PresetDim2Event, StatusOffEvent, StatusOnEvent, StatusRequestEvent

public class FunctionEvent
extends X10Event

Function events indicate some action to take upon the previously addressed devices that match this functions house code.

See Also:
Serialized Form

Fields inherited from class java.util.EventObject
source
 
Constructor Summary
FunctionEvent(java.lang.Object source, int dims, boolean extended, char houseCode, byte functionCode, int dimMax)
          Create a new function event.
FunctionEvent(java.lang.Object source, int dims, char houseCode, byte functionCode, int dimMax)
          Create a new function event.
 
Method Summary
 byte getFunction()
          Retrieve the function.
 char getHouseCode()
          Retrieve the house code.
 java.lang.String toString()
          Create a string that represents the X10 event.
 
Methods inherited from class com.jpeterson.x10.event.X10Event
equals, getChecksum, getDimMax, getDims, getHiNibble, getLoNibble, getPacket, hashCode, isExtended, isFunction
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FunctionEvent

public FunctionEvent(java.lang.Object source,
                     int dims,
                     boolean extended,
                     char houseCode,
                     byte functionCode,
                     int dimMax)
Create a new function event.
Parameters:
source - The event source.
dims - The number of dims.
houseCode - the house code of the event. Valid codes are 'A' through 'P', uppercase.
functionCode - the function code of the event.
dimMax - The maximum number of dims for the event.

FunctionEvent

public FunctionEvent(java.lang.Object source,
                     int dims,
                     char houseCode,
                     byte functionCode,
                     int dimMax)
Create a new function event.
Parameters:
source - The event source.
dims - The number of dims.
houseCode - the house code of the event. Valid codes are 'A' through 'P', uppercase.
functionCode - the fucntion code of the event.
dimMax - The maximum number of dims for the event.
Method Detail

getHouseCode

public char getHouseCode()
Retrieve the house code.
Returns:
house code character 'A' through 'P', uppercase.

getFunction

public byte getFunction()
Retrieve the function.
Returns:
function byte

toString

public java.lang.String toString()
Create a string that represents the X10 event.
Overrides:
toString in class X10Event
Returns:
string representation of the X10 event