edu.columbia.coms6901.pingtel.pingim
Class DOMessage

java.lang.Object
  |
  +--edu.columbia.coms6901.pingtel.pingim.SIPMessage
        |
        +--edu.columbia.coms6901.pingtel.pingim.DOMessage

public class DOMessage
extends SIPMessage

Implementation of a SIP DO message. Used to control X10 devices.

Version:
1.0
Author:
Micah Sherr

Field Summary
static int OFF
          X10-controlled device is off
static int ON
          X10-controlled device is on
private  com.pingtel.xpressa.sys.XpressaSettings settings
          the current set of settings for this phone
 
Fields inherited from class edu.columbia.coms6901.pingtel.pingim.SIPMessage
bValidity, randomNumberGenerator, response, sipRequest
 
Constructor Summary
DOMessage(java.lang.String sForeignSipAddress, java.lang.String sDeviceName, int iAction)
          Creates a new instance of a SIP DO message.
 
Method Summary
private  boolean setHeaders(java.lang.String sForeignSipAddress, java.lang.String sDeviceName, int iAction)
          Sets appropriate headers for SIP DO message.
 
Methods inherited from class edu.columbia.coms6901.pingtel.pingim.SIPMessage
getResponse, send, sendAndWait
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

settings

private com.pingtel.xpressa.sys.XpressaSettings settings
the current set of settings for this phone

ON

public static final int ON
X10-controlled device is on

OFF

public static final int OFF
X10-controlled device is off
Constructor Detail

DOMessage

public DOMessage(java.lang.String sForeignSipAddress,
                 java.lang.String sDeviceName,
                 int iAction)
Creates a new instance of a SIP DO message.
Parameters:
sForeignSipAddress - SIP address of receipient
sDeviceName - Name of device (e.g., "lamp")
iAction - Either ON or OFF
Method Detail

setHeaders

private boolean setHeaders(java.lang.String sForeignSipAddress,
                           java.lang.String sDeviceName,
                           int iAction)
Sets appropriate headers for SIP DO message.
Parameters:
sForeignSipAddress - the SIP address of the X10 device
sDeviceName - the name of the device
iAction - either ON or OFF
Returns:
true on success, false on error