Specifications

Table of Contents
Table of Contents..................................................................................................................................... 3
1. Introduction........................................................................................................................................ 11
SNAP and SNAPpy ........................................................................................................................... 11
Portal and SNAPconnect.................................................................................................................... 11
The SNAP Wireless Sniffer ............................................................................................................... 11
Navigating the SNAP Documentation............................................................................................... 12
Start with an “Evaluation Kit Users Guide” ...................................................................................... 12
About This Manual ............................................................................................................................ 12
Other Important Documentation........................................................................................................ 12
When The Manuals Are Not Enough................................................................................................. 13
2. SNAP Overview................................................................................................................................. 14
Key features of SNAP........................................................................................................................ 14
RPC.................................................................................................................................................... 14
SNAPpy Scripting.............................................................................................................................. 14
SNAPpy Examples............................................................................................................................. 15
Portal Scripting .................................................................................................................................. 15
Python ................................................................................................................................................ 15
Portal Script Examples....................................................................................................................... 16
3. SNAPpy – The Language .................................................................................................................. 17
Statements must end in a newline...................................................................................................... 17
The # character marks the beginning of a comment.......................................................................... 17
Indentation is significant.................................................................................................................... 17
Indentation is used after statements that end with a colon (:)............................................................ 17
Branching is supported via “if”/“elif”/“else”..................................................................................... 17
Looping is supported via “while” ...................................................................................................... 17
Identifiers are case sensitive .............................................................................................................. 17
Identifiers must start with a non-numeric character .......................................................................... 17
Identifiers may only contain alphanumeric characters and underscores ........................................... 18
There are several types of variables................................................................................................... 18
String Variables can contain Binary Data.......................................................................................... 18
You define new functions using “def”............................................................................................... 18
Functions can take parameters ........................................................................................................... 18
Functions can return values ............................................................................................................... 19
Functions can do nothing................................................................................................................... 19
Functions cannot be empty ................................................................................................................ 19
Variables at the top of your script are global..................................................................................... 19
Variables within functions are usually local….................................................................................. 19
…unless you explicitly say you mean the global one........................................................................ 19
Creating globals on the fly................................................................................................................. 20
The usual conditionals are supported................................................................................................. 20
The usual math operators are supported ............................................................................................ 20
The usual Boolean functions are supported....................................................................................... 21
Variables do have types, but they can change on the fly ................................................................... 21
Functions can change, too.................................................................................................................. 21
SNAP Reference Manual Document Number 600-0007K Page 3 of 202