org.jbrain.qlink.cmd
Class AbstractCommand

java.lang.Object
  |
  +--org.jbrain.qlink.cmd.AbstractCommand
All Implemented Interfaces:
Command
Direct Known Subclasses:
AbstractAction, AbstractCheckedCommand, Reset

public abstract class AbstractCommand
extends java.lang.Object
implements Command


Field Summary
protected  int _iCalculatedCRC
           
protected  int _iReportedCRC
           
 
Fields inherited from interface org.jbrain.qlink.cmd.Command
CMD_START
 
Constructor Summary
AbstractCommand(byte cmd)
           
AbstractCommand(byte[] data, int start, int len)
           
 
Method Summary
protected  void finalizeCmd(byte[] data)
           
 byte[] getBytes()
           
 byte getCommand()
           
 java.lang.String getName()
           
 byte getRecvSequence()
           
 byte getSendSequence()
           
 void setRecvSequence(byte seq)
           
 void setSendSequence(byte seq)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_iReportedCRC

protected int _iReportedCRC

_iCalculatedCRC

protected int _iCalculatedCRC
Constructor Detail

AbstractCommand

public AbstractCommand(byte cmd)

AbstractCommand

public AbstractCommand(byte[] data,
                       int start,
                       int len)
Parameters:
data -
start -
len -
Method Detail

setRecvSequence

public void setRecvSequence(byte seq)
Specified by:
setRecvSequence in interface Command
Parameters:
seq -

setSendSequence

public void setSendSequence(byte seq)
Specified by:
setSendSequence in interface Command
Parameters:
seq -

finalizeCmd

protected void finalizeCmd(byte[] data)

getBytes

public byte[] getBytes()
Specified by:
getBytes in interface Command

getRecvSequence

public byte getRecvSequence()
Specified by:
getRecvSequence in interface Command
Returns:

getSendSequence

public byte getSendSequence()
Specified by:
getSendSequence in interface Command
Returns:

getCommand

public byte getCommand()
Specified by:
getCommand in interface Command

getName

public java.lang.String getName()
Specified by:
getName in interface Command