XT2500 Product Manual
Page 24 | 92
CONFIDENTIAL AND PROPRIETARY
5. I
NTERPRETER
5.1. L
ANGUAGE
5.1.1. Interpreter Language Basics
Overview
Certain Xirgo products contain functionality to run user-created scripts. This allows functionality to be tuned and
changed without needing Firmware updates. The device runs an interpreter which ‘interprets’ byte code that has
been compiled from a human readable script. This document describes the language/syntax used for this script.
Byte-Code Characteristics
Blocks
Description
Script
Each Script Block can contain unlimited Trigger Blocks (limited only by memory reserved
for byte code on device itself).
Trigger
Each Trigger Block has one Trigger Block Test. A test is usually made of one comparison,
but the language also allows to use more than one comparison in which the test is true if
ANY of the comparisons are true or if ALL the comparisons are true. A Trigger Block Test
may contain up to 2 comparisons.
NOTE: Each Trigger Block can contain unlimited Conditional Action Blocks.
Conditional
Action
Each Conditional Action Block may optionally contain one Conditional Action Block Test. A
Conditional Action Block Test may contain up to 5 comparisons (Using same “any” or “all”
logic as described for Trigger Block Test).
NOTE: Each Conditional Action Block must contain one Action Block.
Action
Each Action Block can contain 1 – 3 Actions
How Trigger Block Tests Work
Each Trigger Block is entered when the Trigger Block Test becomes true. The Trigger Block is not entered WHILE
the test is true, only the moment it becomes true.
Example: If you want to trigger actions when vehicle speed goes above 80 KPH:
trigger when Gt(GPSSpeed, 800) [Debounce(0, 0)]
...
The interpreter will enter the trigger block the moment the vehicle speed increases above 80 KPH. It will not
continue to enter the trigger block during subsequent evaluations where the speed remains above 80 KPH. Once
the speed drops below 80 (for at least one evaluation), then the trigger block will be entered again next time the
speed increases above 80 KPH.