-
Notifications
You must be signed in to change notification settings - Fork 1
/
defs_fmi.h
56 lines (44 loc) · 899 Bytes
/
defs_fmi.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#ifndef DEFSFMI
#define DEFSFMI
#include <stdio.h>
#include <stdbool.h>
typedef struct {
/***** Update these data accordingly based on your RoboSim module variables *****/
float var0_float;
bool var1_boolean;
char *var2_string;
int var3_int;
bool var4_boolean;
bool var5_boolean;
/***** End *****/
// d-model-specific outputs
char *d_model_event;
char *state;
char *target_state;
char *status;
bool done;
//Terminate simulation flag
bool terminateSimulation;
} ModelData;
void setStartValues(ModelData* comp); // Optional
//#define M(v) (comp->v)
#define M(v) (comp->v)
/**
* init function
*/
void init(ModelData* comp);
/**
* trigger
*/
ModelData* tick(ModelData* comp);
/**
* leave/enter functions (Unused)
*/
void enter(ModelData* comp);
void leave(ModelData* comp);
/*
* Function to free memory when terminating
*/
void release();
/**** ****/
#endif