reactor-c
C Runtime for Lingua Franca
Loading...
Searching...
No Matches
watchdog.h File Reference

Declarations for watchdogs. More...

#include "lf_types.h"
#include "environment.h"
#include "platform.h"

Go to the source code of this file.

Data Structures

struct  watchdog_t
 

Typedefs

typedef void(* watchdog_function_t) (void *)
 
typedef struct watchdog_t watchdog_t
 

Functions

void lf_watchdog_start (watchdog_t *watchdog, interval_t additional_timeout)
 Start or restart the watchdog timer.
 
void lf_watchdog_stop (watchdog_t *watchdog)
 Stop the specified watchdog without invoking the expiration handler. This function sets the expiration time of the watchdog to NEVER.
 

Detailed Description

Declarations for watchdogs.

Author
Benjamin Asch
Edward A. Lee

Typedef Documentation

◆ watchdog_function_t

typedef void(* watchdog_function_t) (void *)

Watchdog function type. The argument passed to one of these watchdog functions is a pointer to the self struct for the reactor.

◆ watchdog_t

typedef struct watchdog_t watchdog_t

Typdef for watchdog_t struct, used to call watchdog handler.

Function Documentation

◆ lf_watchdog_start()

void lf_watchdog_start ( watchdog_t * watchdog,
interval_t additional_timeout )

Start or restart the watchdog timer.

This function sets the expiration time of the watchdog to the current logical time plus the minimum timeout of the watchdog plus the specified additional_timeout. This function assumes the reactor mutex is held when it is called; this assumption is satisfied whenever this function is called from within a reaction that declares the watchdog as an effect.

Parameters
watchdogThe watchdog to be started
additional_timeoutAdditional timeout to be added to the watchdog's minimum expiration.

◆ lf_watchdog_stop()

void lf_watchdog_stop ( watchdog_t * watchdog)

Stop the specified watchdog without invoking the expiration handler. This function sets the expiration time of the watchdog to NEVER.

Parameters
watchdogThe watchdog.