Explored trace needs to be constructed and modified as there are predecessor branches.
[jpf-core.git] / examples / teststatic.groovy
1 import groovy.transform.CompileStatic
2
3 // This function runs when the SmartApp is installed
4 @CompileStatic
5 def installed() {
6     // This is a standard debug statement in Groovy
7     //log.debug "Installed with settings: ${settings}"
8     initialize()
9 }
10
11 // This function runs when the SmartApp has been updated
12 @CompileStatic
13 def updated() {
14     //log.debug "Updated with settings: ${settings}"
15     // Notice that all event subscriptions are removed when a SmartApp is updated
16     //unsubscribe()
17     initialize()
18 }
19
20 // This function is where you initialize callbacks for event listeners
21 @CompileStatic
22 def initialize() {
23     // The subscribe function takes a input, a state, and a callback method
24     //subscribe(contact, "contact.open", openHandler)
25     //subscribe(contact, "contact.closed", closedHandler)
26 }
27
28 // These are our callback methods
29 @CompileStatic
30 def openHandler(evt) {
31     //log.debug "$evt.name: $evt.value"
32     // Turn the light on
33     //light.on()
34 }
35
36 @CompileStatic
37 def closedHandler(evt) {
38     //log.debug "$evt.name: $evt.value"
39     // Turn the light off and lock the lock
40     //light.off()
41 }