File tree Expand file tree Collapse file tree 3 files changed +16
-2
lines changed
FprimeZephyrReference/Components/Watchdog Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 11// ======================================================================
22// \title Watchdog.cpp
3- // \author ortega
3+ // \author moisesmata
44// \brief cpp file for Watchdog component implementation class
55// ======================================================================
66
@@ -47,4 +47,12 @@ void Watchdog ::stop_handler(FwIndexType portNum) {
4747// Handler implementations for commands
4848// ----------------------------------------------------------------------
4949
50+ void Watchdog ::STOP_WATCHDOG_cmdHandler (FwOpcodeType opCode, U32 cmdSeq) {
51+ // Set the stop flag to stop watchdog petting
52+ this ->m_stopRequested = true ;
53+
54+ // Provide command response
55+ this ->cmdResponse_out (opCode, cmdSeq, Fw::CmdResponse::OK);
56+ }
57+
5058} // namespace Components
Original file line number Diff line number Diff line change @@ -2,6 +2,10 @@ module Components {
22 @ Component to blink an LED as a watchdog petter, driven by a rate group
33 passive component Watchdog {
44
5+ @ Command to stop the watchdog petter
6+ sync command STOP_WATCHDOG(
7+ )
8+
59 @ Telemetry channel to report watchdog petter state.
610 telemetry WatchdogState: Fw.On
711
Original file line number Diff line number Diff line change 11// ======================================================================
22// \title Watchdog.hpp
3- // \author ortega
3+ // \author moisesmata
44// \brief hpp file for Watchdog component implementation class
55// ======================================================================
66
@@ -50,6 +50,8 @@ class Watchdog : public WatchdogComponentBase {
5050 // Handler implementations for commands
5151 // ----------------------------------------------------------------------
5252
53+ void STOP_WATCHDOG_cmdHandler (FwOpcodeType opCode, U32 cmdSeq) override ;
54+
5355
5456
5557 Fw::On m_state = Fw::On::OFF; // ! Keeps track if LED is on or off
You can’t perform that action at this time.
0 commit comments