Préparer le code pour que plusieurs modules puissent co-exister avec un moyen de communiquer.
Simplifier largement la machine à états du moteur: elle ne devra plus s'occuper de la régulation.
S'assurer que tous les modules pourront être exercés par des tests unitaires
Condition de satisfaction:
Un buffer reçoit les événements.
Les événements sont produits depuis les interruptions.
Les événements peuvent également être produits par les modules.
Les modules ne communiquent jamais directement entre eux.
Limitations
Ce design pattern contient un mécanisme pour que chaque module s'abonne aux événements qui le concerne. Implémenter ceci en C sera probablement pas très élégant ni lisible. En outre, chaque fois qu'un événement est émis, il faudra rechercher les abonnés au moyen de boucles dans les collections d'abonnés.
Comme le nombre de modules est réduit pour l'instant et pour le futur prévisible, il sera plus simple d'envoyer tous les événements à tous les modules: Les modules auront la responsabilité d'ignorer les événements qui ne les concernent pas.
But:
Condition de satisfaction:
Limitations