rusEFI
The most advanced open source ECU
engine_module.h
Go to the documentation of this file.
1 /**
2  * @file engine_module.h
3  */
4 
5 #pragma once
6 
7 #include "engine_configuration.h"
8 
9 class EngineModule {
10 public:
11  // Called when 'Burn' is invoked
12  virtual void onConfigurationChange(engine_configuration_s const * /*previousConfig*/) { }
13 
14  // Called approx 20Hz
15  virtual void onSlowCallback() { }
16 
17  // Called approx 200Hz
18  virtual void onFastCallback() { }
19 
20  // Called whenever the ignition switch state changes
21  virtual void onIgnitionStateChanged(bool /*ignitionOn*/) { }
22 
23  // Queried to determine whether this module needs a delayed shutoff, defaults to false
24  virtual bool needsDelayedShutoff() { return false; }
25 };
virtual bool needsDelayedShutoff()
Definition: engine_module.h:24
virtual void onConfigurationChange(engine_configuration_s const *)
Definition: engine_module.h:12
virtual void onSlowCallback()
Definition: engine_module.h:15
virtual void onFastCallback()
Definition: engine_module.h:18
virtual void onIgnitionStateChanged(bool)
Definition: engine_module.h:21
Main engine configuration data structure.