Browse Source

Remove JavaScript stuff. Move existing SCCD examples, doc and textualnotations to 'legacy' folder. Update setup script. Add digital watch example (doesn't run yet, need to figure out how to connect existing Python code with the statechart model)

Joeri Exelmans 5 years ago
parent
commit
7d7f3832fe
100 changed files with 1342 additions and 0 deletions
  1. 636 0
      examples/digitalwatch/DigitalWatchGUI.py
  2. BIN
      examples/digitalwatch/noteSmall.gif
  3. 527 0
      examples/digitalwatch/statechart_digitalwatch.svg
  4. 179 0
      examples/digitalwatch/statechart_digitalwatch.xml
  5. BIN
      examples/digitalwatch/watch.gif
  6. BIN
      examples/digitalwatch/watch.jpg
  7. 0 0
      legacy/doc/Makefile
  8. 0 0
      legacy/doc/_static/mystyle.css
  9. 0 0
      legacy/doc/_templates/layout.html
  10. 0 0
      legacy/doc/compiler.rst
  11. 0 0
      legacy/doc/conf.py
  12. 0 0
      legacy/doc/examples.rst
  13. 0 0
      legacy/doc/index.rst
  14. 0 0
      legacy/doc/installation.rst
  15. 0 0
      legacy/doc/internal_documentation.rst
  16. 0 0
      legacy/doc/language_features.rst
  17. 0 0
      legacy/doc/make.bat
  18. 0 0
      legacy/doc/runtime_platforms.rst
  19. 0 0
      legacy/doc/semantic_options.rst
  20. 0 0
      legacy/doc/sockets.rst
  21. 0 0
      legacy/doc/statecharts_core_int.rst
  22. 0 0
      legacy/examples/HTTP_client/Makefile
  23. 0 0
      legacy/examples/HTTP_client/classes/http_client.xml
  24. 0 0
      legacy/examples/HTTP_client/classes/prompt.xml
  25. 0 0
      legacy/examples/HTTP_client/client.py
  26. 0 0
      legacy/examples/HTTP_client/client.xml
  27. 0 0
      legacy/examples/HTTP_client/make.bat
  28. 0 0
      legacy/examples/HTTP_client/run.sh
  29. 0 0
      legacy/examples/HTTP_client/run_client.py
  30. 0 0
      legacy/examples/HTTP_server/Makefile
  31. 0 0
      legacy/examples/HTTP_server/classes/echo.xml
  32. 0 0
      legacy/examples/HTTP_server/classes/server.xml
  33. 0 0
      legacy/examples/HTTP_server/classes/socket.xml
  34. 0 0
      legacy/examples/HTTP_server/make.bat
  35. 0 0
      legacy/examples/HTTP_server/run_echo_server.py
  36. 0 0
      legacy/examples/HTTP_server/server.py
  37. 0 0
      legacy/examples/HTTP_server/server.xml
  38. 0 0
      legacy/examples/Makefile
  39. 0 0
      legacy/examples/bouncingballs/Makefile
  40. 0 0
      legacy/examples/bouncingballs/js/Makefile
  41. 0 0
      legacy/examples/bouncingballs/js/index.html
  42. 0 0
      legacy/examples/bouncingballs/js/make.bat
  43. 0 0
      legacy/examples/bouncingballs/js/sccd.xml
  44. 0 0
      legacy/examples/bouncingballs/python/Makefile
  45. 0 0
      legacy/examples/bouncingballs/python/__init__.py
  46. 0 0
      legacy/examples/bouncingballs/python/make.bat
  47. 0 0
      legacy/examples/bouncingballs/python/runner.py
  48. 0 0
      legacy/examples/bouncingballs/python/runner_multiwindow.py
  49. 0 0
      legacy/examples/bouncingballs/python/runner_no_ui.py
  50. 0 0
      legacy/examples/bouncingballs/python/runner_performance.py
  51. 0 0
      legacy/examples/bouncingballs/python/runner_performance_cpu_time.py
  52. 0 0
      legacy/examples/bouncingballs/python/runner_performance_threads.py
  53. 0 0
      legacy/examples/bouncingballs/python/sccd.xml
  54. 0 0
      legacy/examples/bouncingballs/python/sccd_multiwindow.xml
  55. 0 0
      legacy/examples/bouncingballs/python/sccd_no_ui.py
  56. 0 0
      legacy/examples/bouncingballs/python/sccd_no_ui.xml
  57. 0 0
      legacy/examples/bouncingballs/python/sccd_performance.xml
  58. 0 0
      legacy/examples/bouncingballs/python/sccd_performance_cpu_time.xml
  59. 0 0
      legacy/examples/bouncingballs/python/sccd_performance_threads.xml
  60. 0 0
      legacy/examples/bouncingballs/python/ui_classes.py
  61. 0 0
      legacy/examples/bouncingballs/python/widget.py
  62. 0 0
      legacy/examples/bouncingballs/python/widget_private_ports.py
  63. 0 0
      legacy/examples/external-input/python/runner.py
  64. 0 0
      legacy/examples/external-input/python/test.py
  65. 0 0
      legacy/examples/external-input/python/test.xml
  66. 0 0
      legacy/examples/my-tests/python/Parallel_Bug/runner.py
  67. 0 0
      legacy/examples/my-tests/python/Parallel_Bug/tester.py
  68. 0 0
      legacy/examples/my-tests/python/Parallel_Bug/tester.xml
  69. 0 0
      legacy/examples/my-tests/python/SCCD_broadcast/runner.py
  70. 0 0
      legacy/examples/my-tests/python/SCCD_broadcast/tester.py
  71. 0 0
      legacy/examples/my-tests/python/SCCD_broadcast/tester.xml
  72. 0 0
      legacy/examples/my-tests/python/Yentil/runner.py
  73. 0 0
      legacy/examples/my-tests/python/Yentil/sccd_widget.py
  74. 0 0
      legacy/examples/my-tests/python/Yentil/tester.py
  75. 0 0
      legacy/examples/my-tests/python/Yentil/tester.xml
  76. 0 0
      legacy/examples/my-tests/python/bugwithsourcechild.py
  77. 0 0
      legacy/examples/my-tests/python/bugwithsourcechild.xml
  78. 0 0
      legacy/examples/my-tests/python/create_and_start.py
  79. 0 0
      legacy/examples/my-tests/python/create_and_start.xml
  80. 0 0
      legacy/examples/my-tests/python/else_transition.py
  81. 0 0
      legacy/examples/my-tests/python/else_transition.xml
  82. 0 0
      legacy/examples/my-tests/python/eventloop_bug.py
  83. 0 0
      legacy/examples/my-tests/python/eventloop_bug.xml
  84. 0 0
      legacy/examples/my-tests/python/exit_parallel.py
  85. 0 0
      legacy/examples/my-tests/python/exit_parallel.xml
  86. 0 0
      legacy/examples/my-tests/python/multiple_afters_running_behind.py
  87. 0 0
      legacy/examples/my-tests/python/multiple_afters_running_behind.xml
  88. 0 0
      legacy/examples/my-tests/python/multiple_raises_parallel.py
  89. 0 0
      legacy/examples/my-tests/python/multiple_raises_parallel.xml
  90. 0 0
      legacy/examples/my-tests/python/runner.py
  91. 0 0
      legacy/examples/my-tests/python/runner_bugwithsourcechild.py
  92. 0 0
      legacy/examples/my-tests/python/runner_create_and_start.py
  93. 0 0
      legacy/examples/my-tests/python/runner_else_transition.py
  94. 0 0
      legacy/examples/my-tests/python/runner_eventloop_bug.py
  95. 0 0
      legacy/examples/my-tests/python/runner_exit_parallel.py
  96. 0 0
      legacy/examples/my-tests/python/runner_multiple_afters_running_behind.py
  97. 0 0
      legacy/examples/my-tests/python/runner_multiple_raises_parallel.py
  98. 0 0
      legacy/examples/my-tests/python/server.py
  99. 0 0
      legacy/examples/my-tests/python/server.xml
  100. 0 0
      examples/tanks/AIMap.py

+ 636 - 0
examples/digitalwatch/DigitalWatchGUI.py

@@ -0,0 +1,636 @@
+#
+# DigitalWatchGUI.py
+#
+# class DigitalWatchGUI provides a simple Tkinter GUI for a Digital Watch
+# to add: battery dies ... DONE OCT 2008 by Reehan Shaikh reehan.shaikh@cs.mcgill.ca
+
+# Updated for the SCCDXML compiler and AToMPM formalism by Yentl Van Tendeloo
+
+from time import localtime
+from tkinter import Frame, PhotoImage, Canvas
+from tkinter.constants import BOTH
+
+
+CANVAS_W = 222
+CANVAS_H = 236
+
+OVAL_X0 = 2
+OVAL_Y0 = 1
+OVAL_X1 = CANVAS_W - OVAL_X0 
+OVAL_Y1 = CANVAS_H - OVAL_Y0 
+
+RECT_X0 = 51
+RECT_Y0 = 95
+RECT_X1 = CANVAS_W - RECT_X0 + 1
+RECT_Y1 = CANVAS_H - RECT_Y0 + 10 
+
+FONT_TIME = ("terminal", 14)
+FONT_DATE = ("terminal", 8)
+FONT_NOTE = ("symbol", 10)
+
+
+class DigitalWatchGUI:
+    
+    def __init__(self, parent):
+        self.controller = DigitalWatchGUI_Controller()
+        self.staticGUI = DigitalWatchGUI_Static(parent, self.controller)
+        self.dynamicGUI = DigitalWatchGUI_Dynamic(self.controller)
+
+                     
+class DigitalWatchGUI_Controller:
+
+    def __init__(self):
+        self.statechart = None
+        self.GUI = None
+        self.battery = True
+                
+    def bindDynamic(self, statechart):
+        self.statechart = statechart
+    
+    def bindStatic(self, GUI):
+        self.GUI = GUI
+                            
+    # Interface for the GUI                                                                 
+    def window_close(self):
+        import sys
+        sys.exit(0)
+        self.statechart.event('GUIQuit')
+
+    def topRightPressed(self):
+        self.statechart.event('topRightPressed')
+
+    def topRightReleased(self):
+        self.statechart.event('topRightReleased')
+    
+    def topLeftPressed(self):
+        self.statechart.event('topLeftPressed')
+    
+    def topLeftReleased(self):
+        self.statechart.event('topLeftReleased')
+        
+    def bottomRightPressed(self):
+        self.statechart.event('bottomRightPressed')
+
+    def bottomRightReleased(self):
+        self.statechart.event('bottomRightReleased')
+    
+    def bottomLeftPressed(self):
+        self.statechart.event('bottomLeftPressed')
+    
+    def bottomLeftReleased(self):
+        self.statechart.event('bottomLeftReleased')
+
+    def alarm(self):
+        self.statechart.event('alarmStart')
+        
+    # Interface for the statechart
+     
+    # synchronize the state with the display:
+
+    def batteryHalf(self):
+        self.battery = False
+        self.GUI.battery = False
+        self.refreshDateDisplay()
+ 
+    def batteryFull(self):
+        self.battery = True
+        self.GUI.battery = True
+        self.refreshDateDisplay()
+ 
+    def refreshTimeDisplay(self):
+        self.GUI.drawTime()
+                        
+    def refreshChronoDisplay(self):
+        self.GUI.drawChrono()
+    
+    def refreshDateDisplay(self):        
+        self.GUI.drawDate()
+        
+    def refreshAlarmDisplay(self):
+        self.GUI.drawAlarm()        
+     
+    # Modify the state:
+    
+    def increaseTimeByOne(self):
+        self.GUI.increaseTimeByOne()        
+     
+    def resetChrono(self):
+        self.GUI.resetChrono()
+        
+    def increaseChronoByOne(self):
+        self.GUI.increaseChronoByOne()
+        
+    # Select current display:
+    def startSelection(self):
+        self.GUI.startSelection()
+        
+    def selectNext(self):
+        self.GUI.selectNext()        
+             
+    # Modify the state corresponing to the selection    
+    def increaseSelection(self):
+        self.GUI.increaseSelection()
+                
+    def stopSelection(self):
+        self.GUI.stopSelection()
+                 
+    # Light / Alarm:
+    
+    def setIndiglo(self):
+        self.GUI.setIndiglo()
+        
+    def unsetIndiglo(self):
+        self.GUI.unsetIndiglo()
+        
+    def setAlarm(self):
+        self.GUI.setAlarm()
+
+    # Query 
+    def getTime(self):
+        return self.GUI.getTime()
+
+    def getAlarm(self):
+        return self.GUI.getAlarm()
+         
+    # Check if time = alarm set time
+    def checkTime(self):
+        if self.GUI.getTime()[0] == self.GUI.getAlarm()[0] and self.GUI.getTime()[1] == self.GUI.getAlarm()[1] and self.GUI.getTime()[2] == self.GUI.getAlarm()[2]:
+            #self.alarm()
+            return True
+        else:
+            return False
+
+        
+class DigitalWatchGUI_Dynamic:
+    
+    def __init__(self, controller):
+        self.controller = controller
+        self.controller.bindDynamic(self)
+
+    def setStatechart(self, controller):
+        print("STATECHART set")
+        self.controller_Yakindu = controller
+        
+    def event(self, evt):
+        self.controller_Yakindu.add_input(evt)
+
+#======================================================================#
+# GUI Static class
+
+
+class DigitalWatchGUI_Static(Frame):
+
+    def __init__(self, parent, controller):
+        Frame.__init__(self, parent)
+
+        self.parent = parent
+        self.controller = controller
+        self.controller.bindStatic(self)
+        self.battery = True
+        
+        tmpDate = list(localtime()[0:3]) 
+        self.curDate = [tmpDate[1], tmpDate[2], int(str(tmpDate[0])[3:]) ] 
+        self.dateTag = None
+        
+        self.curTime = list(localtime()[3:6])
+        self.timeTag = None
+        
+        self.curAlarm = [12, 0, 0]
+        self.alarmTag = None
+        
+        self.curChrono = [0, 0, 0]
+        self.chronoTag = None
+        
+        self.noteImage = PhotoImage(file="./noteSmall.gif")        
+        self.watchImage = PhotoImage(file="./watch.gif")
+        
+        self.alarmNoteTag = None
+        
+        self.curSelectionInfo = None
+        self.curSelection = ["hours", "minutes", "seconds",
+                                                         "months", "days", "years"]
+        self.curSelectionIndex = 0 
+        
+        self.lastPressed = ""
+                
+        self.createWidgets()
+        
+        # self.b_playpause.focus_force()
+        parent.protocol("WM_DELETE_WINDOW", self.controller.window_close)
+        
+        self.drawTime()
+        self.drawDate()
+                    
+    def getTime(self):
+        return self.curTime
+
+    def getAlarm(self):
+        return self.curAlarm 
+        
+    def createWidgets(self):
+
+        self.pack()
+        self.displayCanvas = Canvas(master=self,
+                                                     takefocus=1,
+                                                     width=CANVAS_W, height=CANVAS_H,
+                                                     background="black")
+    
+        self.displayCanvas.pack(fill=BOTH, expand=1)
+        self.displayCanvas.focus_set()
+        
+        self.watch = self.displayCanvas.create_image(0, 0, image=self.watchImage, anchor="nw")
+                
+        self.display = self.displayCanvas.create_rectangle(RECT_X0,
+                                                                                                             RECT_Y0,
+                                                                                                             RECT_X1,
+                                                                                                             RECT_Y1,
+                                                                                                             fill="#DCDCDC")
+                                                                                                             
+        self.topRightButton = self.displayCanvas.create_rectangle(CANVAS_W - 13,
+                                                                                                                            60,
+                                                                                                                            CANVAS_W - 3,
+                                                                                                                            70,
+                                                                                                                            fill='')
+
+        self.topLeftButton = self.displayCanvas.create_rectangle(3,
+                                                                                                                         62,
+                                                                                                                         13,
+                                                                                                                         72,
+                                                                                                                         fill='')
+                                                                                                                            
+        self.bottomRightButton = self.displayCanvas.create_rectangle(CANVAS_W - 10,
+                                                                                                                     162,
+                                                                                                                     CANVAS_W,
+                                                                                                                     172,
+                                                                                                                     fill='')
+                                                                                                                     
+        self.bottomLeftButton = self.displayCanvas.create_rectangle(3,
+                                                                                                                                161,
+                                                                                                                                13,
+                                                                                                                                171,
+                                                                                                                                fill='')
+                                                                                                                                                                                                                                                                    
+        self.displayCanvas.bind("<ButtonPress-1>", self.mouse1Click)
+        self.displayCanvas.bind("<ButtonRelease-1>", self.mouse1Release)                                                                                                                            
+                                                                                                                                                                                             
+    def mouse1Click(self, event):
+        X = self.displayCanvas.canvasx(event.x)
+        Y = self.displayCanvas.canvasy(event.y)
+        
+        objTag = self.displayCanvas.find_closest(X, Y, halo=5)
+                
+        if self.topRightButton in objTag:
+            self.controller.topRightPressed()
+            self.lastPressed = "topRight"
+        elif self.topLeftButton in objTag:
+            self.controller.topLeftPressed()
+            self.lastPressed = "topLeft"
+        elif self.bottomLeftButton in objTag:
+            self.controller.bottomLeftPressed()
+            self.lastPressed = "bottomLeft"
+        elif self.bottomRightButton in objTag:
+            self.controller.bottomRightPressed()
+            self.lastPressed = "bottomRight"
+        else:
+            self.lastPressed = ""
+    
+    def mouse1Release(self, event):
+        if self.lastPressed == "topRight":
+            self.controller.topRightReleased()
+        elif self.lastPressed == "topLeft":
+            self.controller.topLeftReleased()
+        elif self.lastPressed == "bottomLeft":
+            self.controller.bottomLeftReleased()
+        elif self.lastPressed == "bottomRight":
+            self.controller.bottomRightReleased()
+        self.lastPressed = ""
+                
+    def __intToString(self, i):
+        if i < 10:
+            return "0" + str(i)
+        else:
+            return str(i)
+            
+    def __getTimeAsString(self):
+        hours = self.__intToString(self.curTime[0])
+        minutes = self.__intToString(self.curTime[1])
+        seconds = self.__intToString(self.curTime[2])                
+                                    
+        return hours + ":" + minutes + ":" + seconds
+        
+    def __getAlarmAsString(self):    
+        hours = self.__intToString(self.curAlarm[0])
+        minutes = self.__intToString(self.curAlarm[1])
+        seconds = self.__intToString(self.curAlarm[2])                
+                                    
+        return hours + ":" + minutes + ":" + seconds    
+        
+    def __getChronoAsString(self):
+        minutes = self.__intToString(self.curChrono[0])
+        seconds = self.__intToString(self.curChrono[1])
+        centisecs = self.__intToString(self.curChrono[2])
+
+        return minutes + ":" + seconds + ":" + centisecs 
+        
+    def __getDateAsString(self):     
+        month = self.__intToString(self.curDate[0])
+        day = self.__intToString(self.curDate[1])
+        year = self.__intToString(self.curDate[2])
+        
+        return month + "/" + day + "/" + year
+        
+    def increaseHoursByOne(self):
+        if self.timeTag != None:
+            self.curTime[0] = (self.curTime[0] + 1) % 24
+        else:
+            self.curAlarm[0] = (self.curAlarm[0] + 1) % 24
+        
+    def increaseMinutesByOne(self):
+        if self.timeTag != None:
+            self.curTime[1] = (self.curTime[1] + 1) % 60
+        else:
+            self.curAlarm[1] = (self.curAlarm[1] + 1) % 60
+    
+    def increaseSecondsByOne(self):
+        if self.timeTag != None:
+            self.curTime[2] = (self.curTime[2] + 1) % 60
+        else:
+            self.curAlarm[2] = (self.curAlarm[2] + 1) % 60
+        
+    def increaseMonthsByOne(self):
+        self.curDate[0] = (self.curDate[0] + 1) % 13
+        if self.curDate[0] == 0:
+            self.curDate[0] = 1
+        
+    def increaseDaysByOne(self):
+        numDays = self.getNumDays()
+        self.curDate[1] = (self.curDate[1] + 1) % (numDays + 1)
+        if self.curDate[1] == 0:
+            self.curDate[1] = 1
+        
+    def increaseYearsByOne(self):
+        self.curDate[2] = (self.curDate[2] + 1) % 100
+        if self.curDate[2] == 0:
+            self.curDate[2] = 1
+        
+    def getNumDays(self):
+        month = self.curDate[0]
+        year = self.curDate[2]
+        numDays = 0
+        if month == 2:    # february
+            if year % 4 == 0:    # leap year
+                numDays = 29
+            else:
+                numDays = 28
+        else:
+            if (month % 2 == 1 and month <= 7) or (month % 2 == 0 and month >= 8):
+                numDays = 31
+            else:
+                numDays = 30
+        return numDays
+        
+    def stopSelection(self):
+        if self.curSelectionInfo != None:
+            self.parent.after_cancel(self.curSelectionInfo[0])
+            self.parent.after_cancel(self.curSelectionInfo[1])
+            self.parent.after_cancel(self.curSelectionInfo[2])            
+            self.curSelectionInfo = None 
+            
+        if self.timeTag != None:
+            self.drawTime()
+            self.drawDate()
+        else:
+            self.drawAlarm()
+    
+    def increaseSelection(self):
+    
+        self.stopSelection()
+        selection = self.curSelection[self.curSelectionIndex]
+
+        if selection == "hours":
+            self.increaseHoursByOne()         
+        elif selection == "minutes":
+            self.increaseMinutesByOne()
+        elif selection == "seconds":
+            self.increaseSecondsByOne()
+        elif selection == "months":
+            self.increaseMonthsByOne()
+        elif selection == "days":
+            self.increaseDaysByOne()
+        elif selection == "years":
+            self.increaseYearsByOne()
+            
+        if self.timeTag != None:
+            self.drawTime()
+            self.drawDate()            
+        else:
+            self.drawAlarm()
+            
+        self.animateSelection()
+    
+    def selectNext(self):
+        self.stopSelection()
+        if self.timeTag != None:
+            numDigits = len(self.curSelection)
+            self.drawTime()
+            self.drawDate()
+        else:
+            numDigits = 3
+            self.drawAlarm()
+        self.curSelectionIndex = (self.curSelectionIndex + 1) % numDigits
+        self.animateSelection()
+        
+    def startSelection(self):
+        self.curSelectionIndex = 0
+        self.animateSelection()
+                    
+    def animateSelection(self):
+ 
+        timeFunc = None
+        if self.timeTag != None:
+            timeFunc = self.drawTime
+        else:
+            timeFunc = self.drawAlarm
+ 
+        curSelection = self.curSelection[self.curSelectionIndex]
+        deleteEvent = None
+        creationEvent = None
+
+        if curSelection in ["hours", "minutes", "seconds"]:
+            toDrawTime = ["hours", "minutes", "seconds"]
+            toDrawTime.remove(curSelection)    
+            deleteEvent = self.parent.after(500, timeFunc, toDrawTime)            
+            creationEvent = self.parent.after(1000, timeFunc)
+        else:
+            toDrawDate = ["years", "months", "days"]
+            toDrawDate.remove(curSelection)
+            deleteEvent = self.parent.after(500, self.drawDate, toDrawDate)            
+            creationEvent = self.parent.after(1000, self.drawDate)
+
+        animationEvent = self.parent.after(1000, self.animateSelection)
+
+        self.curSelectionInfo = [deleteEvent,
+                                                         creationEvent,
+                                                         animationEvent]        
+                
+    def increaseTimeByOne(self):
+        self.curTime[2] = self.curTime[2] + 1
+        self.curTime[1] = (self.curTime[1] + self.curTime[2] // 60)
+        self.curTime[0] = (self.curTime[0] + self.curTime[1] // 60)
+        
+        self.curTime[2] = self.curTime[2] % 60
+        self.curTime[1] = self.curTime[1] % 60
+        self.curTime[0] = self.curTime[0] % 24
+        
+        if self.curTime[0] == 0 and\
+             self.curTime[1] == 0 and\
+             self.curTime[2] == 0:
+            self.increaseDateByOne()
+                                                        
+    def increaseDateByOne(self):    
+        month = self.curDate[0]
+        day = self.curDate[1]
+        year = self.curDate[2]
+        
+        numMonths = 12
+        numDays = self.getNumDays()
+                                     
+        self.curDate[1] = self.curDate[1] + 1
+        self.curDate[0] = (self.curDate[0] + self.curDate[1] // (numDays + 1))
+        self.curDate[2] = (self.curDate[2] + self.curDate[0] // (numMonths + 1))
+        
+        self.curDate[1] = self.curDate[1] % (numDays + 1)
+        self.curDate[0] = self.curDate[0] % (numMonths + 1)
+        
+    def increaseChronoByOne(self):
+        self.curChrono[2] = self.curChrono[2] + 1
+        self.curChrono[1] = (self.curChrono[1] + self.curChrono[2] // 100)
+        self.curChrono[0] = (self.curChrono[0] + self.curChrono[1] // 100)
+        
+        self.curChrono[2] = self.curChrono[2] % 100
+        self.curChrono[1] = self.curChrono[1] % 100
+        self.curChrono[0] = self.curChrono[0] % 100 
+        
+    def clearDisplay(self):
+        if self.alarmTag != None:
+            self.displayCanvas.delete(self.alarmTag)
+            self.alarmTag = None
+        if self.timeTag != None:
+            self.displayCanvas.delete(self.timeTag)
+            self.timeTag = None
+        if self.chronoTag != None:
+            self.displayCanvas.delete(self.chronoTag)
+            self.chronoTag = None 
+            
+    def clearDate(self):
+        if self.dateTag != None:
+            self.displayCanvas.delete(self.dateTag)
+            self.dateTag = None
+ 
+    def drawTime(self, toDraw=["hours", "minutes", "seconds"]): 
+        timeToDraw = self.__getTimeAsString()
+
+        if "hours" not in toDraw:
+            timeToDraw = "    " + timeToDraw[2:]
+        if "minutes" not in toDraw:
+            timeToDraw = timeToDraw[0:3] + "    " + timeToDraw[5:]
+        if "seconds" not in toDraw:
+            timeToDraw = timeToDraw[0:6] + "    "
+            
+        if not self.battery:
+            timeToDraw = "88:88:88"
+
+        self.clearDisplay()         
+            
+        self.timeTag = self.displayCanvas.create_text((RECT_X0 + RECT_X1) / 2,
+                                                                                                 (RECT_Y0 + RECT_Y1) / 2 + 5,
+                                                                                                    font=FONT_TIME,
+                                                                                                    justify="center",
+                                                                                                    text=timeToDraw)
+                                                                                                    
+    def hideTime(self):
+        if self.timeTag != None:
+            self.displayCanvas.delete(self.timeTag)
+            self.timeTag = None
+                                                                                                                                 
+    def drawChrono(self):
+        chronoToDraw = self.__getChronoAsString()
+
+        self.clearDisplay()
+            
+        if not self.battery:
+            chronoToDraw = "88:88:88"
+            
+        self.chronoTag = self.displayCanvas.create_text((RECT_X0 + RECT_X1) / 2,
+                                                                                                     (RECT_Y0 + RECT_Y1) / 2 + 5,
+                                                                                                    font=FONT_TIME,
+                                                                                                    justify="center",
+                                                                                                    text=chronoToDraw)                                                                                                    
+                                                                                                                                                                                                                                    
+    def hideChrono(self):
+        if self.chronoTag != None:
+            self.displayCanvas.delete(self.chronoTag)
+            self.chronoTag = None
+            
+    def resetChrono(self):
+        self.curChrono = [0, 0, 0]
+                                                                                     
+    def drawDate(self, toDraw=["years", "months", "days"]):
+        dateToDraw = self.__getDateAsString()
+        
+        if "months" not in toDraw:
+            dateToDraw = "    " + dateToDraw[2:]            
+        if "days" not in toDraw:
+            dateToDraw = dateToDraw[0:3] + "    " + dateToDraw[5:]                     
+        if "years" not in toDraw:
+            dateToDraw = dateToDraw[0:6] + "    "
+
+        if not self.battery:
+            dateToDraw = "88/88/88"
+
+        self.clearDate()
+ 
+        self.dateTag = self.displayCanvas.create_text(RECT_X1 - 33,
+                                                                                                RECT_Y0 + 7,
+                                                                                                font=FONT_DATE,
+                                                                                                justify="center",
+                                                                                                text=dateToDraw)
+                                                                     
+    def drawAlarm(self, toDraw=["hours", "minutes", "seconds"]):        
+        alarmToDraw = self.__getAlarmAsString()
+                
+        if "hours" not in toDraw:
+            alarmToDraw = "    " + alarmToDraw[2:]
+        if "minutes" not in toDraw:
+            alarmToDraw = alarmToDraw[0:3] + "    " + alarmToDraw[5:]
+        if "seconds" not in toDraw:
+            alarmToDraw = alarmToDraw[0:6] + "    "
+
+        if not self.battery:
+            alarmToDraw = "88:88:88"
+
+        self.clearDisplay()
+        
+        self.alarmTag = self.displayCanvas.create_text((RECT_X0 + RECT_X1) / 2,
+                                                                                                    (RECT_Y0 + RECT_Y1) / 2 + 5,
+                                                                                                     font=FONT_TIME,
+                                                                                                     justify="center",
+                                                                                                     text=alarmToDraw)
+                                                                                                    
+    def hideAlarm(self):
+        if self.alarmTag != None:
+            self.displayCanvas.delete(self.alarmTag)
+            self.alarmTag = None                                                                     
+
+    def setAlarm(self):
+        if self.alarmNoteTag != None:
+            self.displayCanvas.delete(self.alarmNoteTag)
+            self.alarmNoteTag = None
+        else:
+            self.alarmNoteTag = self.displayCanvas.create_image(RECT_X0 + 5, RECT_Y0 + 3, image=self.noteImage, anchor="nw")         
+                                                                                     
+    def setIndiglo(self):
+        self.displayCanvas.itemconfigure(self.display, fill='#96DCFA')
+
+    def unsetIndiglo(self):
+        self.displayCanvas.itemconfigure(self.display, fill="#DCDCDC")            

BIN
examples/digitalwatch/noteSmall.gif


+ 527 - 0
examples/digitalwatch/statechart_digitalwatch.svg

@@ -0,0 +1,527 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<!-- Generated by graphviz version 2.40.1 (20161225.0304)
+ -->
+<!-- Title: state transitions Pages: 1 -->
+<svg width="3450pt" height="752pt"
+ viewBox="0.00 0.00 3450.00 752.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 748)">
+<title>state transitions</title>
+<polygon fill="#ffffff" stroke="transparent" points="-4,4 -4,-748 3446,-748 3446,4 -4,4"/>
+<g id="clust1" class="cluster">
+<title>cluster__P</title>
+<path fill="none" stroke="#000000" stroke-width="2" d="M20,-8C20,-8 3422,-8 3422,-8 3428,-8 3434,-14 3434,-20 3434,-20 3434,-693 3434,-693 3434,-699 3428,-705 3422,-705 3422,-705 20,-705 20,-705 14,-705 8,-699 8,-693 8,-693 8,-20 8,-20 8,-14 14,-8 20,-8"/>
+<text text-anchor="start" x="1716.9986" y="-686.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">P</text>
+</g>
+<g id="clust2" class="cluster">
+<title>cluster__P_Time</title>
+<polygon fill="none" stroke="#000000" stroke-dasharray="5,2" points="3156,-291 3156,-589 3426,-589 3426,-291 3156,-291"/>
+<text text-anchor="start" x="3277.6704" y="-570.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">Time</text>
+</g>
+<g id="clust3" class="cluster">
+<title>cluster__P_Alarm</title>
+<polygon fill="none" stroke="#000000" stroke-dasharray="5,2" points="2370,-16 2370,-647 3148,-647 3148,-16 2370,-16"/>
+<text text-anchor="start" x="2743.837" y="-628.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">Alarm</text>
+</g>
+<g id="clust4" class="cluster">
+<title>cluster__P_Alarm_Blinking</title>
+<path fill="none" stroke="#000000" stroke-width="2" d="M2924,-24C2924,-24 3128,-24 3128,-24 3134,-24 3140,-30 3140,-36 3140,-36 3140,-597 3140,-597 3140,-603 3134,-609 3128,-609 3128,-609 2924,-609 2924,-609 2918,-609 2912,-603 2912,-597 2912,-597 2912,-36 2912,-36 2912,-30 2918,-24 2924,-24"/>
+<text text-anchor="start" x="3004.9982" y="-590.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">Blinking</text>
+<text text-anchor="start" x="2923.6514" y="-570.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">onexit/ /set_alarm()⁏ unset_indiglo()⁏</text>
+<polygon fill="#000000" stroke="#000000" points="2920,-584 2920,-584 3132,-584 3132,-584 2920,-584"/>
+</g>
+<g id="clust5" class="cluster">
+<title>cluster__P_Display</title>
+<polygon fill="none" stroke="#000000" stroke-dasharray="5,2" points="963,-16 963,-667 2362,-667 2362,-16 963,-16"/>
+<text text-anchor="start" x="1643.335" y="-648.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">Display</text>
+</g>
+<g id="clust6" class="cluster">
+<title>cluster__P_Display_EditingTime</title>
+<path fill="none" stroke="#000000" stroke-width="2" d="M1678,-24C1678,-24 2238,-24 2238,-24 2244,-24 2250,-30 2250,-36 2250,-36 2250,-617 2250,-617 2250,-623 2244,-629 2238,-629 2238,-629 1678,-629 1678,-629 1672,-629 1666,-623 1666,-617 1666,-617 1666,-36 1666,-36 1666,-30 1672,-24 1678,-24"/>
+<text text-anchor="start" x="1926.8326" y="-610.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">EditingTime</text>
+<text text-anchor="start" x="1890.8218" y="-590.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">onentry/ /start_selection()</text>
+<text text-anchor="start" x="1891" y="-570.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">onexit/ /stop_selection()</text>
+<polygon fill="#000000" stroke="#000000" points="1887,-604 1887,-604 2030,-604 2030,-604 1887,-604"/>
+</g>
+<g id="clust7" class="cluster">
+<title>cluster__P_Chrono</title>
+<polygon fill="none" stroke="#000000" stroke-dasharray="5,2" points="317,-291 317,-589 955,-589 955,-291 317,-291"/>
+<text text-anchor="start" x="616.8296" y="-570.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">Chrono</text>
+</g>
+<g id="clust8" class="cluster">
+<title>cluster__P_Indiglo</title>
+<polygon fill="none" stroke="#000000" stroke-dasharray="5,2" points="24,-160 24,-589 309,-589 309,-160 24,-160"/>
+<text text-anchor="start" x="149.3282" y="-570.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">Indiglo</text>
+</g>
+<!-- __initial -->
+<g id="node1" class="node">
+<title>__initial</title>
+<ellipse fill="#000000" stroke="#000000" stroke-width="2" cx="16" cy="-738.5" rx="5.5" ry="5.5"/>
+</g>
+<!-- _P -->
+<!-- __initial&#45;&gt;_P -->
+<g id="edge1" class="edge">
+<title>__initial&#45;&gt;_P</title>
+<path fill="none" stroke="#000000" d="M16,-732.932C16,-728.8364 16,-722.6612 16,-715.0133"/>
+<polygon fill="#000000" stroke="#000000" points="19.5001,-714.995 16,-704.9951 12.5001,-714.9951 19.5001,-714.995"/>
+<text text-anchor="middle" x="17.3895" y="-716" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000"> </text>
+</g>
+<!-- _P_Time -->
+<!-- _P_Time_initial -->
+<g id="node4" class="node">
+<title>_P_Time_initial</title>
+<ellipse fill="#000000" stroke="#000000" stroke-width="2" cx="3203" cy="-545.5" rx="5.5" ry="5.5"/>
+</g>
+<!-- _P_Time_Increasing -->
+<g id="node6" class="node">
+<title>_P_Time_Increasing</title>
+<polygon fill="transparent" stroke="transparent" stroke-width="2" points="3241.5,-458 3164.5,-458 3164.5,-422 3241.5,-422 3241.5,-458"/>
+<text text-anchor="start" x="3175.8268" y="-436.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">Increasing</text>
+<path fill="none" stroke="#000000" stroke-width="2" d="M3176.8333,-423C3176.8333,-423 3229.1667,-423 3229.1667,-423 3234.8333,-423 3240.5,-428.6667 3240.5,-434.3333 3240.5,-434.3333 3240.5,-445.6667 3240.5,-445.6667 3240.5,-451.3333 3234.8333,-457 3229.1667,-457 3229.1667,-457 3176.8333,-457 3176.8333,-457 3171.1667,-457 3165.5,-451.3333 3165.5,-445.6667 3165.5,-445.6667 3165.5,-434.3333 3165.5,-434.3333 3165.5,-428.6667 3171.1667,-423 3176.8333,-423"/>
+</g>
+<!-- _P_Time_initial&#45;&gt;_P_Time_Increasing -->
+<g id="edge2" class="edge">
+<title>_P_Time_initial&#45;&gt;_P_Time_Increasing</title>
+<path fill="none" stroke="#000000" d="M3203,-539.8288C3203,-535.1736 3203,-528.4097 3203,-522.5 3203,-522.5 3203,-522.5 3203,-475.5 3203,-473.1079 3203,-470.6252 3203,-468.1342"/>
+<polygon fill="#000000" stroke="#000000" points="3206.5001,-468.0597 3203,-458.0598 3199.5001,-468.0598 3206.5001,-468.0597"/>
+<text text-anchor="middle" x="3204.3895" y="-496" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000"> </text>
+</g>
+<!-- _P_Time_Editing -->
+<g id="node5" class="node">
+<title>_P_Time_Editing</title>
+<polygon fill="transparent" stroke="transparent" stroke-width="2" points="3271,-335 3213,-335 3213,-299 3271,-299 3271,-335"/>
+<text text-anchor="start" x="3223.6622" y="-313.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">Editing</text>
+<path fill="none" stroke="#000000" stroke-width="2" d="M3225.3333,-300C3225.3333,-300 3258.6667,-300 3258.6667,-300 3264.3333,-300 3270,-305.6667 3270,-311.3333 3270,-311.3333 3270,-322.6667 3270,-322.6667 3270,-328.3333 3264.3333,-334 3258.6667,-334 3258.6667,-334 3225.3333,-334 3225.3333,-334 3219.6667,-334 3214,-328.3333 3214,-322.6667 3214,-322.6667 3214,-311.3333 3214,-311.3333 3214,-305.6667 3219.6667,-300 3225.3333,-300"/>
+</g>
+<!-- _P_Time_Editing&#45;&gt;_P_Time_Increasing -->
+<g id="edge3" class="edge">
+<title>_P_Time_Editing&#45;&gt;_P_Time_Increasing</title>
+<path fill="none" stroke="#000000" d="M3212.9709,-329.7903C3202.8623,-336.3421 3194,-345.5063 3194,-357.5 3194,-404.5 3194,-404.5 3194,-404.5 3194,-406.9141 3194.198,-409.393 3194.5352,-411.8645"/>
+<polygon fill="#000000" stroke="#000000" points="3191.1322,-412.6943 3196.555,-421.7962 3197.9918,-411.2992 3191.1322,-412.6943"/>
+<text text-anchor="start" x="3194" y="-378" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">edit_done &#160;&#160;</text>
+</g>
+<!-- _P_Time_Increasing&#45;&gt;_P_Time_Editing -->
+<g id="edge5" class="edge">
+<title>_P_Time_Increasing&#45;&gt;_P_Time_Editing</title>
+<path fill="none" stroke="#000000" d="M3241.6661,-431.4317C3264.9017,-425.1242 3290,-415.7153 3290,-404.5 3290,-404.5 3290,-404.5 3290,-357.5 3290,-348.8795 3285.4217,-341.7208 3279.0931,-335.9432"/>
+<polygon fill="#000000" stroke="#000000" points="3281.1023,-333.0738 3271.0291,-329.7903 3276.8561,-338.6388 3281.1023,-333.0738"/>
+<text text-anchor="start" x="3290" y="-378" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">time_edit &#160;&#160;</text>
+</g>
+<!-- _P_Time_Increasing&#45;&gt;_P_Time_Increasing -->
+<g id="edge4" class="edge">
+<title>_P_Time_Increasing&#45;&gt;_P_Time_Increasing</title>
+<path fill="none" stroke="#000000" d="M3241.6945,-444.8723C3253.8838,-444.7979 3263.5,-443.1738 3263.5,-440 3263.5,-437.7684 3258.7459,-436.303 3251.686,-435.6037"/>
+<polygon fill="#000000" stroke="#000000" points="3251.8497,-432.1076 3241.6945,-435.1277 3251.5166,-439.0997 3251.8497,-432.1076"/>
+<text text-anchor="start" x="3263.5" y="-437" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">after(1 s)/increase_time_by_one() &#160;&#160;</text>
+</g>
+<!-- _P_Alarm -->
+<!-- _P_Alarm_initial -->
+<g id="node8" class="node">
+<title>_P_Alarm_initial</title>
+<ellipse fill="#000000" stroke="#000000" stroke-width="2" cx="2417" cy="-545.5" rx="5.5" ry="5.5"/>
+</g>
+<!-- _P_Alarm_Off -->
+<g id="node10" class="node">
+<title>_P_Alarm_Off</title>
+<polygon fill="transparent" stroke="transparent" stroke-width="2" points="2555,-458 2499,-458 2499,-422 2555,-422 2555,-458"/>
+<text text-anchor="start" x="2518.9978" y="-436.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">Off</text>
+<path fill="none" stroke="#000000" stroke-width="2" d="M2511.3333,-423C2511.3333,-423 2542.6667,-423 2542.6667,-423 2548.3333,-423 2554,-428.6667 2554,-434.3333 2554,-434.3333 2554,-445.6667 2554,-445.6667 2554,-451.3333 2548.3333,-457 2542.6667,-457 2542.6667,-457 2511.3333,-457 2511.3333,-457 2505.6667,-457 2500,-451.3333 2500,-445.6667 2500,-445.6667 2500,-434.3333 2500,-434.3333 2500,-428.6667 2505.6667,-423 2511.3333,-423"/>
+</g>
+<!-- _P_Alarm_initial&#45;&gt;_P_Alarm_Off -->
+<g id="edge6" class="edge">
+<title>_P_Alarm_initial&#45;&gt;_P_Alarm_Off</title>
+<path fill="none" stroke="#000000" d="M2417,-539.8288C2417,-535.1736 2417,-528.4097 2417,-522.5 2417,-522.5 2417,-522.5 2417,-475.5 2417,-459.9729 2457.1962,-450.2456 2488.9914,-444.9801"/>
+<polygon fill="#000000" stroke="#000000" points="2489.6166,-448.425 2498.9577,-443.4256 2488.5378,-441.5086 2489.6166,-448.425"/>
+<text text-anchor="middle" x="2418.3895" y="-496" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000"> </text>
+</g>
+<!-- _P_Alarm_On -->
+<g id="node9" class="node">
+<title>_P_Alarm_On</title>
+<polygon fill="transparent" stroke="transparent" stroke-width="2" points="2669,-335 2613,-335 2613,-299 2669,-299 2669,-335"/>
+<text text-anchor="start" x="2632.9972" y="-313.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">On</text>
+<path fill="none" stroke="#000000" stroke-width="2" d="M2625.3333,-300C2625.3333,-300 2656.6667,-300 2656.6667,-300 2662.3333,-300 2668,-305.6667 2668,-311.3333 2668,-311.3333 2668,-322.6667 2668,-322.6667 2668,-328.3333 2662.3333,-334 2656.6667,-334 2656.6667,-334 2625.3333,-334 2625.3333,-334 2619.6667,-334 2614,-328.3333 2614,-322.6667 2614,-322.6667 2614,-311.3333 2614,-311.3333 2614,-305.6667 2619.6667,-300 2625.3333,-300"/>
+</g>
+<!-- _P_Alarm_Blinking -->
+<!-- _P_Alarm_On&#45;&gt;_P_Alarm_Blinking -->
+<g id="edge14" class="edge">
+<title>_P_Alarm_On&#45;&gt;_P_Alarm_Blinking</title>
+<path fill="none" stroke="#000000" d="M2669.2106,-319.5087C2719.05,-323.9961 2824.69,-333.7593 2901.7967,-342.6321"/>
+<polygon fill="#000000" stroke="#000000" points="2901.6644,-346.1403 2912.0023,-343.8213 2902.4746,-339.1873 2901.6644,-346.1403"/>
+<text text-anchor="start" x="2993" y="-437" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">[check_time()] &#160;&#160;</text>
+</g>
+<!-- _P_Alarm_Off&#45;&gt;_P_Alarm_On -->
+<g id="edge15" class="edge">
+<title>_P_Alarm_Off&#45;&gt;_P_Alarm_On</title>
+<path fill="none" stroke="#000000" d="M2498.8146,-437.796C2461.3994,-434.0791 2400,-424.8755 2400,-404.5 2400,-404.5 2400,-404.5 2400,-357.5 2400,-337.2127 2534.5302,-324.6325 2602.5651,-319.5676"/>
+<polygon fill="#000000" stroke="#000000" points="2603.162,-323.0335 2612.8826,-318.8192 2602.6555,-316.0519 2603.162,-323.0335"/>
+<text text-anchor="start" x="2400" y="-378" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">bottom_left_pressed [INSTATE([&quot;/Display/TimeUpdate&quot;]) or INSTATE([&quot;/Display/WaitingForAlarm&quot;])]/set_alarm() &#160;&#160;</text>
+</g>
+<!-- _P_Alarm_Blinking&#45;&gt;_P_Alarm_Off -->
+<g id="edge10" class="edge">
+<title>_P_Alarm_Blinking&#45;&gt;_P_Alarm_Off</title>
+<path fill="none" stroke="#000000" d="M2912.0022,-537.3268C2899.1682,-530.7419 2882,-537.8314 2882,-522.5 2882,-522.5 2882,-522.5 2882,-475.5 2882,-459.7298 2657.2665,-446.5812 2565.416,-441.8659"/>
+<polygon fill="#000000" stroke="#000000" points="2565.3173,-438.3565 2555.153,-441.3458 2564.963,-445.3475 2565.3173,-438.3565"/>
+<text text-anchor="start" x="2882" y="-496" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">top_right_pressed &#160;&#160;</text>
+</g>
+<!-- _P_Alarm_Blinking&#45;&gt;_P_Alarm_Off -->
+<g id="edge11" class="edge">
+<title>_P_Alarm_Blinking&#45;&gt;_P_Alarm_Off</title>
+<path fill="none" stroke="#000000" d="M2912.0028,-538.8777C2872.8417,-531.5654 2601.5757,-532.9068 2584,-532 2557.2854,-530.6217 2464,-549.2501 2464,-522.5 2464,-522.5 2464,-522.5 2464,-475.5 2464,-461.6597 2475.6831,-453.1563 2488.9869,-447.9599"/>
+<polygon fill="#000000" stroke="#000000" points="2490.4082,-451.1771 2498.8168,-444.7316 2488.2239,-444.5266 2490.4082,-451.1771"/>
+<text text-anchor="start" x="2464" y="-496" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">top_left_pressed &#160;&#160;</text>
+</g>
+<!-- _P_Alarm_Blinking&#45;&gt;_P_Alarm_Off -->
+<g id="edge12" class="edge">
+<title>_P_Alarm_Blinking&#45;&gt;_P_Alarm_Off</title>
+<path fill="none" stroke="#000000" d="M2912.0013,-538.5392C2882.7277,-530.6573 2752.2193,-533.0584 2733,-532 2701.2004,-530.2489 2590,-554.3478 2590,-522.5 2590,-522.5 2590,-522.5 2590,-475.5 2590,-461.6597 2578.3169,-453.1563 2565.0131,-447.9599"/>
+<polygon fill="#000000" stroke="#000000" points="2565.7761,-444.5266 2555.1832,-444.7316 2563.5918,-451.1771 2565.7761,-444.5266"/>
+<text text-anchor="start" x="2590" y="-496" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">bottom_right_pressed &#160;&#160;</text>
+</g>
+<!-- _P_Alarm_Blinking&#45;&gt;_P_Alarm_Off -->
+<g id="edge13" class="edge">
+<title>_P_Alarm_Blinking&#45;&gt;_P_Alarm_Off</title>
+<path fill="none" stroke="#000000" d="M2912.0024,-538.5871C2881.9942,-531.3923 2739,-541.1914 2739,-522.5 2739,-522.5 2739,-522.5 2739,-475.5 2739,-458.0819 2626.2437,-447.1883 2565.196,-442.5667"/>
+<polygon fill="#000000" stroke="#000000" points="2565.3819,-439.071 2555.152,-441.8276 2564.8681,-446.0522 2565.3819,-439.071"/>
+<text text-anchor="start" x="2739" y="-496" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">bottom_left_pressed &#160;&#160;</text>
+</g>
+<!-- _P_Alarm_Blinking_initial -->
+<g id="node12" class="node">
+<title>_P_Alarm_Blinking_initial</title>
+<ellipse fill="#000000" stroke="#000000" stroke-width="2" cx="3108" cy="-545.5" rx="5.5" ry="5.5"/>
+</g>
+<!-- _P_Alarm_Blinking_On -->
+<g id="node14" class="node">
+<title>_P_Alarm_Blinking_On</title>
+<polygon fill="transparent" stroke="transparent" stroke-width="2" points="3127.5,-340 3000.5,-340 3000.5,-294 3127.5,-294 3127.5,-340"/>
+<text text-anchor="start" x="3056.4972" y="-323.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">On</text>
+<text text-anchor="start" x="3006.8226" y="-303.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">onentry/ /set_indiglo()</text>
+<polygon fill="#000000" stroke="#000000" points="3001,-317 3001,-317 3128,-317 3128,-317 3001,-317"/>
+<path fill="none" stroke="#000000" stroke-width="2" d="M3013.5,-295C3013.5,-295 3114.5,-295 3114.5,-295 3120.5,-295 3126.5,-301 3126.5,-307 3126.5,-307 3126.5,-327 3126.5,-327 3126.5,-333 3120.5,-339 3114.5,-339 3114.5,-339 3013.5,-339 3013.5,-339 3007.5,-339 3001.5,-333 3001.5,-327 3001.5,-327 3001.5,-307 3001.5,-307 3001.5,-301 3007.5,-295 3013.5,-295"/>
+</g>
+<!-- _P_Alarm_Blinking_initial&#45;&gt;_P_Alarm_Blinking_On -->
+<g id="edge7" class="edge">
+<title>_P_Alarm_Blinking_initial&#45;&gt;_P_Alarm_Blinking_On</title>
+<path fill="none" stroke="#000000" d="M3108,-539.8288C3108,-535.1736 3108,-528.4097 3108,-522.5 3108,-522.5 3108,-522.5 3108,-357.5 3108,-354.5832 3107.4701,-351.8189 3106.5266,-349.2087"/>
+<polygon fill="#000000" stroke="#000000" points="3109.5109,-347.3767 3101.5076,-340.4342 3103.4347,-350.8523 3109.5109,-347.3767"/>
+<text text-anchor="middle" x="3109.3895" y="-437" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000"> </text>
+</g>
+<!-- _P_Alarm_Blinking_Off -->
+<g id="node13" class="node">
+<title>_P_Alarm_Blinking_Off</title>
+<polygon fill="transparent" stroke="transparent" stroke-width="2" points="3096,-78 2956,-78 2956,-32 3096,-32 3096,-78"/>
+<text text-anchor="start" x="3017.9978" y="-61.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">Off</text>
+<text text-anchor="start" x="2961.6518" y="-41.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">onentry/ /unset_indiglo()</text>
+<polygon fill="#000000" stroke="#000000" points="2956,-55 2956,-55 3096,-55 3096,-55 2956,-55"/>
+<path fill="none" stroke="#000000" stroke-width="2" d="M2969,-33C2969,-33 3083,-33 3083,-33 3089,-33 3095,-39 3095,-45 3095,-45 3095,-65 3095,-65 3095,-71 3089,-77 3083,-77 3083,-77 2969,-77 2969,-77 2963,-77 2957,-71 2957,-65 2957,-65 2957,-45 2957,-45 2957,-39 2963,-33 2969,-33"/>
+</g>
+<!-- _P_Alarm_Blinking_Off&#45;&gt;_P_Alarm_Blinking_On -->
+<g id="edge8" class="edge">
+<title>_P_Alarm_Blinking_Off&#45;&gt;_P_Alarm_Blinking_On</title>
+<path fill="none" stroke="#000000" d="M2958.567,-78.1422C2954.4943,-82.8956 2952,-88.6166 2952,-95.5 2952,-273.5 2952,-273.5 2952,-273.5 2952,-273.5 2972.1505,-281.3263 2995.3572,-290.3396"/>
+<polygon fill="#000000" stroke="#000000" points="2994.1316,-293.6183 3004.7204,-293.9762 2996.666,-287.0932 2994.1316,-293.6183"/>
+<text text-anchor="start" x="2952" y="-183" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">after(500 ms) &#160;&#160;</text>
+</g>
+<!-- _P_Alarm_Blinking_On&#45;&gt;_P_Alarm_Blinking_Off -->
+<g id="edge9" class="edge">
+<title>_P_Alarm_Blinking_On&#45;&gt;_P_Alarm_Blinking_Off</title>
+<path fill="none" stroke="#000000" d="M3064,-293.9729C3064,-287.3628 3064,-280.1458 3064,-273.5 3064,-273.5 3064,-273.5 3064,-95.5 3064,-92.6165 3063.4814,-89.8541 3062.5654,-87.2237"/>
+<polygon fill="#000000" stroke="#000000" points="3065.5684,-85.4191 3057.7251,-78.2964 3059.4147,-88.7556 3065.5684,-85.4191"/>
+<text text-anchor="start" x="3064" y="-183" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">after(500 ms) &#160;&#160;</text>
+</g>
+<!-- _P_Display -->
+<!-- _P_Display_initial -->
+<g id="node16" class="node">
+<title>_P_Display_initial</title>
+<ellipse fill="#000000" stroke="#000000" stroke-width="2" cx="1347" cy="-317" rx="5.5" ry="5.5"/>
+</g>
+<!-- _P_Display_TimeUpdate -->
+<g id="node20" class="node">
+<title>_P_Display_TimeUpdate</title>
+<polygon fill="transparent" stroke="transparent" stroke-width="2" points="1437,-209 1257,-209 1257,-163 1437,-163 1437,-209"/>
+<text text-anchor="start" x="1314.33" y="-192.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">TimeUpdate</text>
+<text text-anchor="start" x="1262.6568" y="-172.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">onentry/ /refresh_time_display()</text>
+<polygon fill="#000000" stroke="#000000" points="1257,-186 1257,-186 1437,-186 1437,-186 1257,-186"/>
+<path fill="none" stroke="#000000" stroke-width="2" d="M1270,-164C1270,-164 1424,-164 1424,-164 1430,-164 1436,-170 1436,-176 1436,-176 1436,-196 1436,-196 1436,-202 1430,-208 1424,-208 1424,-208 1270,-208 1270,-208 1264,-208 1258,-202 1258,-196 1258,-196 1258,-176 1258,-176 1258,-170 1264,-164 1270,-164"/>
+</g>
+<!-- _P_Display_initial&#45;&gt;_P_Display_TimeUpdate -->
+<g id="edge16" class="edge">
+<title>_P_Display_initial&#45;&gt;_P_Display_TimeUpdate</title>
+<path fill="none" stroke="#000000" d="M1347,-311.369C1347,-303.077 1347,-287.0938 1347,-273.5 1347,-273.5 1347,-273.5 1347,-226.5 1347,-224.127 1347,-221.6757 1347,-219.2081"/>
+<polygon fill="#000000" stroke="#000000" points="1350.5001,-219.1306 1347,-209.1306 1343.5001,-219.1306 1350.5001,-219.1306"/>
+<text text-anchor="middle" x="1348.3895" y="-247" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000"> </text>
+</g>
+<!-- _P_Display_WaitingForAlarm -->
+<g id="node17" class="node">
+<title>_P_Display_WaitingForAlarm</title>
+<polygon fill="transparent" stroke="transparent" stroke-width="2" points="1081.5,-73 970.5,-73 970.5,-37 1081.5,-37 1081.5,-73"/>
+<text text-anchor="start" x="981.839" y="-51.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">WaitingForAlarm</text>
+<path fill="none" stroke="#000000" stroke-width="2" d="M982.8333,-38C982.8333,-38 1069.1667,-38 1069.1667,-38 1074.8333,-38 1080.5,-43.6667 1080.5,-49.3333 1080.5,-49.3333 1080.5,-60.6667 1080.5,-60.6667 1080.5,-66.3333 1074.8333,-72 1069.1667,-72 1069.1667,-72 982.8333,-72 982.8333,-72 977.1667,-72 971.5,-66.3333 971.5,-60.6667 971.5,-60.6667 971.5,-49.3333 971.5,-49.3333 971.5,-43.6667 977.1667,-38 982.8333,-38"/>
+</g>
+<!-- _P_Display_EditingTime -->
+<!-- _P_Display_WaitingForAlarm&#45;&gt;_P_Display_EditingTime -->
+<g id="edge17" class="edge">
+<title>_P_Display_WaitingForAlarm&#45;&gt;_P_Display_EditingTime</title>
+<path fill="none" stroke="#000000" d="M1011.1196,-73.0587C1003.1594,-83.9116 994.1594,-98.4116 990,-113 970.4377,-181.6115 993,-202.1542 993,-273.5 993,-522.5 993,-522.5 993,-522.5 993,-538.9039 1455.0888,-543.7199 1655.7765,-545.0379"/>
+<polygon fill="#000000" stroke="#000000" points="1655.9814,-548.5392 1666.0037,-545.1035 1656.0264,-541.5394 1655.9814,-548.5392"/>
+<text text-anchor="start" x="993" y="-314" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">after(1500 ms)^alarm_edit &#160;&#160;</text>
+</g>
+<!-- _P_Display_ChronoUpdate -->
+<g id="node18" class="node">
+<title>_P_Display_ChronoUpdate</title>
+<polygon fill="transparent" stroke="transparent" stroke-width="2" points="1273,-73 1173,-73 1173,-37 1273,-37 1273,-73"/>
+<text text-anchor="start" x="1183.9892" y="-51.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">ChronoUpdate</text>
+<path fill="none" stroke="#000000" stroke-width="2" d="M1185.3333,-38C1185.3333,-38 1260.6667,-38 1260.6667,-38 1266.3333,-38 1272,-43.6667 1272,-49.3333 1272,-49.3333 1272,-60.6667 1272,-60.6667 1272,-66.3333 1266.3333,-72 1260.6667,-72 1260.6667,-72 1185.3333,-72 1185.3333,-72 1179.6667,-72 1174,-66.3333 1174,-60.6667 1174,-60.6667 1174,-49.3333 1174,-49.3333 1174,-43.6667 1179.6667,-38 1185.3333,-38"/>
+</g>
+<!-- _P_Display_ChronoUpdate&#45;&gt;_P_Display_ChronoUpdate -->
+<g id="edge19" class="edge">
+<title>_P_Display_ChronoUpdate&#45;&gt;_P_Display_ChronoUpdate</title>
+<path fill="none" stroke="#000000" d="M1273.1354,-60.5478C1285.6477,-60.1598 1295,-58.3105 1295,-55 1295,-52.6723 1290.3764,-51.067 1283.2816,-50.1841"/>
+<polygon fill="#000000" stroke="#000000" points="1283.3613,-46.6809 1273.1354,-49.4522 1282.8576,-53.6627 1283.3613,-46.6809"/>
+<text text-anchor="start" x="1295" y="-52" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">after(10 ms)/refresh_chrono_display() &#160;&#160;</text>
+</g>
+<!-- _P_Display_ChronoUpdate&#45;&gt;_P_Display_TimeUpdate -->
+<g id="edge18" class="edge">
+<title>_P_Display_ChronoUpdate&#45;&gt;_P_Display_TimeUpdate</title>
+<path fill="none" stroke="#000000" d="M1172.749,-72.7145C1165.2641,-78.4348 1160,-85.8781 1160,-95.5 1160,-142.5 1160,-142.5 1160,-142.5 1160,-162.7974 1202.3232,-173.6275 1246.7,-179.4044"/>
+<polygon fill="#000000" stroke="#000000" points="1246.4372,-182.8982 1256.7865,-180.6303 1247.2819,-175.9493 1246.4372,-182.8982"/>
+<text text-anchor="start" x="1160" y="-116" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">top_left_pressed &#160;&#160;</text>
+</g>
+<!-- _P_Display_WaitingToEdit -->
+<g id="node19" class="node">
+<title>_P_Display_WaitingToEdit</title>
+<polygon fill="transparent" stroke="transparent" stroke-width="2" points="2354,-73 2258,-73 2258,-37 2354,-37 2354,-73"/>
+<text text-anchor="start" x="2268.6638" y="-51.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">WaitingToEdit</text>
+<path fill="none" stroke="#000000" stroke-width="2" d="M2270.3333,-38C2270.3333,-38 2341.6667,-38 2341.6667,-38 2347.3333,-38 2353,-43.6667 2353,-49.3333 2353,-49.3333 2353,-60.6667 2353,-60.6667 2353,-66.3333 2347.3333,-72 2341.6667,-72 2341.6667,-72 2270.3333,-72 2270.3333,-72 2264.6667,-72 2259,-66.3333 2259,-60.6667 2259,-60.6667 2259,-49.3333 2259,-49.3333 2259,-43.6667 2264.6667,-38 2270.3333,-38"/>
+</g>
+<!-- _P_Display_WaitingToEdit&#45;&gt;_P_Display_EditingTime -->
+<g id="edge28" class="edge">
+<title>_P_Display_WaitingToEdit&#45;&gt;_P_Display_EditingTime</title>
+<path fill="none" stroke="#000000" d="M2280.7344,-73.4197C2272.2971,-81.7555 2265,-92.4485 2265,-104.5 2265,-151.5 2265,-151.5 2265,-151.5 2265,-190.4202 2259.2064,-216.074 2252.7113,-240.1214"/>
+<polygon fill="#000000" stroke="#000000" points="2249.2716,-239.4302 2250,-250 2256.022,-241.283 2249.2716,-239.4302"/>
+<text text-anchor="start" x="2239" y="-314" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">after(1500 ms)^time_edit &#160;&#160;</text>
+</g>
+<!-- _P_Display_TimeUpdate&#45;&gt;_P_Display_WaitingForAlarm -->
+<g id="edge31" class="edge">
+<title>_P_Display_TimeUpdate&#45;&gt;_P_Display_WaitingForAlarm</title>
+<path fill="none" stroke="#000000" d="M1256.826,-182.7172C1159.1191,-177.92 1017,-166.7707 1017,-142.5 1017,-142.5 1017,-142.5 1017,-95.5 1017,-91.4822 1017.4273,-87.2925 1018.0957,-83.1964"/>
+<polygon fill="#000000" stroke="#000000" points="1021.5319,-83.8631 1020.1478,-73.3591 1014.6794,-82.4337 1021.5319,-83.8631"/>
+<text text-anchor="start" x="1017" y="-116" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">bottom_left_pressed &#160;&#160;</text>
+</g>
+<!-- _P_Display_TimeUpdate&#45;&gt;_P_Display_ChronoUpdate -->
+<g id="edge29" class="edge">
+<title>_P_Display_TimeUpdate&#45;&gt;_P_Display_ChronoUpdate</title>
+<path fill="none" stroke="#000000" d="M1295.0008,-162.8124C1289.5779,-157.2742 1286,-150.5645 1286,-142.5 1286,-142.5 1286,-142.5 1286,-95.5 1286,-89.4863 1283.9437,-84.3236 1280.5741,-79.9007"/>
+<polygon fill="#000000" stroke="#000000" points="1282.8399,-77.2205 1273.251,-72.7145 1277.9371,-82.2167 1282.8399,-77.2205"/>
+<text text-anchor="start" x="1286" y="-116" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">top_left_pressed &#160;&#160;</text>
+</g>
+<!-- _P_Display_TimeUpdate&#45;&gt;_P_Display_WaitingToEdit -->
+<g id="edge30" class="edge">
+<title>_P_Display_TimeUpdate&#45;&gt;_P_Display_WaitingToEdit</title>
+<path fill="none" stroke="#000000" d="M1409.9427,-162.9906C1465.9247,-142.695 1541.1677,-115.8944 1555.971,-113 1860.8233,-53.3938 1951.7881,-149.8038 2254,-78 2255.9448,-77.5379 2257.9073,-77.005 2259.8726,-76.4154"/>
+<polygon fill="#000000" stroke="#000000" points="2261.3293,-79.616 2269.6522,-73.06 2259.0575,-72.9949 2261.3293,-79.616"/>
+<text text-anchor="start" x="1555" y="-116" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">bottom_right_pressed &#160;&#160;</text>
+</g>
+<!-- _P_Display_EditingTime_initial -->
+<g id="node22" class="node">
+<title>_P_Display_EditingTime_initial</title>
+<ellipse fill="#000000" stroke="#000000" stroke-width="2" cx="1848" cy="-545.5" rx="5.5" ry="5.5"/>
+</g>
+<!-- _P_Display_EditingTime_Waiting -->
+<g id="node25" class="node">
+<title>_P_Display_EditingTime_Waiting</title>
+<polygon fill="transparent" stroke="transparent" stroke-width="2" points="1878.5,-335 1817.5,-335 1817.5,-299 1878.5,-299 1878.5,-335"/>
+<text text-anchor="start" x="1828.5002" y="-313.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">Waiting</text>
+<path fill="none" stroke="#000000" stroke-width="2" d="M1829.8333,-300C1829.8333,-300 1866.1667,-300 1866.1667,-300 1871.8333,-300 1877.5,-305.6667 1877.5,-311.3333 1877.5,-311.3333 1877.5,-322.6667 1877.5,-322.6667 1877.5,-328.3333 1871.8333,-334 1866.1667,-334 1866.1667,-334 1829.8333,-334 1829.8333,-334 1824.1667,-334 1818.5,-328.3333 1818.5,-322.6667 1818.5,-322.6667 1818.5,-311.3333 1818.5,-311.3333 1818.5,-305.6667 1824.1667,-300 1829.8333,-300"/>
+</g>
+<!-- _P_Display_EditingTime_initial&#45;&gt;_P_Display_EditingTime_Waiting -->
+<g id="edge20" class="edge">
+<title>_P_Display_EditingTime_initial&#45;&gt;_P_Display_EditingTime_Waiting</title>
+<path fill="none" stroke="#000000" d="M1848,-539.8288C1848,-535.1736 1848,-528.4097 1848,-522.5 1848,-522.5 1848,-522.5 1848,-357.5 1848,-353.6152 1848,-349.5209 1848,-345.4883"/>
+<polygon fill="#000000" stroke="#000000" points="1851.5001,-345.1447 1848,-335.1447 1844.5001,-345.1448 1851.5001,-345.1447"/>
+<text text-anchor="middle" x="1849.3895" y="-437" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000"> </text>
+</g>
+<!-- _P_Display_EditingTime_Increasing -->
+<g id="node23" class="node">
+<title>_P_Display_EditingTime_Increasing</title>
+<polygon fill="transparent" stroke="transparent" stroke-width="2" points="2116.5,-78 1947.5,-78 1947.5,-32 2116.5,-32 2116.5,-78"/>
+<text text-anchor="start" x="2004.8268" y="-61.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">Increasing</text>
+<text text-anchor="start" x="1953.819" y="-41.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">onentry/ /increase_selection()</text>
+<polygon fill="#000000" stroke="#000000" points="1948,-55 1948,-55 2117,-55 2117,-55 1948,-55"/>
+<path fill="none" stroke="#000000" stroke-width="2" d="M1960.5,-33C1960.5,-33 2103.5,-33 2103.5,-33 2109.5,-33 2115.5,-39 2115.5,-45 2115.5,-45 2115.5,-65 2115.5,-65 2115.5,-71 2109.5,-77 2103.5,-77 2103.5,-77 1960.5,-77 1960.5,-77 1954.5,-77 1948.5,-71 1948.5,-65 1948.5,-65 1948.5,-45 1948.5,-45 1948.5,-39 1954.5,-33 1960.5,-33"/>
+</g>
+<!-- _P_Display_EditingTime_Increasing&#45;&gt;_P_Display_EditingTime_Increasing -->
+<g id="edge21" class="edge">
+<title>_P_Display_EditingTime_Increasing&#45;&gt;_P_Display_EditingTime_Increasing</title>
+<path fill="none" stroke="#000000" d="M2116.8016,-60.1292C2129.7247,-59.3465 2138.5,-57.6367 2138.5,-55 2138.5,-53.1461 2134.1616,-51.7504 2127.0935,-50.813"/>
+<polygon fill="#000000" stroke="#000000" points="2127.0791,-47.2971 2116.8016,-49.8708 2126.4408,-54.268 2127.0791,-47.2971"/>
+<text text-anchor="start" x="2138.5" y="-52" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">after(300 ms) &#160;&#160;</text>
+</g>
+<!-- _P_Display_EditingTime_Increasing&#45;&gt;_P_Display_EditingTime_Waiting -->
+<g id="edge22" class="edge">
+<title>_P_Display_EditingTime_Increasing&#45;&gt;_P_Display_EditingTime_Waiting</title>
+<path fill="none" stroke="#000000" d="M2108.4716,-78.0026C2126.203,-84.4392 2140,-90.9193 2140,-95.5 2140,-273.5 2140,-273.5 2140,-273.5 2140,-302.1217 1909.8594,-281.112 1883,-291 1881.0821,-291.7061 1879.1794,-292.5524 1877.31,-293.5016"/>
+<polygon fill="#000000" stroke="#000000" points="1875.0737,-290.7635 1868.3252,-298.9311 1878.6941,-296.7546 1875.0737,-290.7635"/>
+<text text-anchor="start" x="2140" y="-183" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">bottom_left_released &#160;&#160;</text>
+</g>
+<!-- _P_Display_EditingTime_GoingToNext -->
+<g id="node24" class="node">
+<title>_P_Display_EditingTime_GoingToNext</title>
+<polygon fill="transparent" stroke="transparent" stroke-width="2" points="1766,-73 1674,-73 1674,-37 1766,-37 1766,-73"/>
+<text text-anchor="start" x="1684.66" y="-51.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">GoingToNext</text>
+<path fill="none" stroke="#000000" stroke-width="2" d="M1686.3333,-38C1686.3333,-38 1753.6667,-38 1753.6667,-38 1759.3333,-38 1765,-43.6667 1765,-49.3333 1765,-49.3333 1765,-60.6667 1765,-60.6667 1765,-66.3333 1759.3333,-72 1753.6667,-72 1753.6667,-72 1686.3333,-72 1686.3333,-72 1680.6667,-72 1675,-66.3333 1675,-60.6667 1675,-60.6667 1675,-49.3333 1675,-49.3333 1675,-43.6667 1680.6667,-38 1686.3333,-38"/>
+</g>
+<!-- _P_Display_EditingTime_GoingToNext&#45;&gt;_P_Display_TimeUpdate -->
+<g id="edge24" class="edge">
+<title>_P_Display_EditingTime_GoingToNext&#45;&gt;_P_Display_TimeUpdate</title>
+<path fill="none" stroke="#000000" d="M1684.7992,-73.0925C1679.9259,-75.0316 1674.9074,-76.7499 1670,-78 1642.1567,-85.0927 1412,-66.7675 1412,-95.5 1412,-142.5 1412,-142.5 1412,-142.5 1412,-146.9555 1410.9321,-150.9835 1409.0702,-154.6203"/>
+<polygon fill="#000000" stroke="#000000" points="1406.0964,-152.7551 1402.962,-162.8757 1411.7236,-156.9186 1406.0964,-152.7551"/>
+<text text-anchor="start" x="1412" y="-116" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">after(2 s)^edit_done &#160;&#160;</text>
+</g>
+<!-- _P_Display_EditingTime_GoingToNext&#45;&gt;_P_Display_EditingTime_Waiting -->
+<g id="edge23" class="edge">
+<title>_P_Display_EditingTime_GoingToNext&#45;&gt;_P_Display_EditingTime_Waiting</title>
+<path fill="none" stroke="#000000" d="M1703.8585,-73.0857C1699.5171,-79.678 1696,-87.4904 1696,-95.5 1696,-273.5 1696,-273.5 1696,-273.5 1696,-300.009 1789.584,-280.6759 1814,-291 1815.7966,-291.7597 1817.5822,-292.6369 1819.3403,-293.5997"/>
+<polygon fill="#000000" stroke="#000000" points="1817.5035,-296.5792 1827.8234,-298.977 1821.2512,-290.667 1817.5035,-296.5792"/>
+<text text-anchor="start" x="1696" y="-183" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">bottom_right_released &#160;&#160;</text>
+</g>
+<!-- _P_Display_EditingTime_Waiting&#45;&gt;_P_Display_TimeUpdate -->
+<g id="edge27" class="edge">
+<title>_P_Display_EditingTime_Waiting&#45;&gt;_P_Display_TimeUpdate</title>
+<path fill="none" stroke="#000000" d="M1828.3284,-298.9003C1823.8991,-295.7347 1819.0154,-292.863 1814,-291 1782.8036,-279.4121 1515,-306.7791 1515,-273.5 1515,-273.5 1515,-273.5 1515,-226.5 1515,-209.84 1483.3821,-200.0128 1447.5793,-194.2254"/>
+<polygon fill="#000000" stroke="#000000" points="1447.8014,-190.7196 1437.3929,-192.6978 1446.7633,-197.6422 1447.8014,-190.7196"/>
+<text text-anchor="start" x="1515" y="-247" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">after(5 s)^edit_done &#160;&#160;</text>
+</g>
+<!-- _P_Display_EditingTime_Waiting&#45;&gt;_P_Display_EditingTime_Increasing -->
+<g id="edge25" class="edge">
+<title>_P_Display_EditingTime_Waiting&#45;&gt;_P_Display_EditingTime_Increasing</title>
+<path fill="none" stroke="#000000" d="M1869.2188,-298.7382C1873.5544,-295.748 1878.2503,-292.9836 1883,-291 1906.6504,-281.1227 1997,-299.1301 1997,-273.5 1997,-273.5 1997,-273.5 1997,-95.5 1997,-92.6366 1997.507,-89.8757 1998.3991,-87.2342"/>
+<polygon fill="#000000" stroke="#000000" points="2001.5784,-88.7069 2003.0965,-78.2213 1995.3709,-85.4715 2001.5784,-88.7069"/>
+<text text-anchor="start" x="1997" y="-183" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">bottom_left_pressed &#160;&#160;</text>
+</g>
+<!-- _P_Display_EditingTime_Waiting&#45;&gt;_P_Display_EditingTime_GoingToNext -->
+<g id="edge26" class="edge">
+<title>_P_Display_EditingTime_Waiting&#45;&gt;_P_Display_EditingTime_GoingToNext</title>
+<path fill="none" stroke="#000000" d="M1848,-298.7983C1848,-291.007 1848,-281.8073 1848,-273.5 1848,-273.5 1848,-273.5 1848,-95.5 1848,-79.3774 1810.6192,-68.8527 1776.2591,-62.5841"/>
+<polygon fill="#000000" stroke="#000000" points="1776.6604,-59.1017 1766.2109,-60.8509 1775.4704,-65.9998 1776.6604,-59.1017"/>
+<text text-anchor="start" x="1848" y="-183" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">bottom_right_pressed &#160;&#160;</text>
+</g>
+<!-- _P_Chrono -->
+<!-- _P_Chrono_initial -->
+<g id="node27" class="node">
+<title>_P_Chrono_initial</title>
+<ellipse fill="#000000" stroke="#000000" stroke-width="2" cx="457" cy="-545.5" rx="5.5" ry="5.5"/>
+</g>
+<!-- _P_Chrono_Stopped -->
+<g id="node29" class="node">
+<title>_P_Chrono_Stopped</title>
+<polygon fill="transparent" stroke="transparent" stroke-width="2" points="490,-458 424,-458 424,-422 490,-422 490,-458"/>
+<text text-anchor="start" x="434.6542" y="-436.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">Stopped</text>
+<path fill="none" stroke="#000000" stroke-width="2" d="M436.3333,-423C436.3333,-423 477.6667,-423 477.6667,-423 483.3333,-423 489,-428.6667 489,-434.3333 489,-434.3333 489,-445.6667 489,-445.6667 489,-451.3333 483.3333,-457 477.6667,-457 477.6667,-457 436.3333,-457 436.3333,-457 430.6667,-457 425,-451.3333 425,-445.6667 425,-445.6667 425,-434.3333 425,-434.3333 425,-428.6667 430.6667,-423 436.3333,-423"/>
+</g>
+<!-- _P_Chrono_initial&#45;&gt;_P_Chrono_Stopped -->
+<g id="edge32" class="edge">
+<title>_P_Chrono_initial&#45;&gt;_P_Chrono_Stopped</title>
+<path fill="none" stroke="#000000" d="M457,-539.8288C457,-535.1736 457,-528.4097 457,-522.5 457,-522.5 457,-522.5 457,-475.5 457,-473.1079 457,-470.6252 457,-468.1342"/>
+<polygon fill="#000000" stroke="#000000" points="460.5001,-468.0597 457,-458.0598 453.5001,-468.0598 460.5001,-468.0597"/>
+<text text-anchor="middle" x="458.3895" y="-496" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000"> </text>
+</g>
+<!-- _P_Chrono_Running -->
+<g id="node28" class="node">
+<title>_P_Chrono_Running</title>
+<polygon fill="transparent" stroke="transparent" stroke-width="2" points="546,-335 480,-335 480,-299 546,-299 546,-335"/>
+<text text-anchor="start" x="490.6602" y="-313.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">Running</text>
+<path fill="none" stroke="#000000" stroke-width="2" d="M492.3333,-300C492.3333,-300 533.6667,-300 533.6667,-300 539.3333,-300 545,-305.6667 545,-311.3333 545,-311.3333 545,-322.6667 545,-322.6667 545,-328.3333 539.3333,-334 533.6667,-334 533.6667,-334 492.3333,-334 492.3333,-334 486.6667,-334 481,-328.3333 481,-322.6667 481,-322.6667 481,-311.3333 481,-311.3333 481,-305.6667 486.6667,-300 492.3333,-300"/>
+</g>
+<!-- _P_Chrono_Running&#45;&gt;_P_Chrono_Running -->
+<g id="edge33" class="edge">
+<title>_P_Chrono_Running&#45;&gt;_P_Chrono_Running</title>
+<path fill="none" stroke="#000000" d="M546.0221,-322.6164C558.1032,-322.7686 568,-320.8965 568,-317 568,-314.3212 563.3222,-312.5992 556.4728,-311.834"/>
+<polygon fill="#000000" stroke="#000000" points="556.1636,-308.3175 546.0221,-311.3836 555.8621,-315.311 556.1636,-308.3175"/>
+<text text-anchor="start" x="568" y="-314" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">after(10 ms)/increase_chrono_by_one() &#160;&#160;</text>
+</g>
+<!-- _P_Chrono_Running&#45;&gt;_P_Chrono_Stopped -->
+<g id="edge34" class="edge">
+<title>_P_Chrono_Running&#45;&gt;_P_Chrono_Stopped</title>
+<path fill="none" stroke="#000000" d="M479.8064,-318.4044C431.3634,-321.3738 347,-330.4309 347,-357.5 347,-404.5 347,-404.5 347,-404.5 347,-419.1937 382.9968,-428.6934 413.8063,-434.1332"/>
+<polygon fill="#000000" stroke="#000000" points="413.5583,-437.6398 423.9964,-435.824 414.7042,-430.7342 413.5583,-437.6398"/>
+<text text-anchor="start" x="347" y="-378" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">bottom_right_pressed [INSTATE([&quot;/Display/ChronoUpdate&quot;])] &#160;&#160;</text>
+</g>
+<!-- _P_Chrono_Stopped&#45;&gt;_P_Chrono_Running -->
+<g id="edge36" class="edge">
+<title>_P_Chrono_Stopped&#45;&gt;_P_Chrono_Running</title>
+<path fill="none" stroke="#000000" d="M490.125,-437.8117C549.75,-433.4251 669,-422.4126 669,-404.5 669,-404.5 669,-404.5 669,-357.5 669,-334.0876 602.3403,-323.9781 556.1699,-319.7838"/>
+<polygon fill="#000000" stroke="#000000" points="556.3431,-316.2861 546.0836,-318.9305 555.7529,-323.2611 556.3431,-316.2861"/>
+<text text-anchor="start" x="669" y="-378" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">bottom_right_pressed [INSTATE([&quot;/Display/ChronoUpdate&quot;])] &#160;&#160;</text>
+</g>
+<!-- _P_Chrono_Stopped&#45;&gt;_P_Chrono_Stopped -->
+<g id="edge35" class="edge">
+<title>_P_Chrono_Stopped&#45;&gt;_P_Chrono_Stopped</title>
+<path fill="none" stroke="#000000" d="M490.0221,-444.8676C502.1032,-444.9995 512,-443.377 512,-440 512,-437.6783 507.3222,-436.1859 500.4728,-435.5228"/>
+<polygon fill="#000000" stroke="#000000" points="500.1458,-432.0082 490.0221,-435.1324 499.8845,-439.0033 500.1458,-432.0082"/>
+<text text-anchor="start" x="512" y="-437" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">bottom_left_pressed [INSTATE([&quot;/Display/ChronoUpdate&quot;])]/reset_chrono() &#160;&#160;</text>
+</g>
+<!-- _P_Indiglo -->
+<!-- _P_Indiglo_initial -->
+<g id="node31" class="node">
+<title>_P_Indiglo_initial</title>
+<ellipse fill="#000000" stroke="#000000" stroke-width="2" cx="113" cy="-545.5" rx="5.5" ry="5.5"/>
+</g>
+<!-- _P_Indiglo_Off -->
+<g id="node34" class="node">
+<title>_P_Indiglo_Off</title>
+<polygon fill="transparent" stroke="transparent" stroke-width="2" points="141,-458 85,-458 85,-422 141,-422 141,-458"/>
+<text text-anchor="start" x="104.9978" y="-436.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">Off</text>
+<path fill="none" stroke="#000000" stroke-width="2" d="M97.3333,-423C97.3333,-423 128.6667,-423 128.6667,-423 134.3333,-423 140,-428.6667 140,-434.3333 140,-434.3333 140,-445.6667 140,-445.6667 140,-451.3333 134.3333,-457 128.6667,-457 128.6667,-457 97.3333,-457 97.3333,-457 91.6667,-457 86,-451.3333 86,-445.6667 86,-445.6667 86,-434.3333 86,-434.3333 86,-428.6667 91.6667,-423 97.3333,-423"/>
+</g>
+<!-- _P_Indiglo_initial&#45;&gt;_P_Indiglo_Off -->
+<g id="edge37" class="edge">
+<title>_P_Indiglo_initial&#45;&gt;_P_Indiglo_Off</title>
+<path fill="none" stroke="#000000" d="M113,-539.8288C113,-535.1736 113,-528.4097 113,-522.5 113,-522.5 113,-522.5 113,-475.5 113,-473.1079 113,-470.6252 113,-468.1342"/>
+<polygon fill="#000000" stroke="#000000" points="116.5001,-468.0597 113,-458.0598 109.5001,-468.0598 116.5001,-468.0597"/>
+<text text-anchor="middle" x="114.3895" y="-496" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000"> </text>
+</g>
+<!-- _P_Indiglo_Released -->
+<g id="node32" class="node">
+<title>_P_Indiglo_Released</title>
+<polygon fill="transparent" stroke="transparent" stroke-width="2" points="222,-204 150,-204 150,-168 222,-168 222,-204"/>
+<text text-anchor="start" x="160.6602" y="-182.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">Released</text>
+<path fill="none" stroke="#000000" stroke-width="2" d="M162.3333,-169C162.3333,-169 209.6667,-169 209.6667,-169 215.3333,-169 221,-174.6667 221,-180.3333 221,-180.3333 221,-191.6667 221,-191.6667 221,-197.3333 215.3333,-203 209.6667,-203 209.6667,-203 162.3333,-203 162.3333,-203 156.6667,-203 151,-197.3333 151,-191.6667 151,-191.6667 151,-180.3333 151,-180.3333 151,-174.6667 156.6667,-169 162.3333,-169"/>
+</g>
+<!-- _P_Indiglo_Pushed -->
+<g id="node33" class="node">
+<title>_P_Indiglo_Pushed</title>
+<polygon fill="transparent" stroke="transparent" stroke-width="2" points="94,-335 32,-335 32,-299 94,-299 94,-335"/>
+<text text-anchor="start" x="42.657" y="-313.2" font-family="Helvetica,sans-Serif" font-size="12.00" fill="#000000">Pushed</text>
+<path fill="none" stroke="#000000" stroke-width="2" d="M44.3333,-300C44.3333,-300 81.6667,-300 81.6667,-300 87.3333,-300 93,-305.6667 93,-311.3333 93,-311.3333 93,-322.6667 93,-322.6667 93,-328.3333 87.3333,-334 81.6667,-334 81.6667,-334 44.3333,-334 44.3333,-334 38.6667,-334 33,-328.3333 33,-322.6667 33,-322.6667 33,-311.3333 33,-311.3333 33,-305.6667 38.6667,-300 44.3333,-300"/>
+</g>
+<!-- _P_Indiglo_Released&#45;&gt;_P_Indiglo_Pushed -->
+<g id="edge38" class="edge">
+<title>_P_Indiglo_Released&#45;&gt;_P_Indiglo_Pushed</title>
+<path fill="none" stroke="#000000" d="M149.9304,-189.9289C110.8477,-195.2148 54,-206.3643 54,-226.5 54,-273.5 54,-273.5 54,-273.5 54,-278.5369 54.5858,-283.8351 55.4585,-288.9335"/>
+<polygon fill="#000000" stroke="#000000" points="52.0844,-289.898 57.557,-298.97 58.9363,-288.4654 52.0844,-289.898"/>
+<text text-anchor="start" x="54" y="-247" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">top_right_pressed &#160;&#160;</text>
+</g>
+<!-- _P_Indiglo_Released&#45;&gt;_P_Indiglo_Off -->
+<g id="edge39" class="edge">
+<title>_P_Indiglo_Released&#45;&gt;_P_Indiglo_Off</title>
+<path fill="none" stroke="#000000" d="M222.2481,-195.9674C256.7429,-207.3707 300.8041,-228.1283 282,-256 258.763,-290.442 218.554,-256.558 195.317,-291 174.2988,-322.1534 199.9438,-337.7611 205,-375 205.7176,-380.2848 207.6689,-382.3825 205,-387 193.2681,-407.298 170.4847,-420.5092 150.527,-428.6651"/>
+<polygon fill="#000000" stroke="#000000" points="149.1264,-425.4529 141.0174,-432.2717 151.6087,-431.998 149.1264,-425.4529"/>
+<text text-anchor="start" x="195" y="-314" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">after(2 s)/unset_indiglo() &#160;&#160;</text>
+</g>
+<!-- _P_Indiglo_Pushed&#45;&gt;_P_Indiglo_Released -->
+<g id="edge40" class="edge">
+<title>_P_Indiglo_Pushed&#45;&gt;_P_Indiglo_Released</title>
+<path fill="none" stroke="#000000" d="M94.0381,-309.169C130.4758,-299.5282 186,-283.2396 186,-273.5 186,-273.5 186,-273.5 186,-226.5 186,-222.6152 186,-218.5209 186,-214.4883"/>
+<polygon fill="#000000" stroke="#000000" points="189.5001,-214.1447 186,-204.1447 182.5001,-214.1448 189.5001,-214.1447"/>
+<text text-anchor="start" x="186" y="-247" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">top_right_released &#160;&#160;</text>
+</g>
+<!-- _P_Indiglo_Off&#45;&gt;_P_Indiglo_Pushed -->
+<g id="edge41" class="edge">
+<title>_P_Indiglo_Off&#45;&gt;_P_Indiglo_Pushed</title>
+<path fill="none" stroke="#000000" d="M84.8824,-434.1884C69.6863,-429.2249 54,-420.2797 54,-404.5 54,-404.5 54,-404.5 54,-357.5 54,-353.4822 54.4273,-349.2925 55.0957,-345.1964"/>
+<polygon fill="#000000" stroke="#000000" points="58.5319,-345.8631 57.1478,-335.3591 51.6794,-344.4337 58.5319,-345.8631"/>
+<text text-anchor="start" x="54" y="-378" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">top_right_pressed/set_indiglo() &#160;&#160;</text>
+</g>
+</g>
+</svg>

+ 179 - 0
examples/digitalwatch/statechart_digitalwatch.xml

@@ -0,0 +1,179 @@
+<statechart>
+  <datamodel>
+    # declare functions
+    set_alarm = func {};
+    set_indiglo = func {};
+    unset_indiglo = func {};
+    increase_time_by_one = func {};
+    refresh_time_display = func {};
+    check_time = func {};
+    start_selection = func {};
+    stop_selection = func {};
+    increase_selection = func {};
+    reset_chrono = func {};
+    increase_chrono_by_one = func {};
+    refresh_chrono_display = func {};
+  </datamodel>
+
+  <inport name="in">
+    <event name="bottom_left_pressed"/>
+    <event name="bottom_left_released"/>
+    <event name="bottom_right_pressed"/>
+    <event name="bottom_right_released"/>
+    <event name="top_left_pressed"/>
+    <event name="top_left_released"/>
+    <event name="top_right_pressed"/>
+    <event name="top_right_released"/>
+  </inport>
+
+  <outport name="out">
+  </outport>
+
+  <root>
+    <parallel id="P">
+      <state id="Indiglo" initial="Off">
+        <state id="Off">
+          <transition event="top_right_pressed" target="../Pushed">
+            <code> set_indiglo(); </code>
+          </transition>
+        </state>
+
+        <state id="Pushed">
+          <transition event="top_right_released" target="../Released"/>
+        </state>
+
+        <state id="Released">
+          <transition event="top_right_pressed" target="../Pushed"/>
+          <transition after="2 s" target="../Off">
+            <code> unset_indiglo(); </code>
+          </transition>
+        </state>
+      </state>
+
+      <state id="Chrono" initial="Stopped">
+        <state id="Stopped">
+          <transition event="bottom_left_pressed" cond='INSTATE(["/Display/ChronoUpdate"])' target=".">
+            <code> reset_chrono(); </code>
+          </transition>
+          <transition event="bottom_right_pressed" cond='INSTATE(["/Display/ChronoUpdate"])' target="../Running"/>
+        </state>
+
+        <state id="Running">
+          <transition after="10 ms" target=".">
+            <code> increase_chrono_by_one(); </code>
+          </transition>
+          <transition event="bottom_right_pressed" cond='INSTATE(["/Display/ChronoUpdate"])' target="../Stopped"/>
+        </state>
+      </state>
+
+      <state id="Display" initial="TimeUpdate">
+        <state id="TimeUpdate">
+          <onentry>
+            <code> refresh_time_display(); </code>
+          </onentry>
+          <transition event="top_left_pressed" target="../ChronoUpdate"/>
+          <transition event="bottom_right_pressed" target="../WaitingToEdit"/>
+          <transition event="bottom_left_pressed" target="../WaitingForAlarm"/>
+        </state>
+
+        <state id="WaitingToEdit">
+          <transition after="1500 ms" target="../EditingTime">
+            <raise event="time_edit"/>
+          </transition>
+        </state>
+
+        <state id="EditingTime" initial="Waiting">
+          <onentry>
+            <code> start_selection(); </code>
+          </onentry>
+          <onexit>
+            <code> stop_selection(); </code>
+          </onexit>
+
+          <state id="Waiting">
+            <transition event="bottom_left_pressed" target="../Increasing"/>
+            <transition event="bottom_right_pressed" target="../GoingToNext"/>
+            <transition after="5 s" target="../../TimeUpdate">
+              <raise event="edit_done"/>
+            </transition>
+          </state>
+
+          <state id="GoingToNext">
+            <transition event="bottom_right_released" target="../Waiting"/>
+            <transition after="2 s" target="../../TimeUpdate">
+              <raise event="edit_done"/>
+            </transition>
+          </state>
+
+          <state id="Increasing">
+            <onentry>
+              <code> increase_selection(); </code>
+            </onentry>
+            <transition after="300 ms" target="."/>
+            <transition event="bottom_left_released" target="../Waiting"/>
+          </state>
+        </state>
+
+        <state id="ChronoUpdate">
+          <transition event="top_left_pressed" target="../TimeUpdate"/>
+          <transition after="10 ms" target=".">
+            <code> refresh_chrono_display(); </code>
+          </transition>
+        </state>
+
+        <state id="WaitingForAlarm">
+          <transition after="1500 ms" target="../EditingTime">
+            <raise event="alarm_edit"/>
+          </transition>
+        </state>
+      </state>
+
+      <state id="Alarm" initial="Off">
+        <state id="Off">
+          <transition event="bottom_left_pressed" cond='INSTATE(["/Display/TimeUpdate"]) or INSTATE(["/Display/WaitingForAlarm"])' target="../On">
+            <code> set_alarm(); </code>
+          </transition>
+        </state>
+
+        <state id="On">
+          <transition cond="check_time()" target="../Blinking"/>
+        </state>
+
+        <state id="Blinking" initial="On">
+          <onexit>
+            <code> set_alarm(); unset_indiglo(); </code>
+          </onexit>
+          <state id="On">
+            <onentry>
+              <code> set_indiglo(); </code>
+            </onentry>
+            <transition after="500 ms" target="../Off"/>
+          </state>
+          <state id="Off">
+            <onentry>
+              <code> unset_indiglo(); </code>
+            </onentry>
+            <transition after="500 ms" target="../On"/>
+          </state>
+
+          <transition event="top_right_pressed" target="../Off"/>
+          <transition event="top_left_pressed" target="../Off"/>
+          <transition event="bottom_right_pressed" target="../Off"/>
+          <transition event="bottom_left_pressed" target="../Off"/>
+        </state>
+      </state>
+
+      <state id="Time" initial="Increasing">
+        <state id="Increasing">
+          <transition after="1 s" target=".">
+            <code> increase_time_by_one(); </code>
+          </transition>
+          <transition event="time_edit" target="../Editing"/>
+        </state>
+        <state id="Editing">
+          <transition event="edit_done" target="../Increasing"/>
+        </state>
+      </state>
+    </parallel>
+  </root>
+</statechart>

BIN
examples/digitalwatch/watch.gif


BIN
examples/digitalwatch/watch.jpg


doc/Makefile → legacy/doc/Makefile


doc/_static/mystyle.css → legacy/doc/_static/mystyle.css


doc/_templates/layout.html → legacy/doc/_templates/layout.html


doc/compiler.rst → legacy/doc/compiler.rst


doc/conf.py → legacy/doc/conf.py


doc/examples.rst → legacy/doc/examples.rst


doc/index.rst → legacy/doc/index.rst


doc/installation.rst → legacy/doc/installation.rst


doc/internal_documentation.rst → legacy/doc/internal_documentation.rst


doc/language_features.rst → legacy/doc/language_features.rst


doc/make.bat → legacy/doc/make.bat


doc/runtime_platforms.rst → legacy/doc/runtime_platforms.rst


doc/semantic_options.rst → legacy/doc/semantic_options.rst


doc/sockets.rst → legacy/doc/sockets.rst


doc/statecharts_core_int.rst → legacy/doc/statecharts_core_int.rst


examples/HTTP_client/Makefile → legacy/examples/HTTP_client/Makefile


examples/HTTP_client/classes/http_client.xml → legacy/examples/HTTP_client/classes/http_client.xml


examples/HTTP_client/classes/prompt.xml → legacy/examples/HTTP_client/classes/prompt.xml


examples/HTTP_client/client.py → legacy/examples/HTTP_client/client.py


examples/HTTP_client/client.xml → legacy/examples/HTTP_client/client.xml


examples/HTTP_client/make.bat → legacy/examples/HTTP_client/make.bat


examples/HTTP_client/run.sh → legacy/examples/HTTP_client/run.sh


examples/HTTP_client/run_client.py → legacy/examples/HTTP_client/run_client.py


examples/HTTP_server/Makefile → legacy/examples/HTTP_server/Makefile


examples/HTTP_server/classes/echo.xml → legacy/examples/HTTP_server/classes/echo.xml


examples/HTTP_server/classes/server.xml → legacy/examples/HTTP_server/classes/server.xml


examples/HTTP_server/classes/socket.xml → legacy/examples/HTTP_server/classes/socket.xml


examples/HTTP_server/make.bat → legacy/examples/HTTP_server/make.bat


examples/HTTP_server/run_echo_server.py → legacy/examples/HTTP_server/run_echo_server.py


examples/HTTP_server/server.py → legacy/examples/HTTP_server/server.py


examples/HTTP_server/server.xml → legacy/examples/HTTP_server/server.xml


examples/Makefile → legacy/examples/Makefile


examples/bouncingballs/Makefile → legacy/examples/bouncingballs/Makefile


examples/bouncingballs/js/Makefile → legacy/examples/bouncingballs/js/Makefile


examples/bouncingballs/js/index.html → legacy/examples/bouncingballs/js/index.html


examples/bouncingballs/js/make.bat → legacy/examples/bouncingballs/js/make.bat


examples/bouncingballs/js/sccd.xml → legacy/examples/bouncingballs/js/sccd.xml


examples/bouncingballs/python/Makefile → legacy/examples/bouncingballs/python/Makefile


examples/bouncingballs/python/__init__.py → legacy/examples/bouncingballs/python/__init__.py


examples/bouncingballs/python/make.bat → legacy/examples/bouncingballs/python/make.bat


examples/bouncingballs/python/runner.py → legacy/examples/bouncingballs/python/runner.py


examples/bouncingballs/python/runner_multiwindow.py → legacy/examples/bouncingballs/python/runner_multiwindow.py


examples/bouncingballs/python/runner_no_ui.py → legacy/examples/bouncingballs/python/runner_no_ui.py


examples/bouncingballs/python/runner_performance.py → legacy/examples/bouncingballs/python/runner_performance.py


examples/bouncingballs/python/runner_performance_cpu_time.py → legacy/examples/bouncingballs/python/runner_performance_cpu_time.py


examples/bouncingballs/python/runner_performance_threads.py → legacy/examples/bouncingballs/python/runner_performance_threads.py


examples/bouncingballs/python/sccd.xml → legacy/examples/bouncingballs/python/sccd.xml


examples/bouncingballs/python/sccd_multiwindow.xml → legacy/examples/bouncingballs/python/sccd_multiwindow.xml


examples/bouncingballs/python/sccd_no_ui.py → legacy/examples/bouncingballs/python/sccd_no_ui.py


examples/bouncingballs/python/sccd_no_ui.xml → legacy/examples/bouncingballs/python/sccd_no_ui.xml


examples/bouncingballs/python/sccd_performance.xml → legacy/examples/bouncingballs/python/sccd_performance.xml


examples/bouncingballs/python/sccd_performance_cpu_time.xml → legacy/examples/bouncingballs/python/sccd_performance_cpu_time.xml


examples/bouncingballs/python/sccd_performance_threads.xml → legacy/examples/bouncingballs/python/sccd_performance_threads.xml


examples/bouncingballs/python/ui_classes.py → legacy/examples/bouncingballs/python/ui_classes.py


examples/bouncingballs/python/widget.py → legacy/examples/bouncingballs/python/widget.py


examples/bouncingballs/python/widget_private_ports.py → legacy/examples/bouncingballs/python/widget_private_ports.py


examples/external-input/python/runner.py → legacy/examples/external-input/python/runner.py


examples/external-input/python/test.py → legacy/examples/external-input/python/test.py


examples/external-input/python/test.xml → legacy/examples/external-input/python/test.xml


examples/my-tests/python/Parallel_Bug/runner.py → legacy/examples/my-tests/python/Parallel_Bug/runner.py


examples/my-tests/python/Parallel_Bug/tester.py → legacy/examples/my-tests/python/Parallel_Bug/tester.py


examples/my-tests/python/Parallel_Bug/tester.xml → legacy/examples/my-tests/python/Parallel_Bug/tester.xml


examples/my-tests/python/SCCD_broadcast/runner.py → legacy/examples/my-tests/python/SCCD_broadcast/runner.py


examples/my-tests/python/SCCD_broadcast/tester.py → legacy/examples/my-tests/python/SCCD_broadcast/tester.py


examples/my-tests/python/SCCD_broadcast/tester.xml → legacy/examples/my-tests/python/SCCD_broadcast/tester.xml


examples/my-tests/python/Yentil/runner.py → legacy/examples/my-tests/python/Yentil/runner.py


examples/my-tests/python/Yentil/sccd_widget.py → legacy/examples/my-tests/python/Yentil/sccd_widget.py


examples/my-tests/python/Yentil/tester.py → legacy/examples/my-tests/python/Yentil/tester.py


examples/my-tests/python/Yentil/tester.xml → legacy/examples/my-tests/python/Yentil/tester.xml


examples/my-tests/python/bugwithsourcechild.py → legacy/examples/my-tests/python/bugwithsourcechild.py


examples/my-tests/python/bugwithsourcechild.xml → legacy/examples/my-tests/python/bugwithsourcechild.xml


examples/my-tests/python/create_and_start.py → legacy/examples/my-tests/python/create_and_start.py


examples/my-tests/python/create_and_start.xml → legacy/examples/my-tests/python/create_and_start.xml


examples/my-tests/python/else_transition.py → legacy/examples/my-tests/python/else_transition.py


examples/my-tests/python/else_transition.xml → legacy/examples/my-tests/python/else_transition.xml


examples/my-tests/python/eventloop_bug.py → legacy/examples/my-tests/python/eventloop_bug.py


examples/my-tests/python/eventloop_bug.xml → legacy/examples/my-tests/python/eventloop_bug.xml


examples/my-tests/python/exit_parallel.py → legacy/examples/my-tests/python/exit_parallel.py


examples/my-tests/python/exit_parallel.xml → legacy/examples/my-tests/python/exit_parallel.xml


examples/my-tests/python/multiple_afters_running_behind.py → legacy/examples/my-tests/python/multiple_afters_running_behind.py


examples/my-tests/python/multiple_afters_running_behind.xml → legacy/examples/my-tests/python/multiple_afters_running_behind.xml


examples/my-tests/python/multiple_raises_parallel.py → legacy/examples/my-tests/python/multiple_raises_parallel.py


examples/my-tests/python/multiple_raises_parallel.xml → legacy/examples/my-tests/python/multiple_raises_parallel.xml


examples/my-tests/python/runner.py → legacy/examples/my-tests/python/runner.py


examples/my-tests/python/runner_bugwithsourcechild.py → legacy/examples/my-tests/python/runner_bugwithsourcechild.py


examples/my-tests/python/runner_create_and_start.py → legacy/examples/my-tests/python/runner_create_and_start.py


examples/my-tests/python/runner_else_transition.py → legacy/examples/my-tests/python/runner_else_transition.py


examples/my-tests/python/runner_eventloop_bug.py → legacy/examples/my-tests/python/runner_eventloop_bug.py


examples/my-tests/python/runner_exit_parallel.py → legacy/examples/my-tests/python/runner_exit_parallel.py


examples/my-tests/python/runner_multiple_afters_running_behind.py → legacy/examples/my-tests/python/runner_multiple_afters_running_behind.py


examples/my-tests/python/runner_multiple_raises_parallel.py → legacy/examples/my-tests/python/runner_multiple_raises_parallel.py


examples/my-tests/python/server.py → legacy/examples/my-tests/python/server.py


examples/my-tests/python/server.xml → legacy/examples/my-tests/python/server.xml


+ 0 - 0
examples/tanks/AIMap.py


Some files were not shown because too many files changed in this diff