|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmoteaccess.TOSMoteAccess
Field Summary | |
private int |
baseStationId
|
private short |
configNumber
|
static int |
DEFAULT_CONFIG_REQUEST_TIME_MILLS
|
static int |
DEFAULT_GROUP_ID
|
private java.util.Vector |
finishedRequestIDs
|
private java.util.HashMap |
listenerMap
|
private java.util.HashMap |
messageMap
|
private java.util.LinkedList |
messageQueue
|
private MoteIF |
moteif
|
private boolean |
quitting
|
private java.util.Random |
rand
|
private java.util.HashMap |
runningReactions
|
private java.util.HashMap |
runningReads
|
private java.lang.Thread |
thread
|
private java.util.HashMap |
timeouts
|
private TOSMoteAccessUI |
ui
|
Fields inherited from interface moteaccess.IMoteAccess |
DEFAULT_SENSING_TIMEOUT_SECS |
Constructor Summary | |
TOSMoteAccess()
Creates a new TOSMoteAccess object, and tries to initialize MoteIF from TinyOS in order to access the sensor network. |
Method Summary | |
void |
doRead(RequestID rid,
MoteRequest mr_in,
IMoteListener ml)
Method by which the MoteAccess layer is requested to start an unconditional read operation. |
int |
getParameter(java.lang.String parameter)
|
void |
injectReaction(RequestID rid,
MoteReaction mr_in,
IMoteListener ml)
Method by which the MoteAccess layer is requested to install a reaction. |
void |
messageReceived(int dest_addr,
Message msg)
|
void |
run()
This is the body of the thread that both sends messages to the sensor network and updates the timeouts. |
boolean |
setParameter(java.lang.String parameter,
int value)
Method by which parameters at the MoteAccess level can be set. |
void |
shutdown()
This method shuts down the TOSMoteAccess, more specifically it lets the message sending Thread know that it's time to die. |
private void |
stopConfigRequest(ConfigRequestTOSMessage msg)
|
void |
stopOperation(RequestID rid)
Method used to stop a running operation, i.e. |
private void |
stopRequest(RequestID rid,
java.lang.String reason)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int DEFAULT_CONFIG_REQUEST_TIME_MILLS
public static final int DEFAULT_GROUP_ID
private int baseStationId
private MoteIF moteif
private TOSMoteAccessUI ui
private java.util.HashMap runningReads
private java.util.HashMap runningReactions
private java.util.LinkedList messageQueue
private java.util.HashMap messageMap
private java.util.HashMap timeouts
private java.util.HashMap listenerMap
private java.util.Vector finishedRequestIDs
private boolean quitting
private java.lang.Thread thread
private short configNumber
private java.util.Random rand
Constructor Detail |
public TOSMoteAccess()
Method Detail |
public void doRead(RequestID rid, MoteRequest mr_in, IMoteListener ml)
IMoteAccess
doRead
in interface IMoteAccess
rid
- : the RequestID that the client application has generated.mr_in
- : the MoteRequest object describing the desired reading.ml
- : reference to the IMoteListener implementation to be notified of incoming results.public void stopOperation(RequestID rid)
IMoteAccess
stopOperation
in interface IMoteAccess
rid
- : the RequestID identifying the operation to be stopped.public void injectReaction(RequestID rid, MoteReaction mr_in, IMoteListener ml)
IMoteAccess
injectReaction
in interface IMoteAccess
rid
- : the RequestID that the client application has generated.mr_in
- : the MoteReaction object describing the desired reaction.ml
- : reference to the IMoteListener implementation to be notified of incoming results.public boolean setParameter(java.lang.String parameter, int value)
IMoteAccess
setParameter
in interface IMoteAccess
parameter
- String identifying the parameter to be modifiedvalue
- integer to which the parameter has to be set.
public int getParameter(java.lang.String parameter)
public void shutdown()
public void messageReceived(int dest_addr, Message msg)
private void stopRequest(RequestID rid, java.lang.String reason)
private void stopConfigRequest(ConfigRequestTOSMessage msg)
public void run()
run
in interface java.lang.Runnable
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |