![]() |
OpenSWMM Engine
6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
|
Classes | |
| struct | ClimateRow |
| One row of a climate file (user CSV form). More... | |
| struct | FormatResult |
| Lightweight outcome for format parse / materialise calls. More... | |
| struct | HotstartHeader |
| HSF header / counts (matches legacy hotstart.c layout). More... | |
| struct | HotstartLinkState |
| Per-link routing state snapshot. More... | |
| struct | HotstartNodeState |
| Per-node routing state snapshot. More... | |
| struct | HotstartSnapshot |
| Top-level snapshot — header plus per-object vectors. More... | |
| struct | HotstartSubcatchState |
| Per-subcatchment routing state snapshot (HSF v3+). More... | |
| struct | RaingageRow |
| One row of a raingage data file ("Standard" SWMM columnar). More... | |
| struct | RoutingInterfaceMetadata |
| Header / metadata captured at the top of a routing interface file. More... | |
| struct | RoutingInterfaceRow |
| One per-object record in a routing interface file. More... | |
| struct | TimeseriesRow |
| One row of a timeseries (SWMM-native text format). More... | |
Functions | |
| FormatResult | parseClimateCsv (const std::string &path, std::vector< ClimateRow > &rows) |
| FormatResult | writeClimateCsv (const std::string &path, const std::vector< ClimateRow > &rows) |
| FormatResult | ok () |
| FormatResult | fail (std::string message) |
| FormatResult | parseHotstartHsf (const std::string &path, HotstartSnapshot &snapshot) |
Parse an HSF v4 file into a HotstartSnapshot. | |
| FormatResult | writeHotstartHsf (const std::string &path, const HotstartSnapshot &snapshot) |
Write a HotstartSnapshot to an HSF v4 file at path. | |
| FormatResult | parseRaingageStd (const std::string &path, std::vector< RaingageRow > &rows) |
| FormatResult | writeRaingageStd (const std::string &path, const std::vector< RaingageRow > &rows) |
| FormatResult | parseRoutingInterfaceText (const std::string &path, RoutingInterfaceMetadata &meta, std::vector< RoutingInterfaceRow > &rows) |
| Parse a SWMM5 routing-interface text file into metadata + rows. | |
| FormatResult | writeRoutingInterfaceText (const std::string &path, const RoutingInterfaceMetadata &meta, const std::vector< RoutingInterfaceRow > &rows) |
| Write metadata + rows out to a SWMM5 routing-interface text file. | |
| FormatResult | parseTimeseriesText (const std::string &path, std::vector< TimeseriesRow > &rows) |
Parse a SWMM-native timeseries text file at path into rows. | |
| FormatResult | writeTimeseriesText (const std::string &path, const std::vector< TimeseriesRow > &rows) |
Write rows back to a SWMM-native timeseries text file at path. | |
|
inline |
|
inline |
| FormatResult openswmm::gpkg::formats::parseClimateCsv | ( | const std::string & | path, |
| std::vector< ClimateRow > & | rows ) |
| FormatResult openswmm::gpkg::formats::parseHotstartHsf | ( | const std::string & | path, |
| HotstartSnapshot & | snapshot ) |
Parse an HSF v4 file into a HotstartSnapshot.
Populates header.{num_*,flow_units,file_version,file_stamp}, node_state[], and link_state[]. subcatch_state[] is left empty (see header doc — runoff state is out of scope for this slice).
| path | Filesystem path to the HSF file. |
| snapshot | Output snapshot (existing content is overwritten). |
| FormatResult openswmm::gpkg::formats::parseRaingageStd | ( | const std::string & | path, |
| std::vector< RaingageRow > & | rows ) |
| FormatResult openswmm::gpkg::formats::parseRoutingInterfaceText | ( | const std::string & | path, |
| RoutingInterfaceMetadata & | meta, | ||
| std::vector< RoutingInterfaceRow > & | rows ) |
Parse a SWMM5 routing-interface text file into metadata + rows.
| path | Filesystem path to read. |
| meta | Output metadata (title, step, units, pollutants, objects). Pollutant_values length on each row equals meta.pollutant_ids.size(). |
| rows | Output data rows (appended; caller clears if needed). |
| FormatResult openswmm::gpkg::formats::parseTimeseriesText | ( | const std::string & | path, |
| std::vector< TimeseriesRow > & | rows ) |
Parse a SWMM-native timeseries text file at path into rows.
| path | Filesystem path to read. |
| rows | Output rows (appended; caller must clear if needed). |
ok on success; error carries open / parse diagnostics on failure. | FormatResult openswmm::gpkg::formats::writeClimateCsv | ( | const std::string & | path, |
| const std::vector< ClimateRow > & | rows ) |
| FormatResult openswmm::gpkg::formats::writeHotstartHsf | ( | const std::string & | path, |
| const HotstartSnapshot & | snapshot ) |
Write a HotstartSnapshot to an HSF v4 file at path.
Header counts must already match the lengths of the per-object state vectors; mismatches return a FormatResult with ok=false rather than writing a corrupt file. Subcatchment runoff state is not written — the slice's scope is routing-only round-trip.
| FormatResult openswmm::gpkg::formats::writeRaingageStd | ( | const std::string & | path, |
| const std::vector< RaingageRow > & | rows ) |
| FormatResult openswmm::gpkg::formats::writeRoutingInterfaceText | ( | const std::string & | path, |
| const RoutingInterfaceMetadata & | meta, | ||
| const std::vector< RoutingInterfaceRow > & | rows ) |
Write metadata + rows out to a SWMM5 routing-interface text file.
meta.object_ids is written verbatim to the header. Rows whose object_id doesn't appear in meta.object_ids are still emitted — the legacy reader would silently skip them, so we do not enforce the registry.
| FormatResult openswmm::gpkg::formats::writeTimeseriesText | ( | const std::string & | path, |
| const std::vector< TimeseriesRow > & | rows ) |
Write rows back to a SWMM-native timeseries text file at path.
Output uses MM/DD/YYYY HH:MM:SS followed by a fixed-precision value. Idempotent round-trip with parseTimeseriesText.