reactor-c
C Runtime for Lingua Franca
Loading...
Searching...
No Matches
environment.c File Reference
#include "environment.h"
#include "util.h"
#include "lf_types.h"
#include <string.h>
#include "tracepoint.h"
#include "scheduler.h"

Functions

void environment_free (environment_t *env)
 Free the dynamically allocated memory on the environment struct.
 
void environment_init_tags (environment_t *env, instant_t start_time, interval_t duration)
 Initialize the start and stop tags on the environment struct.
 
int environment_init (environment_t *env, const char *name, int id, int num_workers, int num_timers, int num_startup_reactions, int num_shutdown_reactions, int num_reset_reactions, int num_is_present_fields, int num_modes, int num_state_resets, int num_watchdogs, const char *trace_file_name)
 Initialize an environment struct with parameters given in the arguments.
 
void environment_verify (environment_t *env)
 Verify that the environment is correctly set up.
 

Detailed Description

Author
Erling R. Jellum

This file defines functions intitializing and freeing memory for environments. See environment.h for docs.

Function Documentation

◆ environment_free()

void environment_free ( environment_t * env)

Free the dynamically allocated memory on the environment struct.

Parameters
envThe environment in which we are executing.

◆ environment_init()

int environment_init ( environment_t * env,
const char * name,
int id,
int num_workers,
int num_timers,
int num_startup_reactions,
int num_shutdown_reactions,
int num_reset_reactions,
int num_is_present_fields,
int num_modes,
int num_state_resets,
int num_watchdogs,
const char * trace_file_name )

Initialize an environment struct with parameters given in the arguments.

◆ environment_init_tags()

void environment_init_tags ( environment_t * env,
instant_t start_time,
interval_t duration )

Initialize the start and stop tags on the environment struct.

◆ environment_verify()

void environment_verify ( environment_t * env)

Verify that the environment is correctly set up.

Parameters
env