OpenSWMM Engine  6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
Loading...
Searching...
No Matches
openswmm_callbacks.h
Go to the documentation of this file.
1
27#ifndef OPENSWMM_ENGINE_CALLBACKS_H
28#define OPENSWMM_ENGINE_CALLBACKS_H
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
35typedef void* SWMM_Engine;
36
37/* =========================================================================
38 * Progress callback
39 * ========================================================================= */
40
64typedef void (*SWMM_ProgressCallback)(
65 SWMM_Engine engine,
66 double elapsed_frac,
67 double sim_time,
68 void* user_data
69);
70
71/* =========================================================================
72 * Warning / error callback
73 * ========================================================================= */
74
89typedef void (*SWMM_WarningCallback)(
90 SWMM_Engine engine,
91 int code,
92 const char* message,
93 void* user_data
94);
95
96/* =========================================================================
97 * Timestep begin/end callbacks
98 * ========================================================================= */
99
112 SWMM_Engine engine,
113 double sim_time,
114 double dt,
115 void* user_data
116);
117
129typedef void (*SWMM_StepEndCallback)(
130 SWMM_Engine engine,
131 double sim_time,
132 double dt,
133 void* user_data
134);
135
136/* =========================================================================
137 * Plugin event callbacks (fired by the plugin system)
138 * ========================================================================= */
139
150 SWMM_Engine engine,
151 const char* plugin_id,
152 int old_state,
153 int new_state,
154 void* user_data
155);
156
157/* =========================================================================
158 * Hot start callbacks
159 * ========================================================================= */
160
172 SWMM_Engine engine,
173 const char* object_type,
174 const char* object_id,
175 void* user_data
176);
177
178#ifdef __cplusplus
179} /* extern "C" */
180#endif
181
182#endif /* OPENSWMM_ENGINE_CALLBACKS_H */
void * SWMM_Engine
Opaque handle to an OpenSWMM Engine instance.
Definition openswmm_callbacks.h:35
void(* SWMM_PluginStateCallback)(SWMM_Engine engine, const char *plugin_id, int old_state, int new_state, void *user_data)
Called when a plugin changes state.
Definition openswmm_callbacks.h:149
void(* SWMM_HotStartMissingCallback)(SWMM_Engine engine, const char *object_type, const char *object_id, void *user_data)
Called for each object that was missing when applying a hot start.
Definition openswmm_callbacks.h:171
void(* SWMM_StepBeginCallback)(SWMM_Engine engine, double sim_time, double dt, void *user_data)
Called at the beginning of each simulation timestep, before physics.
Definition openswmm_callbacks.h:111
void(* SWMM_WarningCallback)(SWMM_Engine engine, int code, const char *message, void *user_data)
Called when the engine emits a warning or non-fatal error.
Definition openswmm_callbacks.h:89
void(* SWMM_StepEndCallback)(SWMM_Engine engine, double sim_time, double dt, void *user_data)
Called at the end of each simulation timestep, after physics.
Definition openswmm_callbacks.h:129
void(* SWMM_ProgressCallback)(SWMM_Engine engine, double elapsed_frac, double sim_time, void *user_data)
Called after each simulation timestep to report progress.
Definition openswmm_callbacks.h:64