What is a Zap?

A ZentriOS Application (aka Zap) is a custom application that runs inside ZentriOS.

A ZentriOS Application is typically the controller of a product. It contains all the logic (or 'smarts') the product requires.

The ZentriOS App is written in C, compiled natively for the ZentriOS device MCU.

A Zap leverages all the features of ZentriOS via an Application Programming Interface (API). See Native API reference for full details. A Zap dynamically links with ZentriOS APIs.

A Zap also has full access to the commands and variables of the Command API, using the Native API functions for issuing commands.

Loading and Executing a Zap

A Zap is loaded into the non-volatile memory (NVM) of a ZentriOS enabled device.

ZentriOS is then configured or commanded to load the Zap and begin executing it.

See the zap_run command, and the zap.auto_run variable.

From there the Zap takes over and controls the ZentriOS enabled device.

Execution Details for Specified Platforms

For more details see Memory Sections.

Structure, Memory and Execution Contexts

A Zap has a specific structure that must be followed. See ZentriOS App Structure.

Memory is divided into sections, the size of which varies for particular platforms. See Memory Sections.

The logic of a Zap (the user's application specific functionality) executes in its own thread. ZentriOS applications are event driven. Some events, such as hardware IRQs, RTOS timer events, network events and HTTP requests, are handled in other execution contexts. See Execution Contexts.

Compiler

The SDK compiles the ZentriOS application with GCC 4.8.2 for the ARM processor. See GCC, the GNU Compiler Collection

Optimization

See also Memory Optimizations.

Access to MCU Registers