Specifications

For VM_NET, the only parameter is the optional reply window.
The reported values will be a “hiByte” containing the currently active channel (0-15), and a “data”
value of the current Network ID
For VM_SPACE, the only parameter is the optional reply window.
The reported “data” value will be the Total Image (script) Space Available
For VM_SCAN, the only parameter is the optional reply window.
The reported “data” value will be a 16 character string containing the detected energy levels on all 16
channels. Note that each scan just represents one point in time, you will probably have to initiate
multiple scans to determine which channels actually have SNAP nodes on them.
You can see this VM_SCAN function put to use in the Channel Analyzer feature of Portal.
See also function scanEnergy(), which returns data in an equivalent format.
For VM_INFO, the only parameter is the optional reply window.
The reported values will be a “hiByte” of the current Link Quality, and a “data” of the currently loaded
script name (a string).
Return value format:
All of the VM_xxx functions invoke a callback named tellVmStat(word, data)
The least significant byte of word will be the originally requested statusCode. The most significant
byte will vary depending on the statusCode, and is the “hiByte” described above. The data value is the
main return value, and is also dependant on the statusCode.
Return value timing:
If you do not specify a “time window” parameter, the nodes will respond immediately.
Some of these commands are multicast by Portal, and we needed a way to keep all of the nodes from
trying to respond at once.
Specifying a non-zero “time window” tells the node to pick a random time within the next “time
window” seconds, and wait until then to reply.
This function does not return a value, but it causes a tellVmStat() call to be made to the node that
requested the vmStat().
Note – because of the callback() function, some of the vmStat() capabilities are redundant.
Page 80 of 202 SNAP Reference Manual Document Number 600-0007K