WASM engine

Nodes: ghanta nav sim com ifc | Module: script | Parameters: Script

This module provides virtual machine to execute WASM scripts onboard. The scripts are pre-compiled by the GCS and stored in node non-volatile memory along with the source code.

Key features

  • Efficient and extremely fast scripting engine;
  • LLVM compiler support with modern C++11;
  • Native functions to access node resources;
  • Functions (events) can be invoked by mission, or per GCS command;

Usage examples

  • Define and automate UAV safety procedures, specific to a vehicle;
  • Implement specific payload protocol to communicate via VCP;
  • Implement custom control algorithm and override autopilot;
  • Collect specific sensors data and send it to custom GCS plugin via VCP stream;

Script examples are available with the GCS distribution.

Configuration parameters

  • Script

    Scripting engine

    • restart Restart command
    • start Start command
    • stop Stop command
    • mode Scripting engine mode option [off,manual,auto]
      • off: the module is turned off;
      • manual: the script is available for editing and uploading, but started manually, via command from GCS;
      • auto: script will be executed automatically upon power up;
    • code Script source code script

      Contains pre-compiled WASM binary bytecode and packed source code;