reactor-c 1.0
C Runtime for Lingua Franca
Loading...
Searching...
No Matches
initialize_from_file.h
Go to the documentation of this file.
1
8#ifndef INITIALIZE_FROM_FILE_H
9#define INITIALIZE_FROM_FILE_H
10
11#include <stddef.h> // Defines size_t
12#include "reactor.h"
13#include "lf_types.h"
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19#define SC_CSV_LINE_MAX 256
20#define SC_CSV_MAX_COLS 256
21
107int lf_initialize_double(const char* filename, char delimiter, size_t row_number, ...);
108
194int lf_initialize_int(const char* filename, char delimiter, size_t row_number, ...);
195
298#define lf_initialize_string(filename, delimiter, row_number, ...) \
299 _lf_initialize_string(filename, delimiter, row_number, &((self_base_t*)self)->allocations, __VA_ARGS__)
300
301int _lf_initialize_string(const char* filename, char delimiter, size_t row_number,
302 struct allocation_record_t** allocations, ...);
303
304#ifdef __cplusplus
305}
306#endif
307
308#endif // INITIALIZE_FROM_FILE_H
int lf_initialize_int(const char *filename, char delimiter, size_t row_number,...)
Read one delimited row from a file and parse as integers.
int lf_initialize_double(const char *filename, char delimiter, size_t row_number,...)
Read one delimited row from a file and parse as doubles.
int _lf_initialize_string(const char *filename, char delimiter, size_t row_number, struct allocation_record_t **allocations,...)
Type definitions that are widely used across different parts of the runtime.
Definitions for the C target of Lingua Franca shared by threaded and unthreaded versions.
Allocation record to keep track of dynamically-allocated memory.
Definition lf_types.h:499