Changes between Version 5 and Version 6 of Tutorial
- Timestamp:
- Aug 15, 2013, 10:42:52 AM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Tutorial
v5 v6 16 16 * Group Address 17 17 18 == Functional Blocks==19 20 This is the central feature of '''pKNyX''', allowing user to create virtual devices which mimics real KNX devices. The Device itself is implemented as a process.21 22 Here is a very simple example which implements a timer. This timer can monitor the state of a light, and switch it off automatically after a delay. The code is taken from the '''{{{examples/3_timer}}}'''directory of '''pKNyX''' sources.18 == Timer example == 19 20 '''Functional Block''' is the central feature of '''pKNyX''', allowing user to create virtual Devices which mimics real KNX Devices. The Device itself is implemented as a process. 21 22 Here is a very simple example which implements a timer. This timer can monitor the state of a light, and switch it off automatically after a delay. The code is taken from the {{{examples/3_timer}}} directory of '''pKNyX''' sources. 23 23 24 24 {{{ … … 140 140 }}} 141 141 142 That's it! As you can see, concepts used here are simple... This Functional Block can now be used from any other real device of your installation, through Groups Addresses {{{1/1/1}}}, {{{1/ 3/1}}} and {{{1/3/1}}}. All you have to do, is to weave (link, bind...) the Group Objects of your real devices to these Groups Addresses, using the real '''ETS''' application. Sure, you maye have to change the GAD to match your installation.142 That's it! As you can see, concepts used here are simple... This Functional Block can now be used from any other real device of your installation, through Groups Addresses {{{1/1/1}}}, {{{1/2/1}}} and {{{1/3/1}}}. All you have to do, is to weave (link, bind...) the Group Objects of your real devices to these Groups Addresses, using the real '''ETS''' application. Sure, you maye have to change the GAD to match your installation. 143 143 144 144 Ok, now, lets start this device (invoke the python interpreter as for any other python script): 145 145 146 146 {{{ 147 MainThread::Logger _.__init__(): start new logger 'timer-1.2.3'147 MainThread::Logger.__init__(): start new logger 'timer-1.2.3' 148 148 MainThread::Scheduler started 149 149