User Tools

Site Tools


geofencedsl

This is an old revision of the document!


GeoFence DSL

javascript language.

Variables

detail = { fence : <The specific fence that caused the event>
           date : <trigger date>
           verb : IN | OUT
         }
fences[] - access to each of the defined geofences

inside_fences[] - list of fences currently "inside"
 if detail.verb == "IN" {
    email("don@don", "Fence entered!")
 }
 ace = fences["Ace Hotel"]
 if (detail.verb == "IN" && detail.fence == ace) {
    if (ace.inside_trigger_date - Time.now > 15.minutes) {
      email("brennan", "Nerdout at the ACE Hotel!")
    }
 }
geofencedsl.1295993501.txt.gz · Last modified: 2016/06/25 11:25 (external edit)