edu.uiuc.cs.seclab.modem.xbee
Class XBeeAtCmdTxn
java.lang.Object
edu.uiuc.cs.seclab.modem.xbee.XBeeTxn
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.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
cmd
protected XBeeAtCmd cmd
mode
protected XBeeAtCmd.Mode mode
resps
protected java.util.List<XBeeAtRespPacketImpl> resps
XBeeAtCmdTxn
public XBeeAtCmdTxn(XBeeAtCmd cmd_,
XBeeAtCmd.Mode mode_)
throws ModemException
- Throws:
ModemException
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