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
65typedef void (*SWMM_ProgressCallback)(
66 SWMM_Engine engine,
67 double elapsed_frac,
68 double sim_time,
69 void* user_data
70);
71
72/* =========================================================================
73 * Warning / error callback
74 * ========================================================================= */
75
90typedef void (*SWMM_WarningCallback)(
91 SWMM_Engine engine,
92 int code,
93 const char* message,
94 void* user_data
95);
96
97/* =========================================================================
98 * Timestep begin/end callbacks
99 * ========================================================================= */
100
113 SWMM_Engine engine,
114 double sim_time,
115 double dt,
116 void* user_data
117);
118
130typedef void (*SWMM_StepEndCallback)(
131 SWMM_Engine engine,
132 double sim_time,
133 double dt,
134 void* user_data
135);
136
137/* =========================================================================
138 * Plugin event callbacks (fired by the plugin system)
139 * ========================================================================= */
140
151 SWMM_Engine engine,
152 const char* plugin_id,
153 int old_state,
154 int new_state,
155 void* user_data
156);
157
158/* =========================================================================
159 * Hot start callbacks
160 * ========================================================================= */
161
173 SWMM_Engine engine,
174 const char* object_type,
175 const char* object_id,
176 void* user_data
177);
178
179#ifdef __cplusplus
180} /* extern "C" */
181#endif
182
183#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:150
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:172
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:112
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:90
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:130
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:65