OpenSWMM Engine  6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
Loading...
Searching...
No Matches
HotStartManager.hpp File Reference

Hot start file manager — in-memory representation + I/O. More...

#include <cstdint>
#include <functional>
#include <string>
#include <vector>
Include dependency graph for HotStartManager.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  openswmm::HotStartNodeRecord
 Node hydraulic state at hot-start save time. More...
 
struct  openswmm::HotStartLinkRecord
 Link hydraulic state at hot-start save time. More...
 
struct  openswmm::HotStartSubcatchRecord
 Subcatchment state at hot-start save time. More...
 
struct  openswmm::HotStartHeader
 In-memory representation of the OPENSWMM_HS_V1 header. More...
 
struct  openswmm::HotStartFile
 In-memory hot start file data. More...
 
class  openswmm::HotStartManager
 Static utility class for hot start file operations. More...
 

Namespaces

namespace  openswmm
 

Detailed Description

Hot start file manager — in-memory representation + I/O.

HotStartManager provides the C++ implementation of the hot start API declared in include/openswmm/engine/openswmm_hotstart.h.

Binary file format — OPENSWMM_HS_V1

Offset Size Field <hr> 0 16 Magic "OPENSWMM_HS_V1\0" 16 4 Version: uint32_t = 1 20 8 Timestamp (Unix seconds): int64_t 28 8 Simulation time at save (decimal days): double 36 8 Start date (Julian date): double 44 8 End date (Julian date): double 52 4 CRS string length (bytes including NUL): uint32_t 56 n CRS string (null-terminated) 56+n 4 Node count: uint32_t ... ... Per-node: [uint32 name_len, char name[], double depth, double head, double volume] Link count: uint32_t Per-link: [uint32 name_len, char name[], double flow, double depth, double volume] Subcatch count: uint32_t Per-subcatch: [uint32 name_len, char name[], double runoff, double gwater] EOF-4 4 CRC32 of all preceding bytes: uint32_t

Threading

HotStartFile instances are not thread-safe. The C API wraps each handle with a raw pointer cast; callers are responsible for not sharing handles across threads.

See also
include/openswmm/engine/openswmm_hotstart.hC API
Legacy reference: src/solver/hotstart.c — swmm_saveHotstart()
Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License\n MIT License