V2/CMS Tutorial/User Tools/Creating Content/Measurement/Computed Measurement/Script

From Senfi Docs
Revision as of 16:37, 5 July 2021 by Elysia.Tan (talk | contribs)
Jump to: navigation, search

Add Script

This section covers the following topics:

Add Script

Steps to add Script for Computed Measurement
  1. Select source measurements.
  2. Fill in the compute function.
    • Programming Language Used: Javascript
  3. Test Script.
  4. Repeat Steps 2 and 3 as required.
  5. Choose to Enable.pngenable or Disable.png disable the script.

Test Script

  1. Input data into the Testing Data Set.
    • New data sets can be created by selecting the Add data set.png Add button.
    • The format of the data set should match that of the selected source measurement.
      Sample data set
      Source Measurement: aerialdynamics
      Tags: sensor_id
      Metrics: altitude, longtitude, latitude
  2. Select the START TESTING button.
    • Log data will be shown in the Testing Console panel.
  3. Select the SEND DATA button.
    • Computed values will be shown in the Output (Measurement) and/or Output (Command) panel.