SatNOGS-COMMS  4.1.0
A COMMS subsystem for CubeSats
Loading...
Searching...
No Matches
satnogs::comms::io_wdg Class Reference

IO and GS watchdog. More...

#include <io_wdg.hpp>

Public Member Functions

 io_wdg (io_wdg const &)=delete
void operator= (io_wdg const &)=delete
void start ()
 Starts the io_wdg. This method should be called after the board initialization process (satnogs::comms::lib::board::init()).
void set_period (uint32_t period_mins)
 Updates the watchdog period in both the currently running instance and at the persistent storage.
uint32_t period_mins ()
 Gets the currently configured period in minutes.
void reset ()
 Resets the watchdog timer.

Static Public Member Functions

static io_wdgget_instance ()
 Singleton access to the io_wdg subsystem.

Static Public Attributes

static constexpr uint32_t min_period_mins = 240
static constexpr uint32_t max_period_mins = 20160
static constexpr uint32_t task_wdg_interval = 30000

Detailed Description

IO and GS watchdog.

This class implements an IO and GS watchdog with configurable via TC expiration period.

To disable the io_wdg set the CONFIG_IO_WDG_PERIOD_MINS KConfig option to 0.

Todo
Currently the io_wdg guards only the two RF interfaces. The goal is to enhance it an monitor all configured IO interfaces (UART, CAN, etc)

Definition at line 41 of file io_wdg.hpp.

Constructor & Destructor Documentation

◆ io_wdg()

satnogs::comms::io_wdg::io_wdg ( io_wdg const & )
delete

Member Function Documentation

◆ get_instance()

io_wdg & satnogs::comms::io_wdg::get_instance ( )
inlinestatic

Singleton access to the io_wdg subsystem.

Returns
io_wdg&

Definition at line 62 of file io_wdg.hpp.

◆ operator=()

void satnogs::comms::io_wdg::operator= ( io_wdg const & )
delete

◆ period_mins()

uint32_t satnogs::comms::io_wdg::period_mins ( )

Gets the currently configured period in minutes.

Returns
uint32_t the period in minutes

Definition at line 74 of file io_wdg.cpp.

◆ reset()

void satnogs::comms::io_wdg::reset ( )

Resets the watchdog timer.

This should be called whenever a new frame is received from the radio interfaces or any other IO activity (e.g CAN, UART, etc)

Definition at line 160 of file io_wdg.cpp.

◆ set_period()

void satnogs::comms::io_wdg::set_period ( uint32_t period_mins)

Updates the watchdog period in both the currently running instance and at the persistent storage.

Warning
For the new period to permanently take effect, the commit() method should be called. For more information refer to the settings subsystem documentation.
Parameters
period_minsthe period in minutes

Definition at line 135 of file io_wdg.cpp.

◆ start()

void satnogs::comms::io_wdg::start ( )

Starts the io_wdg. This method should be called after the board initialization process (satnogs::comms::lib::board::init()).

Definition at line 54 of file io_wdg.cpp.

Member Data Documentation

◆ max_period_mins

uint32_t satnogs::comms::io_wdg::max_period_mins = 20160
staticconstexpr

The maximum allowed period in minutes

Definition at line 52 of file io_wdg.hpp.

◆ min_period_mins

uint32_t satnogs::comms::io_wdg::min_period_mins = 240
staticconstexpr

The minimum allowed period in minutes

Definition at line 47 of file io_wdg.hpp.

◆ task_wdg_interval

uint32_t satnogs::comms::io_wdg::task_wdg_interval = 30000
staticconstexpr

Definition at line 54 of file io_wdg.hpp.


The documentation for this class was generated from the following files: