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

Hot start file I/O — implementation. More...

#include "HotStartManager.hpp"
#include "SimulationContext.hpp"
#include <cstring>
#include <ctime>
#include <fstream>
#include <sstream>
Include dependency graph for HotStartManager.cpp:

Namespaces

namespace  openswmm
 

Detailed Description

Hot start file I/O — implementation.

Implements the OPENSWMM_HS_V1 binary format:

     ```
     [magic 16B][version 4B][timestamp 8B][sim_time 8B]
     [start_date 8B][end_date 8B][crs_len 4B][crs nB]
     [node_count 4B] { [name_len 4B][name nB][depth 8B][head 8B][volume 8B] } ...
     [link_count 4B] { [name_len 4B][name nB][flow 8B][depth 8B][volume 8B] } ...
     [subcatch_count 4B] { [name_len 4B][name nB][runoff 8B][gwater 8B] } ...
     [crc32 4B]
     ```

     Strings are stored as: uint32_t length (including NUL) followed by
     the null-terminated bytes. Empty CRS is stored as length=1, '\0'.
See also
HotStartManager.hpp
Legacy reference: src/solver/hotstart.c
Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License\n MIT License