|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sentilla.platform.tmote.Action
com.sentilla.platform.tmote.KernelProperty
public class KernelProperty
API for interacting with kernel properties on the Tmote platform. kernel properties are properties whose value is communicated into the kernel. These properties affect low-level quantities such as the radio channel being used.
A kernel property can be set directly and can also be saved in the
property filesystem for persistence (see PropertyDriver
). All of
the static setter methods will set the value in the kernel and
persist the new value in the property filesystem.
To retrieve the initial value for a property, use one of the getDefault methods. The value retrieved will be the one present on the first boot of the mote, regardless of how many times it has been changed since that time.
Field Summary |
---|
Fields inherited from class com.sentilla.platform.tmote.Action |
---|
actionAuto, actionId, actionState, isolateOwner |
Fields inherited from interface com.sentilla.system.Action |
---|
DONE, ERROR, IDLE, PENDING |
Constructor Summary | |
---|---|
KernelProperty()
|
Method Summary | |
---|---|
byte |
getDefaultChannel()
Get the initial value for the radio channel. |
short |
getDefaultLPLInterval()
Get the initial value for the Low Power Listening sleep interval. |
long |
getDefaultMac64()
Get the initial value for the long Mac address. |
void |
getDefaultSecurityKey(byte[] seckey)
Get the initial value for the security key. |
static short |
getLPLInterval()
Get the current Low Power Listening interval. |
static long |
getMac64()
Get the current long Mac address. |
static void |
getSecurityKey(byte[] seckey)
Get the current security key. |
static void |
init()
Restore all default kernel properties. |
protected void |
initLPLInterval()
|
protected void |
initMac64()
|
protected void |
initRadioChannel()
|
protected void |
initSecurityKey()
|
void |
setKernelLPLInterval(short interval)
Set the Low Power Listening interval in the kernel. |
void |
setKernelMac64(long mac64)
Set the Mac address in the kernel. |
void |
setKernelSecurityKey(byte[] seckey)
Set the security key in the kernel. |
static void |
setLPLInterval(short interval)
Set the Low Power Listening interval in the properties and kernel. |
static void |
setMac64(long mac64)
Set the Mac address in the properties and kernel. |
void |
setRadioChannel(byte ch)
Set the radio channel in the kernel. |
static void |
setSecurityKey(byte[] seckey)
Set the security key in the properties and kernel. |
Methods inherited from class com.sentilla.platform.tmote.Action |
---|
block, block, cancel, getActionState, initAction, isDone, lookup, submit |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public KernelProperty()
Method Detail |
---|
public static void init()
protected void initLPLInterval()
public short getDefaultLPLInterval()
public void setKernelLPLInterval(short interval)
interval
- in binary milliseconds (1/1024. sec)public static short getLPLInterval()
public static void setLPLInterval(short interval)
interval
- in binary milliseconds (1/1024. sec)protected void initMac64()
public long getDefaultMac64()
public void setKernelMac64(long mac64)
mac64
- long addresspublic static long getMac64()
public static void setMac64(long mac64)
mac64
- long addressprotected void initSecurityKey()
public void getDefaultSecurityKey(byte[] seckey)
seckey
- must be byte[16].public void setKernelSecurityKey(byte[] seckey)
seckey
- byte[16] containing the new key.public static void getSecurityKey(byte[] seckey)
seckey
- must be byte[16].public static void setSecurityKey(byte[] seckey)
seckey
- new key as byte[16].protected void initRadioChannel()
public byte getDefaultChannel()
public void setRadioChannel(byte ch)
ch
- new channel.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |