reactor-c 1.0
C Runtime for Lingua Franca
Loading...
Searching...
No Matches
watchdog.h
Go to the documentation of this file.
1
9
10#ifndef WATCHDOG_H
11#define WATCHDOG_H 1
12
13#include "lf_types.h"
14#include "environment.h"
15#include "platform.h" // For lf_thread_t.
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
28typedef void (*watchdog_function_t)(void*);
29
105
120void lf_watchdog_start(watchdog_t* watchdog, interval_t additional_timeout);
121
131
133// The following functions are internal to the runtime and should not be documented by Doxygen.
134
144
154
155#ifdef __cplusplus
156}
157#endif
158
159#endif
API for the environment data structure.
int64_t instant_t
Time instant.
Definition tag.h:101
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.
int64_t interval_t
Interval of time.
Definition tag.h:107
void(* watchdog_function_t)(void *)
Watchdog function type.
Definition watchdog.h:28
void _lf_initialize_watchdogs(environment_t *env)
Function to initialize mutexes for watchdogs.
void _lf_watchdog_terminate_all(environment_t *env)
Terminates all watchdogs inside the environment.
Type definitions that are widely used across different parts of the runtime.
Platform API for runtime plugins to use while sharing implementation source code and binaries with th...
Execution environment.
Definition environment.h:52
The base type for all reactor self structs.
Definition lf_types.h:519
Trigger struct representing an output, timer, action, or input.
Definition lf_types.h:391
Typdef for watchdog_t struct, used to call watchdog handler.
Definition watchdog.h:34
struct self_base_t * base
Pointer to the reactor that contains this watchdog.
Definition watchdog.h:40
watchdog_function_t watchdog_function
The watchdog handler function.
Definition watchdog.h:103
lf_cond_t cond
Condition variable for thread synchronization.
Definition watchdog.h:79
bool active
Indicates whether the watchdog thread is currently active.
Definition watchdog.h:87
lf_thread_t thread_id
The thread ID where the watchdog handler should run.
Definition watchdog.h:71
instant_t expiration
The expiration instant for the watchdog.
Definition watchdog.h:55
interval_t min_expiration
The minimum expiration interval for the watchdog.
Definition watchdog.h:63
trigger_t * trigger
The trigger associated with this watchdog.
Definition watchdog.h:47
bool terminate
Indicates whether watchdog thread termination has been requested.
Definition watchdog.h:95