SinelaboreRT Header Logo

SinelaboreRT

As simple as possible, but not any simpler!

User Tools

Site Tools


wiki:examples:light_controller

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
wiki:examples:light_controller [2012/10/20 18:06] – [State machine example] pmuellerwiki:examples:light_controller [2019/12/09 20:00] (current) pmueller
Line 22: Line 22:
 The three modes of the device can be easily transferred into states. The auto state is a hierarchical state which realizes the night/day behavior when a person was detected. The design was created using the  SinelaboreRT state machine editor. The diagram is shown in the figure above. The three modes of the device can be easily transferred into states. The auto state is a hierarchical state which realizes the night/day behavior when a person was detected. The design was created using the  SinelaboreRT state machine editor. The diagram is shown in the figure above.
  
-The following [[wiki:examples:automatic_light.zip|zip file]] contains the fully worked out example with a simple text based command interface. Start the executable and type in one of the supported letters to trigger the machine.+The {{:wiki:examples:automatic_light.zip|automatic light controller}} zip files contains the fully worked out example with a simple text based command interface. Start the executable and type in one of the supported letters to trigger the machine.
  
 Available commands: Available commands:
  
  
-  * + There is a person +  * ''+'' There is a person 
-  * - There is no person +  * ''-'' There is no person 
-  * t Ambient brightness low (twilight, night) +  * ''t'' Ambient brightness low (twilight, night) 
-  * d Ambient brightness high (dawn, day) +  * ''d'' Ambient brightness high (dawn, day) 
-  * a Auto mode +  * ''a'' Auto mode 
-  * o Permanent on +  * ''o'' Permanent on 
-  * x Permanent off +  * ''x'' Permanent off 
-  * q Quit the program+  * ''q'' Quit the program
  
 The files ''gui.c/h'' realizes the keyboard handling. In the file  light_trace.c a simple trace function was realized to trace the event flow. Main.c calls the state machine and checks the keyboard for new events. All other files are automatically generated from the state machine as shown above. The files ''gui.c/h'' realizes the keyboard handling. In the file  light_trace.c a simple trace function was realized to trace the event flow. Main.c calls the state machine and checks the keyboard for new events. All other files are automatically generated from the state machine as shown above.
  
-To test the machine type in e.g.:          +  ... (repeat 20 times) +  -+To test the machine type in e.g.:   ''o        +  ... (repeat 20 times) +  -''
  
  
Line 57: Line 57:
 Have fun! Have fun!
  
 +
 +~~DISCUSSION|Leave your comments~~
 +
 +
 +{{tag>[Application_Example]}}
  
  
wiki/examples/light_controller.1350749188.txt.gz · Last modified: 2012/10/20 18:06 by pmueller

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki