Specifications

writeChunk(ofs, str)
Write string to user-application FLASH memory
chr(number)
Returns the character string representation of “number”
str(obj)
Returns the string representation of obj
int(obj)
Returns the integer representation of obj
Notice that you cannot specify the base. Decimal is assumed
len(str)
Returns the length of string str (0-255)
random()
Returns a pseudo-random number 0-4095
stdinMode(mode, echo)
mode is 0 for line, 1 for character at a time
echo is True or False
Network
getNetId()
Current Network ID
setNetId(netId)
Set Network ID (1-0xFFFE)
localAddr()
Local network address (3-byte binary string)
rpcSourceAddr()
Originating address of current RPC context (None if called
outside RPC)
mcastSerial(dstGroups, ttl)
Set Serial transparent mode to multicast
ucastSerial(dstAddr)
Set Serial transparent mode to unicast
callback(callbackFnObj, remoteFnObj, args...)
Remote Procedure Call (back to the original invoker) of
Remote Procedure Call results
callout(addr, callbackFnObj, remoteFnObj, args...)
Remote Procedure Call (to an arbitrary node address) of
Remote Procedure Call results
rpc(dstAddr, remoteFnObj, args...)
Remote Procedure Call (unicast)
mcastRpc(dstGroups, ttl, remoteFnObj, args...)
Remote Procedure Call (multicast)
Non-Volatile (NV) Parameters
loadNvParam(id)
Load indexed parameter from NV storage
saveNvParam(id, obj)
Save object to indexed NV storage location
Radio
rx(isEnabled)
Enable/disable radio receiver
txPwr(power)
Adjust radio transmit level (0 is lowest, 17 is highest)
setChannel(channel)
Set radio channel
getChannel()
Radio channel
getLq()
Link Quality in (-) dBm
getEnergy()
Detected RF energy in (-) dBm (current channel)
scanEnergy()
Detected RF energy in (-) dBm (all 16 channels)
peekRadio(addr)
Read a memory location from inside the radio
pokeRadio(addr, byteVal)
Write a memory location inside the radio
SNAP Reference Manual Document Number 600-0007K Page 83 of 202