Changes between Version 17 and Version 18 of Tutorial


Ignore:
Timestamp:
Aug 26, 2013, 12:13:11 PM (11 years ago)
Author:
Frédéric
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Tutorial

    v17 v18  
    6868This 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.
    6969
    70 The '''{{{timer/config.py}}}''' file contains a few pre-defined constants:
     70The '''{{{timer/settings.py}}}''' file contains a few pre-defined constants:
    7171
    7272{{{
     
    9393from pknyx.api import Device
    9494
    95 from fb.timerFB import TimerFB
     95from timerFB import TimerFB
    9696
    9797
     
    107107}}}
    108108
    109 Last generated file is '''{{{timer/fb/timerFB.py}}}'''; it contains a Functional Block example:
     109Last generated file is '''{{{timer/timerFB.py}}}'''; it contains a Functional Block example:
    110110
    111111{{{
     
    137137from pknyx.api import FunctionalBlock
    138138from pknyx.api import logger, schedule, notify
     139
    139140
    140141class TimerFB(FunctionalBlock):
     
    187188from pknyx.api import Device
    188189
    189 from fb.timerFB import TimerFB
     190from timerFB import TimerFB
    190191
    191192
     
    351352from pknyx.api import Device
    352353
    353 from fb.timerFB import TimerFB
     354from timerFB import TimerFB
    354355}}}
    355356
     
    385386== Complex example ==
    386387
    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).
     388Have 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.
    388389
    389390== Conclusion ==