edu.uiuc.cs.seclab.modem.xbee
Class XBeeAtCmdTxn

java.lang.Object
  extended by edu.uiuc.cs.seclab.modem.xbee.XBeeTxn
      extended by edu.uiuc.cs.seclab.modem.xbee.XBeeAtCmdTxn

public class XBeeAtCmdTxn
extends XBeeTxn

Associate a command with one or more responses (depending on command). Represents one complete transaction. Can handle read, write, or special commands.


Nested Class Summary
 
Nested classes/interfaces inherited from class edu.uiuc.cs.seclab.modem.xbee.XBeeTxn
XBeeTxn.RespTimer
 
Field Summary
protected  XBeeAtCmd cmd
           
protected  XBeeAtCmd.Mode mode
           
protected  java.util.List<XBeeAtRespPacketImpl> resps
           
 
Fields inherited from class edu.uiuc.cs.seclab.modem.xbee.XBeeTxn
completed, endTm, frameId, startTm, timer
 
Constructor Summary
XBeeAtCmdTxn(XBeeAtCmd cmd_, XBeeAtCmd.Mode mode_)
           
 
Method Summary
 void addResp(XBeeTxStatPktImpl pktImpl)
           
 int exec(XBeeModem mdm)
          Execute this transaction on the provided modem.
 XBeeAtCmd getCmd()
          Should be invoked immediately before command is dispatched to modem, because it starts timer.
 XBeeAtCmd.Mode getMode()
           
 java.util.List<XBeeAtRespPacketImpl> getResps()
           
 java.lang.String toString()
           
 
Methods inherited from class edu.uiuc.cs.seclab.modem.xbee.XBeeTxn
completeTxnImmed, getDuration, getFrameId, isCompleted, setFrameId, waitForCompletion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

cmd

protected XBeeAtCmd cmd

mode

protected XBeeAtCmd.Mode mode

resps

protected java.util.List<XBeeAtRespPacketImpl> resps
Constructor Detail

XBeeAtCmdTxn

public XBeeAtCmdTxn(XBeeAtCmd cmd_,
                    XBeeAtCmd.Mode mode_)
             throws ModemException
Throws:
ModemException
Method Detail

addResp

public void addResp(XBeeTxStatPktImpl pktImpl)
             throws ModemException
Specified by:
addResp in class XBeeTxn
Throws:
ModemException

exec

public int exec(XBeeModem mdm)
         throws ModemException
Description copied from class: XBeeTxn
Execute this transaction on the provided modem.

Specified by:
exec in class XBeeTxn
Throws:
ModemException

getCmd

public XBeeAtCmd getCmd()
Should be invoked immediately before command is dispatched to modem, because it starts timer.


getMode

public XBeeAtCmd.Mode getMode()

getResps

public java.util.List<XBeeAtRespPacketImpl> getResps()

toString

public java.lang.String toString()
Overrides:
toString in class XBeeTxn