Skip to content

Commit

Permalink
Include watchdog supervisor in every module
Browse files Browse the repository at this point in the history
Signed-off-by: Cornelius Claussen <[email protected]>
  • Loading branch information
corneliusclaussen committed Jan 26, 2024
1 parent a054460 commit f97b596
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ev-dev-tools/src/ev_cli/templates/ld-ev.cpp.j2
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,13 @@ std::vector<Everest::cmd> everest_register(const json& connections) {
static Everest::MqttProvider mqtt_provider(adapter);
{% endif %}
static Everest::TelemetryProvider telemetry_provider(adapter);
static Everest::WatchdogSupervisor watchdog_supervisor(adapter);

static {{ info.class_name }} module(
module_info,
{%- if info.enable_external_mqtt %}mqtt_provider, {% endif -%}
{%- if info.enable_telemetry %}telemetry_provider, {% endif -%}
watchdog_supervisor,
{%- for impl in provides -%}
std::move(p_{{ impl.id }}){{ ', ' }}
{%- endfor -%}
Expand Down
1 change: 1 addition & 0 deletions ev-dev-tools/src/ev_cli/templates/ld-ev.hpp.j2
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#include <framework/ModuleAdapter.hpp>
#include <framework/everest.hpp>
#include <utils/watchdog.hpp>

#include <everest/logging.hpp>

Expand Down
3 changes: 3 additions & 0 deletions ev-dev-tools/src/ev_cli/templates/module.hpp.j2
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public:
{% if info.enable_telemetry %}
Everest::TelemetryProvider& telemetry,
{% endif %}
Everest::WatchdogSupervisor& watchdog_supervisor,
{% for impl in provides %}
std::unique_ptr<{{ impl.base_class }}> p_{{ impl.id }},
{% endfor %}
Expand All @@ -61,6 +62,7 @@ public:
{% if info.enable_telemetry %}
telemetry(telemetry),
{% endif %}
watchdog_supervisor(watchdog_supervisor),
{% for impl in provides %}
p_{{ impl.id }}(std::move(p_{{ impl.id }})),
{% endfor %}
Expand All @@ -76,6 +78,7 @@ public:
{% if info.enable_telemetry %}
Everest::TelemetryProvider& telemetry;
{% endif %}
Everest::WatchdogSupervisor& watchdog_supervisor;
{% for impl in provides %}
const std::unique_ptr<{{ impl.base_class }}> p_{{ impl.id }};
{% endfor %}
Expand Down

0 comments on commit f97b596

Please sign in to comment.