Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include watchdog supervisor in every module #115

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading