Modifications

Sauter à la navigation Sauter à la recherche
200 octets ajoutés ,  21 avril 2025 à 23:30
Ligne 83 : Ligne 83 :       −
The {{fname|setup()}} call is used to specify a setup method (optional) and a loop method to be called.
+
The {{fname|setup()}} call is used to specify a ''setup'' method (optional) and a ''loop'' method to be called.
   −
The '''setup''' parameter can be used to specify some initialization routine. It is quite useful to declare additional sensor, additional components for your project.
+
The optional ''setup'' method is called to specify some initialization routine. It is quite useful to declare additional sensor, additional components for your project.
   −
Once {{fname|din.run()}} is called, the {{fname|async def loop( din )}} is continuously executed! That execution can even be monitored with a watchdog. The {{fname|din}} parameter offers an access to all the behaviors and features of the DIN case.
+
Once {{fname|din.run()}} is called:
 +
* the {{fname|def setup( din )}} is called once (if any)
 +
* the {{fname|async def loop( din )}} is continuously executed!
   −
The {{fname|din.run()}} exits on:
+
The ''loop'' execution can even be monitored with a watchdog.
−
* loop() exception
+
 
 +
The {{fname|din}} parameter passed to ''setup'' and ''loop'' method provide a full access to all the behaviors and features of the DIN case.
 +
 
 +
In normal condition, the {{fname|din.run()}} never exits. However, exit can happens:
 +
* When an exception is raised in ''loop''
 
* RUN_APP switch placed on STOP position
 
* RUN_APP switch placed on STOP position
  
32 908

modifications

Menu de navigation