76#ifndef OPENSWMM_ENGINE_HOTSTART_H
77#define OPENSWMM_ENGINE_HOTSTART_H
89#define OPENSWMM_HOTSTART_MAGIC "OPENSWMM_HS_V1\0"
94#define OPENSWMM_HOTSTART_VERSION 1
196#define SWMM_HOTSTART_FORMAT_AUTO 0
197#define SWMM_HOTSTART_FORMAT_LEGACY 1
198#define SWMM_HOTSTART_FORMAT_NATIVE 2
230#define SWMM_HOTSTART_OMITS_WATER_AGE 0x1
231#define SWMM_HOTSTART_OMITS_REACTION_SPECIES 0x2
232#define SWMM_HOTSTART_OMITS_AQUIFER 0x4
233#define SWMM_HOTSTART_OMITS_NODE_LIDS 0x8
#define SWMM_ENGINE_API
Definition openswmm_2d.h:62
void * SWMM_Engine
Opaque handle to an OpenSWMM Engine instance.
Definition openswmm_callbacks.h:55
OpenSWMM Engine — primary transparent C API (master header).
SWMM_ENGINE_API int swmm_hotstart_set_node_depth(SWMM_HotStart hs, const char *node_id, double depth)
Edit one stored node depth record before application/write-back.
Definition openswmm_hotstart_impl.cpp:210
SWMM_ENGINE_API int swmm_hotstart_saves_get_format(SWMM_Engine engine, int idx, int *format)
Read the authored format selector of one scheduled save.
Definition openswmm_model_impl.cpp:979
SWMM_ENGINE_API int swmm_hotstart_saves_set_datetime(SWMM_Engine engine, int idx, double datetime)
Assign a scheduled save calendar date directly.
Definition openswmm_model_impl.cpp:970
SWMM_ENGINE_API int swmm_hotstart_saves_get_datetime(SWMM_Engine engine, int idx, double *datetime)
Read the scheduled calendar date of one save entry.
Definition openswmm_model_impl.cpp:947
SWMM_ENGINE_API int swmm_hotstart_get_start_date(SWMM_HotStart hs, double *start_date)
Read the saving run start calendar date.
Definition openswmm_hotstart_impl.cpp:262
SWMM_ENGINE_API int swmm_hotstart_set_link_flow(SWMM_HotStart hs, const char *link_id, double flow)
Edit one stored link flow record before application/write-back.
Definition openswmm_hotstart_impl.cpp:226
SWMM_ENGINE_API int swmm_hotstart_set_subcatch_runoff(SWMM_HotStart hs, const char *subcatch_id, double runoff)
Edit one stored subcatchment runoff record before application/write-back.
Definition openswmm_hotstart_impl.cpp:242
SWMM_ENGINE_API int swmm_hotstart_set_link_depth(SWMM_HotStart hs, const char *link_id, double depth)
Edit one stored link depth record before application/write-back.
Definition openswmm_hotstart_impl.cpp:234
SWMM_ENGINE_API int swmm_hotstart_set_node_head(SWMM_HotStart hs, const char *node_id, double head)
Edit one stored node head record before application/write-back.
Definition openswmm_hotstart_impl.cpp:218
SWMM_ENGINE_API int swmm_hotstart_warning_count(SWMM_HotStart hs)
Count warnings retained by the hot-start handle.
Definition openswmm_hotstart_impl.cpp:298
SWMM_ENGINE_API int swmm_hotstart_saves_add(SWMM_Engine engine, const char *path, double datetime)
Append an AUTO-format scheduled save authoring entry.
Definition openswmm_model_impl.cpp:1023
SWMM_ENGINE_API const char * swmm_hotstart_last_io_error(void)
Borrow the built-in hot-start reader/writer diagnostic for this thread.
Definition openswmm_hotstart_impl.cpp:98
SWMM_ENGINE_API int swmm_hotstart_close(SWMM_HotStart hs)
Flush dirty record edits and destroy a hot-start handle.
Definition openswmm_hotstart_impl.cpp:317
SWMM_ENGINE_API int swmm_hotstart_save(SWMM_Engine engine, const char *path)
Write current simulation state through the native checkpoint or state-IO path.
Definition openswmm_hotstart_impl.cpp:106
SWMM_ENGINE_API int swmm_hotstart_saves_clear(SWMM_Engine engine)
Remove all scheduled save authoring entries.
Definition openswmm_model_impl.cpp:1041
void * SWMM_HotStart
Opaque handle to an open hot start file.
Definition openswmm_hotstart.h:86
SWMM_ENGINE_API int swmm_hotstart_open(const char *path, SWMM_HotStart *hs)
Load a native OPENSWMM hot-start file into an independent handle.
Definition openswmm_hotstart_impl.cpp:154
SWMM_ENGINE_API int swmm_hotstart_link_count(SWMM_HotStart hs)
Count stored link records in a hot-start handle.
Definition openswmm_hotstart_impl.cpp:288
SWMM_ENGINE_API const char * swmm_hotstart_warning(SWMM_HotStart hs, int index)
Borrow one retained hot-start warning.
Definition openswmm_hotstart_impl.cpp:304
SWMM_ENGINE_API int swmm_hotstart_saves_count(SWMM_Engine engine, int *count)
Count scheduled SAVE HOTSTART authoring entries.
Definition openswmm_model_impl.cpp:927
SWMM_ENGINE_API int swmm_hotstart_saves_set_path(SWMM_Engine engine, int idx, const char *path)
Replace a scheduled save path without removing its row.
Definition openswmm_model_impl.cpp:959
SWMM_ENGINE_API int swmm_hotstart_node_count(SWMM_HotStart hs)
Count stored node records in a hot-start handle.
Definition openswmm_hotstart_impl.cpp:282
SWMM_ENGINE_API int swmm_hotstart_get_sim_time(SWMM_HotStart hs, double *sim_time)
Read the saved elapsed simulation time.
Definition openswmm_hotstart_impl.cpp:254
SWMM_ENGINE_API int swmm_hotstart_get_crs(SWMM_HotStart hs, char *buf, int buflen)
Copy the hot-start header CRS string.
Definition openswmm_hotstart_impl.cpp:270
SWMM_ENGINE_API int swmm_hotstart_apply(SWMM_Engine engine, SWMM_HotStart hs)
Apply record state or queue a complete restart on an initialized engine.
Definition openswmm_hotstart_impl.cpp:173
SWMM_ENGINE_API int swmm_hotstart_saves_set_format(SWMM_Engine engine, int idx, int format)
Select the authored format of an existing scheduled save.
Definition openswmm_model_impl.cpp:990
SWMM_ENGINE_API int swmm_hotstart_legacy_omits(SWMM_Engine engine, int *flags)
Report selected model features that legacy routing hotstarts cannot retain.
Definition openswmm_model_impl.cpp:1001
SWMM_ENGINE_API int swmm_hotstart_saves_get_path(SWMM_Engine engine, int idx, char *buf, int buflen)
Copy the authored path of one scheduled save entry.
Definition openswmm_model_impl.cpp:935
SWMM_ENGINE_API int swmm_hotstart_saves_remove(SWMM_Engine engine, int idx)
Remove a scheduled save entry and shift later indices down.
Definition openswmm_model_impl.cpp:1032