Changes between Version 17 and Version 18 of Tutorial
- Timestamp:
- Aug 26, 2013, 12:13:11 PM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Tutorial
v17 v18 68 68 This dir contains a script called '''{{{admin.py}}}'''; this script is in fact the {{{pknyx-admin.py}}} one, with a pre-defined env var pointing on our timer structure, in order to manage it. It is possible to use the global {{{pknyx-admin.py}}} script, but it would need to define $PKNX_DEVICE_PATH var and make it point to the second {{{timer}}} dir, so that the python interpreter can correctly import our files. So, for now, let's use the {{{admin.py}}} script. 69 69 70 The '''{{{timer/ config.py}}}''' file contains a few pre-defined constants:70 The '''{{{timer/settings.py}}}''' file contains a few pre-defined constants: 71 71 72 72 {{{ … … 93 93 from pknyx.api import Device 94 94 95 from fb.timerFB import TimerFB95 from timerFB import TimerFB 96 96 97 97 … … 107 107 }}} 108 108 109 Last generated file is '''{{{timer/ fb/timerFB.py}}}'''; it contains a Functional Block example:109 Last generated file is '''{{{timer/timerFB.py}}}'''; it contains a Functional Block example: 110 110 111 111 {{{ … … 137 137 from pknyx.api import FunctionalBlock 138 138 from pknyx.api import logger, schedule, notify 139 139 140 140 141 class TimerFB(FunctionalBlock): … … 187 188 from pknyx.api import Device 188 189 189 from fb.timerFB import TimerFB190 from timerFB import TimerFB 190 191 191 192 … … 351 352 from pknyx.api import Device 352 353 353 from fb.timerFB import TimerFB354 from timerFB import TimerFB 354 355 }}} 355 356 … … 385 386 == Complex example == 386 387 387 Have a look at [[browser:/trunk/pknyx/examples/3_weather|pknyx/examples/3_weather/]] to see how to use several Functional Block-s within the same Device (the examples are not packaged; they are only available from subversion repos).388 Have a look at [[browser:/trunk/pknyx/examples/3_weather|pknyx/examples/3_weather/]] to see how to use several Functional Block-s within the same Device. 388 389 389 390 == Conclusion ==