Product Manual
Table Of Contents
- 1. Functional Description
- 2. Device Setup
- 3. Interfaces
- 4. Device Configuration
- 4.1. APNs (apn)
- 4.2. OBD Accel and Decel (oad)
- 4.3. OBD RPM and Speed Events (ors)
- 4.4. OTA Prevent (ota)
- 4.5. Bluetooth Enabled (blt)
- 4.6. Buzzer Songs (bzr)
- 4.7. Destination (dst)
- 4.8. Generic Config Value (gcv)
- 4.9. Input Default Polarity (idp)
- 4.10. Motion Sensitivity (mst)
- 4.11. Serial Port Settings (sps)
- 4.12. Timer Duration (tmr)
- 4.13. Packet Creation Recipe (pcr)
- 4.14. Third-Party Config Values (tpv)
- 4.15. GPS Solution Filter (gsf)
- 4.16. Vehicle Bus Configuration (vbs)
- 5. Interpreter
- 6. Command Language
XT2500 Product Manual
Page 36 | 92
CONFIDENTIAL AND PROPRIETARY
5.2. INTERPRETER SCRIPTING TRIGGER BLOCK EXAMPLES
5.2.1. Packet Send Example
This example shows an alternate message being sent every two minutes. If flag[0] is set, then send packet 1,
otherwise, send packet 0. Always reset the timer and toggle the flag.
trigger when Eq(TimerExpired(0), 1)
condact when Eq(FlagIsSet(0), 1) [Debounce(0, 0)]
actions
run BuildAndSendMsg(1, 0, 1, 0)
run ClearFlag(0)
condact when Neq(FlagIsSet(0), 1) [Debounce(5, 0)]
# NOTE: debounce Hi for 5 seconds, to keep these actions from executing
due to
# the previous CondAct block clearing the flag.
actions
run BuildAndSendMsg(0, 0, 1, 0)
run SetFlag(0)
condact always
actions
run ResetTimer(0)
5.2.2. Build and Send Message
A message is created and sent when you send a user event to the interpreter. The user event can be sent via
:xrmsg <index>.
NOTE: see actions[] array in src/interpreter/interpreter.c to find valid action indices and number of
arguments each action should take.
trigger when Eq(UserEventIsActive(0xff), 1)