sophware.home.insteon
Class PLCCommand

java.lang.Object
  extended by sophware.home.io.HomeCommand
      extended by sophware.home.insteon.PLCCommand
All Implemented Interfaces:
java.io.Serializable, MacroStep

public class PLCCommand
extends HomeCommand
implements java.io.Serializable

An PLCCommand is transmitted via a HomeTransmitter to the PLC.

Version:
1.0, 03/19/07
Author:
Russell Soph
See Also:
Serialized Form

Field Summary
static long serialVersionUID
           
static byte SIMULATED_CMD
           
 
Constructor Summary
PLCCommand(byte command, byte[] data)
          constructs a new PLCCommand
 
Method Summary
 int getBytes(byte[] data)
          get the transmission bytes
 byte getCommand()
          get the command value
 int getData(byte[] data)
          get the command data
 java.lang.String toString()
          string representation of this command
 
Methods inherited from class sophware.home.io.HomeCommand
execute, getListener, getRequestID, setListener, setRequestID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values

SIMULATED_CMD

public static final byte SIMULATED_CMD
See Also:
Constant Field Values
Constructor Detail

PLCCommand

public PLCCommand(byte command,
                  byte[] data)
constructs a new PLCCommand

Parameters:
command - the command to be sent
data - the data associated with the command
Method Detail

getCommand

public byte getCommand()
get the command value

Returns:
the first command value

getData

public int getData(byte[] data)
get the command data

Parameters:
data - the buffer into which the bytes are copied
Returns:
the first command value

getBytes

public int getBytes(byte[] data)
get the transmission bytes

Specified by:
getBytes in class HomeCommand
Parameters:
data - the buffer into which the bytes are copied
Returns:
the length of the buffer

toString

public java.lang.String toString()
string representation of this command

Overrides:
toString in class java.lang.Object
Returns:
the string