|
| SWMM_ENGINE_API SWMM_Engine | swmm_engine_create (void) |
| | Create a new engine instance (SWMM_STATE_CREATED).
|
| |
| SWMM_ENGINE_API int | swmm_engine_open (SWMM_Engine engine, const char *inp, const char *rpt, const char *out) |
| | Open and parse a SWMM input file; load plugins → SWMM_STATE_OPENED.
|
| |
| SWMM_ENGINE_API int | swmm_engine_initialize (SWMM_Engine engine) |
| | Initialize the simulation → SWMM_STATE_INITIALIZED.
|
| |
| SWMM_ENGINE_API int | swmm_engine_start (SWMM_Engine engine, int save_results) |
| | Start the simulation → SWMM_STATE_STARTED.
|
| |
| SWMM_ENGINE_API int | swmm_engine_step (SWMM_Engine engine, double *elapsed_time) |
| | Advance one explicit timestep. elapsed_time==0 when done.
|
| |
| SWMM_ENGINE_API int | swmm_engine_end (SWMM_Engine engine) |
| | End the simulation → SWMM_STATE_ENDED.
|
| |
| SWMM_ENGINE_API int | swmm_engine_report (SWMM_Engine engine) |
| | Write summary report (SWMM_STATE_ENDED).
|
| |
| SWMM_ENGINE_API int | swmm_engine_close (SWMM_Engine engine) |
| | Close all files → SWMM_STATE_CLOSED.
|
| |
| SWMM_ENGINE_API void | swmm_engine_destroy (SWMM_Engine engine) |
| | Destroy the engine handle (any state, NULL safe).
|
| |
| SWMM_ENGINE_API int | swmm_engine_get_state (SWMM_Engine engine, int *state) |
| | Query the current engine lifecycle state.
|
| |
| SWMM_ENGINE_API int | swmm_set_progress_callback (SWMM_Engine engine, SWMM_ProgressCallback callback, void *user_data) |
| |
| SWMM_ENGINE_API int | swmm_set_warning_callback (SWMM_Engine engine, SWMM_WarningCallback callback, void *user_data) |
| |
| SWMM_ENGINE_API int | swmm_set_step_begin_callback (SWMM_Engine engine, SWMM_StepBeginCallback callback, void *user_data) |
| |
| SWMM_ENGINE_API int | swmm_set_step_end_callback (SWMM_Engine engine, SWMM_StepEndCallback callback, void *user_data) |
| |
| SWMM_ENGINE_API int | swmm_get_last_error (SWMM_Engine engine) |
| |
| SWMM_ENGINE_API const char * | swmm_get_last_error_msg (SWMM_Engine engine) |
| |
| SWMM_ENGINE_API const char * | swmm_error_message (int code) |
| |
| SWMM_ENGINE_API int | swmm_get_start_time (SWMM_Engine engine, double *start) |
| |
| SWMM_ENGINE_API int | swmm_get_end_time (SWMM_Engine engine, double *end) |
| |
| SWMM_ENGINE_API int | swmm_get_current_time (SWMM_Engine engine, double *current) |
| |
| SWMM_ENGINE_API int | swmm_get_routing_step (SWMM_Engine engine, double *dt) |
| |
C API implementation — engine lifecycle, callbacks, errors, timing.
- See also
- include/openswmm/engine/openswmm_engine.h
- Author
- Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
- Copyright
- Copyright (c) 2026 HydroCouple. All rights reserved.
- License\n MIT License