Changes between Version 15 and Version 16 of Tutorial


Ignore:
Timestamp:
Aug 23, 2013, 3:27:59 PM (11 years ago)
Author:
Frédéric
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Tutorial

    v15 v16  
    6363    ├── device.py
    6464    ├── fb
    65     │   ├── __init__.py
    66     │   └── timerFB.py
     65    │  ├── __init__.py
     66    │  └── timerFB.py
    6767    ├── __init__.py
    6868    └── plugins
     
    157157    DESC = "Timer FB"
    158158
    159     def _init(self):
     159    def init(self):
    160160        self._timer = 0
    161161
     
    284284    DESC = "Timer FB"
    285285
    286     def _init(self):
     286    def init(self):
    287287        self._timer = 0
    288288}}}
     
    296296There are a few parameters in the dicts; some are obvious, some will need more explanations. But this is out of the scope of this tutorial.
    297297
    298 The '''{{{_init()}}}''' method is called at the end of the Functional Block instanciation (creation); it can be used to init some additionnal global vars, or make initial tasks. Here, we just create the '''{{{_timer}}}''' var, and set it to 0.
     298The '''{{{init()}}}''' method is called at the end of the Functional Block instanciation (creation); it can be used to init some additionnal global vars, or make initial tasks. Here, we just create the '''{{{_timer}}}''' var, and set it to 0.
    299299
    300300Ok, it's time to dig in the active part of our functional block: