reactor-c 1.0
C Runtime for Lingua Franca
Loading...
Searching...
No Matches
watchdog_t Struct Reference

Typdef for watchdog_t struct, used to call watchdog handler. More...

#include <watchdog.h>

Data Fields

bool active
 Indicates whether the watchdog thread is currently active.
struct self_base_tbase
 Pointer to the reactor that contains this watchdog.
lf_cond_t cond
 Condition variable for thread synchronization.
instant_t expiration
 The expiration instant for the watchdog.
interval_t min_expiration
 The minimum expiration interval for the watchdog.
bool terminate
 Indicates whether watchdog thread termination has been requested.
lf_thread_t thread_id
 The thread ID where the watchdog handler should run.
trigger_ttrigger
 The trigger associated with this watchdog.
watchdog_function_t watchdog_function
 The watchdog handler function.

Detailed Description

Typdef for watchdog_t struct, used to call watchdog handler.

Field Documentation

◆ active

bool watchdog_t::active

Indicates whether the watchdog thread is currently active.

When true, the watchdog thread is running or waiting for expiration. When false, the watchdog thread is inactive (stopped or terminated).

◆ base

struct self_base_t* watchdog_t::base

Pointer to the reactor that contains this watchdog.

Points to the self_base_t struct of the reactor instance that owns this watchdog.

◆ cond

lf_cond_t watchdog_t::cond

Condition variable for thread synchronization.

Used to coordinate the watchdog thread's sleep and wake operations, and to handle termination signals.

◆ expiration

instant_t watchdog_t::expiration

The expiration instant for the watchdog.

The logical time at which the watchdog will expire. Initialized to NEVER and updated when the watchdog is started or restarted.

◆ min_expiration

interval_t watchdog_t::min_expiration

The minimum expiration interval for the watchdog.

The minimum time that must elapse before the watchdog can expire. This is added to the current logical time when starting the watchdog.

◆ terminate

bool watchdog_t::terminate

Indicates whether watchdog thread termination has been requested.

When true, the watchdog thread should terminate. Used to coordinate graceful shutdown of the watchdog thread.

◆ thread_id

lf_thread_t watchdog_t::thread_id

The thread ID where the watchdog handler should run.

Identifies the thread that should execute the watchdog's handler function when the watchdog expires.

◆ trigger

trigger_t* watchdog_t::trigger

The trigger associated with this watchdog.

Used to schedule watchdog expiration events and manage the watchdog's lifecycle.

◆ watchdog_function

watchdog_function_t watchdog_t::watchdog_function

The watchdog handler function.

Function pointer to the handler that will be called when the watchdog expires. The handler receives a pointer to the reactor's self struct.


The documentation for this struct was generated from the following file:
  • /Users/runner/work/reactor-c/reactor-c/include/core/threaded/watchdog.h