Difference between revisions of "V2/CMS Tutorial/User Tools/Creating Content/Measurement/Computed Measurement/Script"
From Senfi Docs
Elysia.Tan (talk | contribs) |
Elysia.Tan (talk | contribs) |
||
Line 12: | Line 12: | ||
# [[#Test Script|Test Script]]. | # [[#Test Script|Test Script]]. | ||
# Revise code as necessary. | # Revise code as necessary. | ||
− | # Choose to [[File:enable.png|80px]] '''enable''' or [[File:disable.png|80px]] disable''' the script. | + | # Choose to [[File:enable.png|80px|link=]] '''enable''' or [[File:disable.png|80px|link=]] disable''' the script. |
===Test Script=== | ===Test Script=== | ||
# Input data into the '''Testing Data Set'''. | # Input data into the '''Testing Data Set'''. | ||
#* New data sets can be created by selecting the [[File:add_data_set.png|30px]] '''Add''' button. | #* New data sets can be created by selecting the [[File:add_data_set.png|30px]] '''Add''' button. | ||
− | #* The format of the data set should match that of the selected '''source measurement'''. [[File:sample_data_set.png|thumb|700px|center|<u>'''Sample data set'''</u><br> '''Source Measurement:''' flaredynamics<br> '''Tags:''' sensor_id<br> '''Metrics:''' altitude, longtitude, latitude]] | + | #* The format of the data set should match that of the selected '''source measurement'''. [[File:sample_data_set.png|thumb|700px|center|<u>'''Sample data set'''</u><br> '''Source Measurement:''' flaredynamics<br> '''Tags:''' sensor_id<br> '''Metrics:''' altitude, longtitude, latitude|link=]] |
# Select the '''START TESTING''' button. | # Select the '''START TESTING''' button. | ||
#* Log data will be shown in the '''Testing Console''' panel. | #* Log data will be shown in the '''Testing Console''' panel. | ||
# Select the '''SEND DATA''' button. | # Select the '''SEND DATA''' button. | ||
#* Computed values will be shown in the '''Output (Measurement)''' and/or '''Output (Command)''' panel. | #* Computed values will be shown in the '''Output (Measurement)''' and/or '''Output (Command)''' panel. |
Revision as of 15:50, 21 June 2021
Add Script
This section covers the following topics:
Add Script
- Select source measurements.
- Fill in the compute function.
- Programming Language Used: Javascript
- Test Script.
- Revise code as necessary.
- Choose to enable or disable the script.
Test Script
- Input data into the Testing Data Set.
- Select the START TESTING button.
- Log data will be shown in the Testing Console panel.
- Select the SEND DATA button.
- Computed values will be shown in the Output (Measurement) and/or Output (Command) panel.