Site menu:



TruTalk

A Scripting Language

TruTalk is a scripting language used to program some of the TruCom-range of products such as the TruCom SmarToo, the TruCom Cruiser and the TruCom Communications Processor.

This tutorial is presented as a range of examples.

1 Event Reporting

Example 1

Immediately send an sms on the change of an input.
!32 1 00:00:00
!11 1 +278123456,myNumber
!34 1 !41 1 "Door Opened"
!35 1 !41 1 "Door Closed"

Example 2

Send an sms on the change of an input and wait 1 minute before reporting again.
!32 1 00:00:00
!11 1 +278123456,myNumber
!34 1 !32 1 00:01:00 !41 1 "Door Opened"
!35 1 !32 1 00:00:00 !41 1 "Door Closed"

Note

This method can also be used in 'noisy' digital inputs, or oscillating inputs as well as on analog inputs that 'floats' around the reporting level, to avoid receiving multiple notifications on the same input in a short time.


2 Counters & Timers

Example 3

Count the number of times an input switched on in a given time.
!32 1 00:00:00
!11 1 +278123456,myNumber
!17 1 01:00:00
!34 1 !81 1 1 !16 1 1
!18 1 !16 1 0 !17 1 01:00:00 !41 1 "The door opened <C1> times in the last hour"

3 Self-maintained Point-to-Point serial communications via GPRS

Example 4

Commands to be entered.
!67 70
!83 1 -1 100
!150 1
!154 10.123.0.11
!157 8870
!158 TRUTEQ
!161 720 5 60
!262 0
!15 1 !17 1 00:00:30 !16 1 1
!18 1 !17 1 00:00:30 !81 1 1 !42 0 35 ""
!18 2 !16 1 1 2 0 !42 0 35 ""
!85 1 !16 1 0 2 1 !17 2 00:02:00 !80 1 0