User manual
Figure 1 - Example HVAC System Showing RPC Call-flow (arrows)
RPCs are a fundamental part of SNAP’s communicaon infrastructure, enough so that there is an enre secon
of this manual devoted to it, beginning on page 32.
SNAPpy Scripng
SNAPpy is a subset of the Python programming language, opmized for low-power embedded devices. A
SNAPpy “script” is a collecon of funcons and data that is processed by Portal and uploaded to SNAP devices.
All SNAP devices are capable of running SNAPpy – it is the nave language of SNAP RPC calls.
SNAPpy Examples
On installaon, Portal creates a folder under “My Documents” called “Portal\snappyImages”.0F
1
Several sample
script files are installed here by default. These scripts are plain text files that may be opened and edited with
Portal’s built-in editor. External text editors (such as Notepad) or even full-fledged Python Integrated
Development Environments (IDEs) may also be used. Feel free to copy and modify the sample scripts (the
installed copies are read-only), and create your own as you build custom network applicaons.
Be sure to make copies of the provided files rather than just changing the file aributes to be editable.
Otherwise, if you ever update your version of Portal you will overwrite any changes you have made to the files.
Portal Scripng
Just as with the SNAP nodes, Portal can also be extended through scripng. By loading a Python script into
Portal, you can add new funcons that you (and the other SNAP nodes) can call.
Portal scripts are wrien in full Python. You are not limited to the embedded SNAPpy subset for Portal scripts, as
you are for SNAPpy scripts that run on SNAP Engines. Python is a very powerful language, which finds use in a
wide variety of applicaon areas. Although the core of Python is not a large language, it is well beyond the scope
of this document to cover it in any detail.
1
The installaon path shown is for Windows installaons. File locaons for Mac OS X and Ubuntu Linux installaons will be
appropriate for those file systems.
SNAP® Network Operang System 5