net.tinyos.tinydb
Class CommandMsgs

java.lang.Object
  |
  +--net.tinyos.tinydb.CommandMsgs

public class CommandMsgs
extends java.lang.Object

Class with static functions to generate message arrays that can be used to invoke commands on Db motes.


Field Summary
static byte CMD_MSG_TYPE
          AM Message ID used for command messages
 
Constructor Summary
CommandMsgs()
           
 
Method Summary
static net.tinyos.message.Message addAttrCmd(short targetId, char[] name, byte t, long val)
           
static net.tinyos.message.Message dumpLog(short targetId)
          Deprecated.  
static net.tinyos.message.Message resetCmd(short targetId)
          The reset command resets motes (like toggling the power switch
static net.tinyos.message.Message setCentralized(short targetId, boolean centralized)
          Enabled "centralized" routing, where no aggregation is performed in network and data is simply forwarded to the root.
static net.tinyos.message.Message setFanout(short targetId, char fanout)
          Constrains the network topology to have the specified fanout
static net.tinyos.message.Message setFixedComm(short targetId, boolean fixed)
          Fixed comm means that motes transmit in in the time slot corresponding to their local id * 2; unfixed comm means mote xmit in a random slot selected uniformly in the range (0 ..
static net.tinyos.message.Message setLogLen(short targetId, short offset)
          Deprecated.  
static net.tinyos.message.Message setPot(short targetId, char pot)
          Sets the value of the radio strength potentiometer (0 - 100), 0 is largest
static net.tinyos.message.Message setSounderCmd(short targetId)
           
static net.tinyos.message.Message stopMagCmd(short targetId)
          Stop the magnetometer from oversampling (for power conservation)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CMD_MSG_TYPE

public static final byte CMD_MSG_TYPE
AM Message ID used for command messages

See Also:
Constant Field Values
Constructor Detail

CommandMsgs

public CommandMsgs()
Method Detail

resetCmd

public static net.tinyos.message.Message resetCmd(short targetId)
The reset command resets motes (like toggling the power switch

Parameters:
targetId - The id of the mote that should receive this message

setLogLen

public static net.tinyos.message.Message setLogLen(short targetId,
                                                   short offset)
Deprecated.  

Sets the length of the log (number of messages returned by dump log


dumpLog

public static net.tinyos.message.Message dumpLog(short targetId)
Deprecated.  

Causes the mote to spill the current contents of the EEPROM log


setFanout

public static net.tinyos.message.Message setFanout(short targetId,
                                                   char fanout)
Constrains the network topology to have the specified fanout

Parameters:
targetId - The ID of the mote that should receive this message
fanout - The topology fanout. Motes are constrained to choose one of fanout parents (e.g. if fanout = 2, mote id 3 can pick motes 1 or 2 as a parent.)

setPot

public static net.tinyos.message.Message setPot(short targetId,
                                                char pot)
Sets the value of the radio strength potentiometer (0 - 100), 0 is largest

Parameters:
targetId - The recipient of this message
pot - The value of the potentiometer

setCentralized

public static net.tinyos.message.Message setCentralized(short targetId,
                                                        boolean centralized)
Enabled "centralized" routing, where no aggregation is performed in network and data is simply forwarded to the root.


setFixedComm

public static net.tinyos.message.Message setFixedComm(short targetId,
                                                      boolean fixed)
Fixed comm means that motes transmit in in the time slot corresponding to their local id * 2; unfixed comm means mote xmit in a random slot selected uniformly in the range (0 .. local cell size estimate)


stopMagCmd

public static net.tinyos.message.Message stopMagCmd(short targetId)
Stop the magnetometer from oversampling (for power conservation)


setSounderCmd

public static net.tinyos.message.Message setSounderCmd(short targetId)

addAttrCmd

public static net.tinyos.message.Message addAttrCmd(short targetId,
                                                    char[] name,
                                                    byte t,
                                                    long val)