forked from pwl/yapdes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommon.h
69 lines (55 loc) · 1.49 KB
/
common.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
57
58
59
60
61
62
63
64
65
66
67
68
69
/**
* @file common.h
* @author Pawel Biernat <[email protected]>
* @date Thu Jan 21 17:58:06 2010
*
* @brief This file contains the defines and includes used throughout
* whole library
*
*
*/
#ifndef _ODE_COMMON_H_
#define _ODE_COMMON_H_
#include "stdio.h"
#include "stdlib.h"
#include "solver/ODE_typedefs.h"
/** @name boolean data types */
/**@{*/
#define FALSE 0
#define TRUE !(FALSE)
/**@}*/
/** @name default maximum size of trigger and module bundles */
/**@{*/
#define MAX_TRIG_NUMB 10
#define MAX_MOD_NUMB 30
/**@}*/
/** String length to contain module type
@todo should be increased to avoid errors and consistent with
other string lengths */
#define MODULE_TYPE_SIZE 100
/** @name solver states
@{ */
#define SOLVER_ST_INITIALIZED 0x01
#define SOLVER_ST_STATE_READY 0x02
#define SOLVER_ST_MODULES_READY 0x04
#define SOLVER_ST_READY 0x08
/**@}*/
/** maximal numbers of modules to load into a ODE_module_bundle */
#define MODULE_BUNDLE_MAX_MODULES 100
/** maximum length of strings used in yapdes. global variable */
#define ODE_MAX_STRING_LENGTH 100
/** This are the possible states of a module, @sa ODE_module.h */
typedef enum
{
MODULE_STARTED = 'a',
MODULE_STOPPED = 'b',
MODULE_ERROR = 'c'
} ODE_module_state;
/** This are the possible states of a trigger, @sa ODE_trigger.h */
typedef enum
{
TRIGGER_STARTED = 'a',
TRIGGER_STOPPED = 'b',
TRIGGER_ERROR = 'c'
} ODE_trigger_state;
#endif /* _ODE_COMMON_H_ */