Différences entre versions de « Mydin-classes-diagram »

De MCHobby - Wiki
Sauter à la navigation Sauter à la recherche
Ligne 19 : Ligne 19 :
 
* '''Pico3Mod''' : Specialized implementation of the PicoControler for a 3 modules size DIN. As the microcontroler is now placed on a PCB with fixed dimensions and obvious placement constraints (due to the 3 modules Din) then the specific hardware design like buttons, LEDs, interface connectors can be defined by this class. This class also defines the interface between the controler and the 3 modules backplane.
 
* '''Pico3Mod''' : Specialized implementation of the PicoControler for a 3 modules size DIN. As the microcontroler is now placed on a PCB with fixed dimensions and obvious placement constraints (due to the 3 modules Din) then the specific hardware design like buttons, LEDs, interface connectors can be defined by this class. This class also defines the interface between the controler and the 3 modules backplane.
 
* '''Pico6Mod''' : Another specialized implementation of the PicoControler for a 6 modules size DIN. Thanks to additional place available, it is also possible to add a LCD/OLED display, mini-joystick aside the usual interface.
 
* '''Pico6Mod''' : Another specialized implementation of the PicoControler for a 6 modules size DIN. Thanks to additional place available, it is also possible to add a LCD/OLED display, mini-joystick aside the usual interface.
* '''TwoRelay3Mod''' is a specialized Backplane implementation for a 3 modules DIN. Backplane 3 modules shares a common interface with the 3 modules Controler (Pico3Mod and any 3 modules Controler will use exactly the same interface). Backplane class implements the {{fname|attach( controler )}} method to expose its properties into the Controler object.
+
* '''TwoRelay3Mod''' is a specialized Backplane implementation for a 3 modules DIN. Backplane 3 modules shares a common interface with the 3 modules Controler (Pico3Mod and any 3 modules Controler will use exactly the same interface). Backplane class '''must implements''' the {{fname|attach( controler )}} method. The {{fname|attach()}} method is called by configure() to expose the backplane properties into the controler object.

Version du 26 avril 2025 à 23:44

Page-under-construction.pngPage(s) en cours de traduction/élaboration.

Page(s) under translation/construction

About this section

Before reading the classes documentation, it may be opportune to understand how the MyDin core is designed.

That will help to understand how the code works and where are located the key items when programming your MyDin project with MicroPython.

Class diagram

MyDin-Class-diagram.jpg

Here a short description of the main classes and their responsibilities:

  • DinControler : Base class responsible for starting the asynchronous execution. It puts every mechanism in place to initiate the setup then start asynchronous tasks including the user_loop task. A this level, the DinCOntroler doesn't know anything about the underlaying microcontroler used. DinControler also takes care of the process termination.
  • PicoControler : Base class for myDin solution based on Raspberry-Pi Pico microcontroler. PicoControler inherits of DinControler (and all its behavior). At the PicoContoler level, we can create object related to microcontroler hardware that will be shared accross all the descendant classes. At the PicoControler level we can define the common I2C bus, RTC clock, internal temperature sensor, watchdog and e.
  • Pico3Mod : Specialized implementation of the PicoControler for a 3 modules size DIN. As the microcontroler is now placed on a PCB with fixed dimensions and obvious placement constraints (due to the 3 modules Din) then the specific hardware design like buttons, LEDs, interface connectors can be defined by this class. This class also defines the interface between the controler and the 3 modules backplane.
  • Pico6Mod : Another specialized implementation of the PicoControler for a 6 modules size DIN. Thanks to additional place available, it is also possible to add a LCD/OLED display, mini-joystick aside the usual interface.
  • TwoRelay3Mod is a specialized Backplane implementation for a 3 modules DIN. Backplane 3 modules shares a common interface with the 3 modules Controler (Pico3Mod and any 3 modules Controler will use exactly the same interface). Backplane class must implements the attach( controler ) method. The attach() method is called by configure() to expose the backplane properties into the controler object.