dodo5522 / solar_monitor

TS-MPPT-60 logger application
2 stars 0 forks source link

全体的なクラス構造を見直す #6

Closed dodo5522 closed 8 years ago

dodo5522 commented 8 years ago
Base event class definition especially for trigger/handler. The inheritance
tree structure is like below. These event handler class objects work with
threading by the data or configuration set when initialized.

IEventListener
   |- IEventTrigger
   |    |- DataIsUpdatedTrigger     : Catch the timing of any data updated.
   |    |- BatteryLowTrigger        : Catch the timing of low battery voltage.
   |    |- BatteryFullTrigger       : Catch the timing of battery charge completion.
   |    |- ...
   |    `- PanelTempHighTrigger     : Catch the timing of solar panel's temparature getting too high.
   |
   `- IEventHandler
        |- SystemHaltEventHandler   : Shutdown some devices consumpting power to save it.
        |- KeenIoEventHandler       : Upload the system status data to KeenIO service.
        |- XivelyEventHandler       : Upload the system status data to Xively service.
        |- ...
        `- TweetEventHandler        : Tweet the system status to Twitter service.

Event trigger class objects can have multiple event handler class objects. For
example, if you want to tweet the battery voltage and shutdown some consumpting
devices when battery voltage getting low, you make a BatteryLowTrigger object to
have TweetEventHandler and SystemHaltEventHandler objects.
dodo5522 commented 8 years ago

だいたい実装も終わったけど、今度はテスト実装が残件。