@visualSTATE @RuleBase @Directives @visualSTATE 4-03-0000-0171; @Date 2003-11-26; @Time 18:41:22; @Field; @ExternalInterface @ExternalEvent a, b, BatteryDies, BatteryInserted, BatteryRemoved, BatteryWeak, BeepTimeout, b_released, c, c_long, c_released, d, DateTimeout, T_hits_T1, T_hits_T2; @ExternalAction VS_VOID IncDay, VS_VOID IncHr, VS_VOID IncMin, VS_VOID IncMin10, VS_VOID IncMon, VS_VOID IncWeekDay, VS_VOID IncYear, VS_VOID ResetSeconds, VS_VOID Switch1224, @Timer VS_VOID SetT_hits_T1 (VS_UINT event, VS_UINT ticks) [[ Explanation = "will send T_hits_T1 when needed" ]], @Timer VS_VOID StartTimer (VS_UINT event, VS_UINT ticks); @ExternalVariable; @Constant; @InternalInterface @InternalVariable VS_INT T1 = { 0 } [[ Explanation = "value at each the alarm should trigger" ]], VS_INT T2 = { 0 }; @EventGroup AnyButton (a, d, b, c); @Signal; @Implementation @StateMachine StateMachineSpec_15 = @ExternalEvent c_long; @ExternalAction @Timer VS_VOID StartTimer (VS_UINT event, VS_UINT ticks); @ExternalVariable; @InternalVariable; @Constant; @EventGroup; @Signal; @State; @StateRegion; @Entry #StartTimer (c_long, 2); @Exit; @Do; @InternalRule; @TransitionRule; @End; @StateMachine StateMachineSpec_14 = @ExternalEvent DateTimeout; @ExternalAction @Timer VS_VOID StartTimer (VS_UINT event, VS_UINT ticks); @ExternalVariable; @InternalVariable; @Constant; @EventGroup; @Signal; @State; @StateRegion; @Entry #StartTimer (DateTimeout, 120); @Exit; @Do; @InternalRule; @TransitionRule; @End; @StateMachine StateMachineSpec_13 = @ExternalEvent BeepTimeout; @ExternalAction @Timer VS_VOID StartTimer (VS_UINT event, VS_UINT ticks); @ExternalVariable; @InternalVariable; @Constant; @EventGroup; @Signal; @State alarm1_beeps [[ StateType = "0", FrameColor = "0", FrameWidth = "5", FillColor = "14", TextColor = "0", Left = "268", Top = "89", Right = "362", Bottom = "124", FontIndex = "2" ]], alarm2_beeps [[ StateType = "0", FrameColor = "0", FrameWidth = "5", FillColor = "14", TextColor = "0", Left = "269", Top = "186", Right = "361", Bottom = "223", FontIndex = "2" ]], both_beep [[ StateType = "0", FrameColor = "0", FrameWidth = "5", FillColor = "14", TextColor = "0", Left = "271", Top = "234", Right = "361", Bottom = "269", FontIndex = "2" ]]; @StateRegion; @Entry #StartTimer (BeepTimeout, 30); @Exit; @Do; @InternalRule; @TransitionRule; @End; @StateMachine StateMachineSpec_12 (@State StateArgument_50, @State StateArgument_51) = @ExternalEvent b, d; @ExternalAction; @ExternalVariable; @InternalVariable; @Constant; @EventGroup; @Signal; @State @History zero [[ StateType = "0", FrameColor = "0", FrameWidth = "5", FillColor = "14", TextColor = "0", Left = "72", Top = "69", Right = "132", Bottom = "94", FontIndex = "2" ]], regular [[ StateType = "0", FrameColor = "0", FrameWidth = "5", FillColor = "14", TextColor = "0", Left = "70", Top = "129", Right = "130", Bottom = "154", FontIndex = "2" ]], lap [[ StateType = "0", FrameColor = "0", FrameWidth = "5", FillColor = "14", TextColor = "0", Left = "71", Top = "186", Right = "131", Bottom = "211", FontIndex = "2" ]]; @StateRegion; @Entry; @Exit; @Do; @InternalRule; @TransitionRule b () zero: regular [[ NumberOfSections = "1", RouteSectionInfo1 = "63 98 94 112 -1 37 38 3 0 1 5 2 2", RouteSectionData1 = "90 94 20 90 129 24" ]], d () regular StateArgument_50: lap [[ NumberOfSections = "1", RouteSectionInfo1 = "35 157 98 181 -1 38 39 3 0 1 5 2 2", RouteSectionData1 = "90 154 20 91 186 24" ]], d () regular StateArgument_51: zero [[ NumberOfSections = "1", RouteSectionInfo1 = "118 99 178 132 -1 38 37 3 0 1 5 2 2", RouteSectionData1 = "112 129 20 112 94 24" ]], d () lap: regular [[ NumberOfSections = "1", RouteSectionInfo1 = "117 153 145 171 -1 39 38 3 0 1 5 2 2", RouteSectionData1 = "113 186 20 112 154 24" ]]; @End; @StateMachine StateMachineSpec_11 (@State StateArgument_50, @State StateArgument_51) = @ExternalEvent; @ExternalAction; @ExternalVariable; @InternalVariable; @Constant; @EventGroup; @Signal; @State @Initial stopwatch = StateMachineSpec_12 (StateArgument_50, StateArgument_51) [[ StateType = "2", FrameColor = "0", FrameWidth = "1", FillColor = "7", TextColor = "0", Left = "29", Top = "40", Right = "186", Bottom = "224", FontIndex = "2", TextHeight = "11" ]]; @StateRegion; @Entry; @Exit; @Do; @InternalRule; @TransitionRule; @End; @StateMachine StateMachineSpec_10 = @ExternalEvent c, d; @ExternalAction; @ExternalVariable; @InternalVariable; @Constant; @EventGroup; @Signal; @State @Initial hr [[ StateType = "0", FrameColor = "0", FrameWidth = "5", FillColor = "14", TextColor = "0", Left = "70", Top = "63", Right = "130", Bottom = "88", FontIndex = "2" ]], min10 [[ StateType = "0", FrameColor = "0", FrameWidth = "5", FillColor = "14", TextColor = "0", Left = "70", Top = "123", Right = "130", Bottom = "148", FontIndex = "2" ]], min1 [[ StateType = "0", FrameColor = "0", FrameWidth = "5", FillColor = "14", TextColor = "0", Left = "70", Top = "183", Right = "130", Bottom = "208", FontIndex = "2" ]]; @StateRegion; @Entry; @Exit; @Do; @InternalRule; @TransitionRule c () hr: min10 [[ NumberOfSections = "1", RouteSectionInfo1 = "58 90 87 109 -1 32 33 3 0 0 5 2 2", RouteSectionData1 = "90 88 20 90 123 24" ]], c () min10: min1 [[ NumberOfSections = "1", RouteSectionInfo1 = "53 152 85 166 -1 33 34 3 0 0 5 2 2", RouteSectionData1 = "90 148 20 90 183 24" ]], d () min10: hr [[ NumberOfSections = "1", RouteSectionInfo1 = "121 93 145 109 -1 33 32 3 0 0 5 2 2", RouteSectionData1 = "110 123 20 110 88 24" ]], d () min1: min10 [[ NumberOfSections = "1", RouteSectionInfo1 = "106 169 148 183 -1 34 33 3 0 0 5 2 2", RouteSectionData1 = "110 183 20 110 148 24" ]]; @End; @StateMachine StateMachineSpec_9 = @ExternalEvent; @ExternalAction; @ExternalVariable; @InternalVariable; @Constant; @EventGroup; @Signal; @State @Initial update2 = StateMachineSpec_10 [[ StateType = "2", FrameColor = "0", FrameWidth = "1", FillColor = "7", TextColor = "0", Left = "41", Top = "30", Right = "155", Bottom = "237", FontIndex = "2", TextHeight = "11" ]]; @StateRegion; @Entry; @Exit; @Do; @InternalRule; @TransitionRule; @End; @StateMachine StateMachineSpec_8 = @ExternalEvent c, d; @ExternalAction; @ExternalVariable; @InternalVariable; @Constant; @EventGroup; @Signal; @State @Initial hr [[ StateType = "0", FrameColor = "0", FrameWidth = "5", FillColor = "14", TextColor = "0", Left = "231", Top = "86", Right = "291", Bottom = "111", FontIndex = "2" ]], min10 [[ StateType = "0", FrameColor = "0", FrameWidth = "5", FillColor = "14", TextColor = "0", Left = "231", Top = "146", Right = "291", Bottom = "171", FontIndex = "2" ]], min1 [[ StateType = "0", FrameColor = "0", FrameWidth = "5", FillColor = "14", TextColor = "0", Left = "231", Top = "206", Right = "291", Bottom = "231", FontIndex = "2" ]]; @StateRegion; @Entry; @Exit; @Do; @InternalRule; @TransitionRule c () hr: min10 [[ NumberOfSections = "1", RouteSectionInfo1 = "219 113 248 132 -1 27 28 3 0 0 5 2 2", RouteSectionData1 = "251 111 20 251 146 24" ]], c () min10: min1 [[ NumberOfSections = "1", RouteSectionInfo1 = "214 175 246 189 -1 28 29 3 0 0 5 2 2", RouteSectionData1 = "251 171 20 251 206 24" ]], d () min10: hr [[ NumberOfSections = "1", RouteSectionInfo1 = "282 116 306 132 -1 28 27 3 0 0 5 2 2", RouteSectionData1 = "271 146 20 271 111 24" ]], d () min1: min10 [[ NumberOfSections = "1", RouteSectionInfo1 = "267 192 309 206 -1 29 28 3 0 0 5 2 2", RouteSectionData1 = "271 206 20 271 171 24" ]]; @End; @StateMachine StateMachineSpec_7 = @ExternalEvent; @ExternalAction; @ExternalVariable; @InternalVariable; @Constant; @EventGroup; @Signal; @State @Initial update1 = StateMachineSpec_8 [[ StateType = "2", FrameColor = "0", FrameWidth = "1", FillColor = "7", TextColor = "0", Left = "202", Top = "53", Right = "316", Bottom = "260", FontIndex = "2", TextHeight = "11" ]]; @StateRegion; @Entry; @Exit; @Do; @InternalRule; @TransitionRule; @End; @StateMachine StateMachineSpec_6 = @ExternalEvent a, c, d; @ExternalAction VS_VOID IncDay, VS_VOID Switch1224, VS_VOID IncHr, VS_VOID IncMin, VS_VOID IncMon, VS_VOID ResetSeconds, VS_VOID IncYear, VS_VOID IncMin10, VS_VOID IncWeekDay; @ExternalVariable; @InternalVariable; @Constant; @EventGroup; @Signal; @State @Initial sec [[ StateType = "0", FrameColor = "0", FrameWidth = "5", FillColor = "14", TextColor = "0", Left = "347", Top = "150", Right = "407", Bottom = "175", FontIndex = "2" ]], min1 [[ StateType = "0", FrameColor = "0", FrameWidth = "5", FillColor = "14", TextColor = "0", Left = "347", Top = "210", Right = "407", Bottom = "235", FontIndex = "2" ]], min10 [[ StateType = "0", FrameColor = "0", FrameWidth = "5", FillColor = "14", TextColor = "0", Left = "227", Top = "210", Right = "287", Bottom = "235", FontIndex = "2" ]], hr [[ StateType = "0", FrameColor = "0", FrameWidth = "5", FillColor = "14", TextColor = "0", Left = "227", Top = "150", Right = "287", Bottom = "175", FontIndex = "2" ]], mon [[ StateType = "0", FrameColor = "0", FrameWidth = "5", FillColor = "14", TextColor = "0", Left = "117", Top = "150", Right = "177", Bottom = "175", FontIndex = "2" ]], date [[ StateType = "0", FrameColor = "0", FrameWidth = "5", FillColor = "14", TextColor = "0", Left = "117", Top = "210", Right = "177", Bottom = "235", FontIndex = "2" ]], day [[ StateType = "0", FrameColor = "0", FrameWidth = "5", FillColor = "14", TextColor = "0", Left = "117", Top = "270", Right = "177", Bottom = "295", FontIndex = "2" ]], year [[ StateType = "0", FrameColor = "0", FrameWidth = "5", FillColor = "14", TextColor = "0", Left = "227", Top = "270", Right = "287", Bottom = "295", FontIndex = "2" ]], mode [[ StateType = "0", FrameColor = "0", FrameWidth = "5", FillColor = "14", TextColor = "0", Left = "347", Top = "270", Right = "407", Bottom = "295", FontIndex = "2" ]]; @StateRegion; @Entry; @Exit; @Do; @InternalRule a () sec : #ResetSeconds (), a () min1 : #IncMin (), a () min10 : #IncMin10 (), a () hr : #IncHr (), a () date : #IncDay (), a () mon : #IncMon (), a () day : #IncWeekDay (), a () year : #IncYear (), a () mode : #Switch1224 (); @TransitionRule c () sec: min1 [[ NumberOfSections = "1", RouteSectionInfo1 = "341 172 381 187 -1 16 17 3 0 0 5 2 2", RouteSectionData1 = "367 175 20 367 210 24" ]], d () min1: sec [[ NumberOfSections = "1", RouteSectionInfo1 = "389 172 420 188 -1 17 16 3 0 0 5 2 2", RouteSectionData1 = "387 210 20 387 175 24" ]], c () min1: min10 [[ NumberOfSections = "1", RouteSectionInfo1 = "286 200 346 225 -1 17 18 3 0 0 5 2 2", RouteSectionData1 = "347 220 20 287 220 24" ]], d () min10: min1 [[ NumberOfSections = "1", RouteSectionInfo1 = "286 226 346 240 -1 18 17 3 0 0 5 2 2", RouteSectionData1 = "287 230 20 347 230 24" ]], c () min10: hr [[ NumberOfSections = "1", RouteSectionInfo1 = "266 184 293 201 -1 18 19 3 0 0 5 2 2", RouteSectionData1 = "267 210 20 267 175 24" ]], d () hr: min10 [[ NumberOfSections = "1", RouteSectionInfo1 = "224 172 259 185 -1 19 18 3 0 0 5 2 2", RouteSectionData1 = "247 175 20 247 210 24" ]], c () hr: mon [[ NumberOfSections = "1", RouteSectionInfo1 = "195 140 222 151 -1 19 20 3 0 0 5 2 2", RouteSectionData1 = "227 160 20 177 160 24" ]], d () mon: hr [[ NumberOfSections = "1", RouteSectionInfo1 = "176 177 208 188 -1 20 19 3 0 0 5 2 2", RouteSectionData1 = "177 170 20 227 170 24" ]], c () mon: date [[ NumberOfSections = "1", RouteSectionInfo1 = "109 171 137 187 -1 20 21 3 0 0 5 2 2", RouteSectionData1 = "137 175 20 137 210 24" ]], d () date: mon [[ NumberOfSections = "1", RouteSectionInfo1 = "160 188 187 201 -1 21 20 3 0 0 5 2 2", RouteSectionData1 = "157 210 20 157 175 24" ]], c () date: day [[ NumberOfSections = "1", RouteSectionInfo1 = "110 231 135 245 -1 21 22 3 0 0 5 2 2", RouteSectionData1 = "137 235 20 137 270 24" ]], d () day: date [[ NumberOfSections = "1", RouteSectionInfo1 = "158 246 188 259 -1 22 21 3 0 0 5 2 2", RouteSectionData1 = "157 270 20 157 235 24" ]], c () day: year [[ NumberOfSections = "1", RouteSectionInfo1 = "182 255 211 267 -1 22 23 3 0 0 5 2 2", RouteSectionData1 = "177 280 20 227 280 24" ]], d () year: day [[ NumberOfSections = "1", RouteSectionInfo1 = "199 288 226 300 -1 23 22 3 0 0 5 2 2", RouteSectionData1 = "227 290 20 177 290 24" ]], c () year: mode [[ NumberOfSections = "1", RouteSectionInfo1 = "306 254 337 269 -1 23 24 3 0 0 5 2 2", RouteSectionData1 = "287 280 20 347 280 24" ]], d () mode: year [[ NumberOfSections = "1", RouteSectionInfo1 = "298 287 341 304 -1 24 23 3 0 0 5 2 2", RouteSectionData1 = "347 290 20 287 290 24" ]]; @End; @StateMachine StateMachineSpec_5 = @ExternalEvent; @ExternalAction; @ExternalVariable; @InternalVariable; @Constant; @EventGroup; @Signal; @State @Initial update = StateMachineSpec_6 [[ StateType = "2", FrameColor = "0", FrameWidth = "1", FillColor = "7", TextColor = "0", Left = "92", Top = "22", Right = "440", Bottom = "319", FontIndex = "2", TextHeight = "111" ]]; @StateRegion; @Entry; @Exit; @Do; @InternalRule; @TransitionRule; @End; @StateMachine StateMachineSpec_4 = @ExternalEvent DateTimeout, a, b, c, d, c_long, c_released; @ExternalAction; @ExternalVariable; @InternalVariable; @Constant; @EventGroup; @Signal; @State @Initial time [[ StateType = "0", FrameColor = "0", FrameWidth = "5", FillColor = "14", TextColor = "0", Left = "79", Top = "161", Right = "139", Bottom = "186", FontIndex = "2" ]], date = StateMachineSpec_14 [[ StateType = "0", FrameColor = "0", FrameWidth = "5", FillColor = "14", TextColor = "0", Left = "30", Top = "246", Right = "146", Bottom = "273", FontIndex = "2" ]], chime [[ StateType = "0", FrameColor = "0", FrameWidth = "5", FillColor = "14", TextColor = "0", Left = "223", Top = "116", Right = "283", Bottom = "141", FontIndex = "2" ]], alarm2 [[ StateType = "0", FrameColor = "0", FrameWidth = "5", FillColor = "14", TextColor = "0", Left = "246", Top = "167", Right = "306", Bottom = "192", FontIndex = "2" ]], alarm1 [[ StateType = "0", FrameColor = "0", FrameWidth = "5", FillColor = "14", TextColor = "0", Left = "177", Top = "183", Right = "237", Bottom = "208", FontIndex = "2" ]], wait = StateMachineSpec_15 [[ StateType = "0", FrameColor = "0", FrameWidth = "5", FillColor = "14", TextColor = "0", Left = "53", Top = "96", Right = "172", Bottom = "121", FontIndex = "2" ]], update = StateMachineSpec_5 [[ StateType = "3", FrameColor = "1", FrameWidth = "1", FillColor = "9", TextColor = "4", Left = "69", Top = "49", Right = "147", Bottom = "80", FontIndex = "2", StateChartViewInfo = "-1 -1 -1 -1 1 7 1.000000" ]], update1 = StateMachineSpec_7 [[ StateType = "3", FrameColor = "1", FrameWidth = "1", FillColor = "9", TextColor = "4", Left = "187", Top = "248", Right = "244", Bottom = "277", FontIndex = "2", StateChartViewInfo = "-1 -1 -1 -1 0 8 1.000000" ]], update2 = StateMachineSpec_9 [[ StateType = "3", FrameColor = "1", FrameWidth = "1", FillColor = "9", TextColor = "4", Left = "249", Top = "231", Right = "306", Bottom = "260", FontIndex = "2", StateChartViewInfo = "-1 -1 -1 -1 0 8 1.000000" ]], stopwatch = StateMachineSpec_11 (stopwatch_on, stopwatch_off) [[ StateType = "3", FrameColor = "1", FrameWidth = "1", FillColor = "9", TextColor = "4", Left = "223", Top = "63", Right = "287", Bottom = "90", FontIndex = "2", StateChartViewInfo = "-1 -1 -1 -1 0 8 1.000000" ]], alarm1_on [[ StateType = "0", FrameColor = "0", FrameWidth = "5", FillColor = "14", TextColor = "0", Left = "345", Top = "71", Right = "405", Bottom = "96", FontIndex = "2" ]], @Initial alarm1_off [[ StateType = "0", FrameColor = "0", FrameWidth = "5", FillColor = "14", TextColor = "0", Left = "358", Top = "150", Right = "418", Bottom = "175", FontIndex = "2" ]], alarm2_on [[ StateType = "0", FrameColor = "0", FrameWidth = "5", FillColor = "14", TextColor = "0", Left = "441", Top = "70", Right = "501", Bottom = "95", FontIndex = "2" ]], @Initial alarm2_off [[ StateType = "0", FrameColor = "0", FrameWidth = "5", FillColor = "14", TextColor = "0", Left = "448", Top = "150", Right = "508", Bottom = "175", FontIndex = "2" ]], chime_on [[ StateType = "0", FrameColor = "0", FrameWidth = "5", FillColor = "14", TextColor = "0", Left = "536", Top = "67", Right = "596", Bottom = "92", FontIndex = "2" ]], @Initial chime_off [[ StateType = "0", FrameColor = "0", FrameWidth = "5", FillColor = "14", TextColor = "0", Left = "544", Top = "150", Right = "604", Bottom = "175", FontIndex = "2" ]], stopwatch_on [[ StateType = "0", FrameColor = "0", FrameWidth = "5", FillColor = "14", TextColor = "0", Left = "622", Top = "67", Right = "691", Bottom = "92", FontIndex = "2" ]], @Initial stopwatch_off [[ StateType = "0", FrameColor = "0", FrameWidth = "5", FillColor = "14", TextColor = "0", Left = "631", Top = "151", Right = "697", Bottom = "176", FontIndex = "2" ]]; @StateRegion displays (time, date, chime, alarm2, alarm1, wait, update, update1, update2, stopwatch) [[ GroupType = "1", RegionWidth = "315" ]], alarm1 (alarm1_on, alarm1_off) [[ GroupType = "1", RegionWidth = "94" ]], alarm2 (alarm2_on, alarm2_off) [[ GroupType = "1", RegionWidth = "93" ]], chime (chime_on, chime_off) [[ GroupType = "1", RegionWidth = "93" ]], stopwatch_run (stopwatch_on, stopwatch_off) [[ GroupType = "1", RegionWidth = "95" ]]; @Entry; @Exit; @Do; @InternalRule; @TransitionRule a () time: alarm1 [[ NumberOfSections = "1", RouteSectionInfo1 = "184 142 213 159 -1 8 12 3 0 1 5 2 3", RouteSectionData1 = "139 174 20 185 155 23 200 183 24" ]], d () time: date [[ NumberOfSections = "1", RouteSectionInfo1 = "52 205 84 220 -1 8 9 3 0 1 5 2 2", RouteSectionData1 = "90 186 20 68 246 24" ]], c () time: wait [[ NumberOfSections = "1", RouteSectionInfo1 = "110 136 137 148 -1 8 13 3 0 0 5 2 2", RouteSectionData1 = "121 161 20 139 121 24" ]], d () date: time [[ NumberOfSections = "1", RouteSectionInfo1 = "83 220 110 231 -1 9 8 3 0 1 5 2 2", RouteSectionData1 = "103 246 20 108 186 24" ]], DateTimeout () date: time [[ NumberOfSections = "1", RouteSectionInfo1 = "112 197 181 210 -1 9 8 3 0 1 5 2 2", RouteSectionData1 = "132 246 20 126 186 24" ]], a () chime: stopwatch [[ NumberOfSections = "1", RouteSectionInfo1 = "211 105 271 130 -1 10 35 3 0 1 5 2 2", RouteSectionData1 = "251 116 20 252 90 24" ]], a () alarm2: chime [[ NumberOfSections = "1", RouteSectionInfo1 = "254 153 314 178 -1 11 10 3 0 0 5 2 2", RouteSectionData1 = "273 167 20 252 141 24" ]], c () alarm2: update2 [[ NumberOfSections = "1", RouteSectionInfo1 = "292 198 316 213 -1 11 30 3 0 0 5 2 2", RouteSectionData1 = "292 192 20 283 231 24" ]], a () alarm1: alarm2 [[ NumberOfSections = "1", RouteSectionInfo1 = "236 201 255 215 -1 12 11 3 0 1 5 2 3", RouteSectionData1 = "231 208 20 247 218 23 266 192 24" ]], c () alarm1: update1.update1.hr [[ NumberOfSections = "2", RouteSectionInfo1 = "213 226 250 241 -1 12 25 3 0 0 5 2 2", RouteSectionData1 = "220 208 20 215 258 25", RouteSectionInfo2 = "323 87 383 98 -1 -1 27 3 0 0 5 2 2", RouteSectionData2 = "401 100 22 291 100 24" ]], c_released () wait: time [[ NumberOfSections = "1", RouteSectionInfo1 = "53 127 111 143 -1 13 8 3 0 0 5 2 2", RouteSectionData1 = "99 121 20 97 161 24" ]], c_long () wait: update [[ NumberOfSections = "1", RouteSectionInfo1 = "166 49 218 63 -1 13 14 3 0 1 5 2 3", RouteSectionData1 = "159 96 20 178 61 23 147 62 24" ]], b () update: time [[ NumberOfSections = "1", RouteSectionInfo1 = "6 98 37 112 -1 14 8 3 0 1 5 2 4", RouteSectionData1 = "69 61 20 35 67 23 38 158 23 79 179 24" ]], c () update: time [[ NumberOfSections = "1", RouteSectionInfo1 = "48 83 100 95 -1 14 8 3 0 1 5 2 5", RouteSectionData1 = "69 72 20 45 76 23 50 144 23 73 144 23 89 161 24" ]], b () update1.update1: alarm1 [[ NumberOfSections = "2", RouteSectionInfo1 = "328 178 388 203 -1 26 -1 3 0 0 5 2 2", RouteSectionData1 = "316 190 20 400 190 26", RouteSectionInfo2 = "178 228 206 242 -1 25 12 3 0 0 5 2 2", RouteSectionData2 = "197 258 21 197 208 24" ]], c () update1.update1.min1: alarm1 [[ NumberOfSections = "2", RouteSectionInfo1 = "324 208 384 233 -1 29 -1 3 0 0 5 2 2", RouteSectionData1 = "291 220 20 399 220 26", RouteSectionInfo2 = "142 215 169 233 -1 25 12 3 0 1 5 2 3", RouteSectionData2 = "197 258 21 160 237 23 185 208 24" ]], b () update2: alarm2 [[ NumberOfSections = "1", RouteSectionInfo1 = "248 217 274 236 -1 30 11 3 0 0 5 2 2", RouteSectionData1 = "267 231 20 280 192 24" ]], c () update2: alarm2 [[ NumberOfSections = "1", RouteSectionInfo1 = "304 215 352 230 -1 30 11 3 0 1 5 2 3", RouteSectionData1 = "306 244 20 331 216 23 306 179 24" ]], a () stopwatch: time [[ NumberOfSections = "1", RouteSectionInfo1 = "188 84 217 98 -1 35 8 3 0 1 5 2 4", RouteSectionData1 = "223 77 20 187 80 23 182 117 23 135 161 24" ]], d () alarm1_on alarm1: alarm1_off [[ NumberOfSections = "1", RouteSectionInfo1 = "368 121 428 146 -1 41 42 3 0 1 5 2 2", RouteSectionData1 = "397 96 20 397 150 24" ]], d () alarm1_off alarm1: alarm1_on [[ NumberOfSections = "1", RouteSectionInfo1 = "333 111 393 124 -1 42 41 3 0 1 5 2 2", RouteSectionData1 = "368 150 20 368 96 24" ]], d () alarm2_on alarm2: alarm2_off [[ NumberOfSections = "1", RouteSectionInfo1 = "430 108 490 133 -1 44 45 3 0 1 5 2 2", RouteSectionData1 = "464 95 20 463 150 24" ]], d () alarm2_off alarm2: alarm2_on [[ NumberOfSections = "1", RouteSectionInfo1 = "458 119 518 144 -1 45 44 3 0 1 5 2 2", RouteSectionData1 = "491 150 20 492 95 24" ]], d () chime_on chime: chime_off [[ NumberOfSections = "1", RouteSectionInfo1 = "521 106 581 131 -1 47 48 3 0 1 5 2 2", RouteSectionData1 = "559 92 20 559 150 24" ]], d () chime_off chime: chime_on [[ NumberOfSections = "1", RouteSectionInfo1 = "555 117 615 142 -1 48 47 3 0 1 5 2 2", RouteSectionData1 = "587 150 20 587 92 24" ]], b () stopwatch_on stopwatch: stopwatch_off [[ NumberOfSections = "1", RouteSectionInfo1 = "615 99 662 132 -1 50 51 3 0 1 5 2 2", RouteSectionData1 = "655 92 20 655 151 24" ]], b () stopwatch_off stopwatch: stopwatch_on [[ NumberOfSections = "1", RouteSectionInfo1 = "665 123 713 146 -1 51 50 3 0 1 5 2 2", RouteSectionData1 = "672 151 20 673 92 24" ]]; @End; @StateMachine StateMachineSpec_3 = @ExternalEvent; @ExternalAction; @ExternalVariable; @InternalVariable; @Constant; @EventGroup; @Signal; @State @DeepHistory displays = StateMachineSpec_4 [[ StateType = "2", FrameColor = "0", FrameWidth = "1", FillColor = "7", TextColor = "0", Left = "20", Top = "33", Right = "710", Bottom = "292", FontIndex = "2", TextHeight = "11" ]]; @StateRegion; @Entry; @Exit; @Do; @InternalRule; @TransitionRule; @End; @StateMachine StateMachineSpec_2 = @ExternalEvent a, b, c, d, BeepTimeout, BatteryWeak, T_hits_T2, b_released, T_hits_T1; @ExternalAction; @ExternalVariable; @InternalVariable; @Constant; @EventGroup AnyButton (a, d, b, c); @Signal; @State @Initial displays = StateMachineSpec_3 [[ StateType = "3", FrameColor = "1", FrameWidth = "1", FillColor = "9", TextColor = "4", Left = "32", Top = "158", Right = "117", Bottom = "188", FontIndex = "2", StateChartViewInfo = "-1 -1 -1 -1 1 8 1.000000" ]], alarms_beep = StateMachineSpec_13 [[ StateType = "2", FrameColor = "0", FrameWidth = "1", FillColor = "7", TextColor = "0", Left = "242", Top = "58", Right = "372", Bottom = "277", FontIndex = "2", TextHeight = "22" ]], @Initial off [[ StateType = "0", FrameColor = "0", FrameWidth = "5", FillColor = "14", TextColor = "0", Left = "411", Top = "86", Right = "471", Bottom = "111", FontIndex = "2" ]], on [[ StateType = "0", FrameColor = "0", FrameWidth = "5", FillColor = "14", TextColor = "0", Left = "412", Top = "165", Right = "472", Bottom = "190", FontIndex = "2" ]], @Initial ok [[ StateType = "0", FrameColor = "0", FrameWidth = "5", FillColor = "14", TextColor = "0", Left = "510", Top = "76", Right = "570", Bottom = "101", FontIndex = "2" ]], weak [[ StateType = "0", FrameColor = "0", FrameWidth = "5", FillColor = "14", TextColor = "0", Left = "512", Top = "151", Right = "572", Bottom = "176", FontIndex = "2" ]]; @StateRegion main (displays, alarms_beep) [[ GroupType = "1", RegionWidth = "376" ]], light (off, on) [[ GroupType = "1", RegionWidth = "107" ]], power (ok, weak) [[ GroupType = "1", RegionWidth = "88" ]]; @Entry; @Exit; @Do; @InternalRule; @TransitionRule T_hits_T1 () displays displays.displays.alarm1_on displays.displays.alarm2_on [|T1 != T2|]: alarms_beep.alarm1_beeps [[ NumberOfSections = "1", RouteSectionInfo1 = "57 82 253 104 -1 5 53 3 0 2 5 2 3", RouteSectionData1 = "54 158 20 55 106 23 268 98 24" ]], T_hits_T1 () displays displays.displays.alarm1_on displays.displays.alarm2_off: alarms_beep.alarm1_beeps [[ NumberOfSections = "1", RouteSectionInfo1 = "83 103 250 120 -1 5 53 3 0 2 5 2 3", RouteSectionData1 = "69 158 20 69 115 23 268 114 24" ]], T_hits_T2 () displays displays.displays.alarm1_off displays.displays.alarm2_on: alarms_beep.alarm2_beeps [[ NumberOfSections = "1", RouteSectionInfo1 = "89 180 273 193 -1 5 54 3 0 2 5 2 2", RouteSectionData1 = "76 188 20 269 194 24" ]], T_hits_T2 () displays displays.displays.alarm1_on displays.displays.alarm2_on [|T1 != T2|]: alarms_beep.alarm2_beeps [[ NumberOfSections = "1", RouteSectionInfo1 = "67 203 267 218 -1 5 54 3 0 2 5 2 3", RouteSectionData1 = "65 188 20 64 214 23 269 215 24" ]], T_hits_T1 () displays displays.displays.alarm1_on displays.displays.alarm2_on [|T1 == T2|]: alarms_beep.both_beep [[ NumberOfSections = "1", RouteSectionInfo1 = "31 236 241 252 -1 5 55 3 0 2 5 2 2", RouteSectionData1 = "51 188 20 271 254 24" ]], AnyButton () alarms_beep: displays [[ NumberOfSections = "1", RouteSectionInfo1 = "148 124 208 141 -1 52 5 3 0 2 5 2 3", RouteSectionData1 = "242 138 20 83 138 23 82 158 24" ]], BeepTimeout () alarms_beep: displays [[ NumberOfSections = "1", RouteSectionInfo1 = "143 157 228 168 -1 52 5 3 0 2 5 2 2", RouteSectionData1 = "242 172 20 117 172 24" ]], BatteryWeak () ok: weak [[ NumberOfSections = "1", RouteSectionInfo1 = "506 114 566 139 -1 60 61 3 0 1 5 2 2", RouteSectionData1 = "537 101 20 537 151 24" ]], b () off: on [[ NumberOfSections = "1", RouteSectionInfo1 = "383 114 443 131 -1 57 58 3 0 1 5 2 2", RouteSectionData1 = "424 111 20 424 165 24" ]], b_released () on: off [[ NumberOfSections = "1", RouteSectionInfo1 = "430 133 487 146 -1 58 57 3 0 1 5 2 2", RouteSectionData1 = "458 165 20 458 111 24" ]]; @End; @StateMachine StateMachineSpec_1 = @ExternalEvent; @ExternalAction; @ExternalVariable; @InternalVariable; @Constant; @EventGroup; @Signal; @State alive = StateMachineSpec_2 [[ StateType = "2", FrameColor = "0", FrameWidth = "1", FillColor = "7", TextColor = "0", Left = "8", Top = "32", Right = "579", Bottom = "290", FontIndex = "2", TextHeight = "11" ]]; @StateRegion; @Entry; @Exit; @Do; @InternalRule; @TransitionRule; @End; @StateMachine StateMachineSpec_0 = @ExternalEvent BatteryInserted, BatteryRemoved, BatteryDies; @ExternalAction; @ExternalVariable; @InternalVariable; @Constant; @EventGroup; @Signal; @State alive = StateMachineSpec_1 [[ StateType = "3", FrameColor = "1", FrameWidth = "1", FillColor = "9", TextColor = "4", Left = "49", Top = "108", Right = "143", Bottom = "154", FontIndex = "2", StateChartViewInfo = "-1 -1 -1 -1 1 8 1.000000" ]], @Initial dead [[ StateType = "0", FrameColor = "0", FrameWidth = "5", FillColor = "14", TextColor = "0", Left = "246", Top = "111", Right = "329", Bottom = "153", FontIndex = "2" ]]; @StateRegion; @Entry; @Exit; @Do; @InternalRule; @TransitionRule BatteryInserted () dead: alive [[ NumberOfSections = "1", RouteSectionInfo1 = "159 83 230 105 -1 62 2 3 0 1 5 2 4", RouteSectionData1 = "294 111 20 240 83 23 152 82 23 123 108 24" ]], BatteryRemoved () alive: dead [[ NumberOfSections = "1", RouteSectionInfo1 = "147 114 224 139 -1 2 62 3 0 1 5 2 2", RouteSectionData1 = "143 135 20 246 135 24" ]], BatteryDies () alive: dead [[ NumberOfSections = "2", RouteSectionInfo1 = "152 159 212 184 -1 2 62 3 0 1 5 2 4", RouteSectionData1 = "116 144 21 143 175 23 225 176 23 287 153 24" , RouteSectionInfo2 = "511 217 571 239 -1 61 -1 3 0 1 5 2 2", RouteSectionData2 = "539 176 20 539 312 26" ]]; @End; @TopStateMachine Citizen_quartz_multi_alarm_III = @ExternalEvent; @ExternalAction; @ExternalVariable; @InternalVariable; @Constant; @EventGroup; @Signal; @State Citizen_Quatz_MultiAlarm_III = StateMachineSpec_0 [[ StateType = "2", FrameColor = "0", FrameWidth = "1", FillColor = "7", TextColor = "0", Left = "37", Top = "49", Right = "347", Bottom = "203", FontIndex = "2", TextHeight = "11" ]]; @StateRegion; @Entry; @Exit; @Do; @InternalRule; @TransitionRule; @End [[ TopStateGraphics410 = "108 114 314 228 16 1 7 0 0 0 1", GroupType = "0", StateChartViewInfo = "-1 -1 -1 -1 1 8 1.000000" ]];