Runoff interface file manager.
More...
#include <RunoffInterface.hpp>
|
| | ~RunoffInterfaceFile () |
| |
| int | openForWrite (const std::string &path, int n_subcatch, int n_pollut, int flow_units) |
| | Open file for writing (SAVE mode).
|
| |
| int | openForRead (const std::string &path, int n_subcatch, int n_pollut, int flow_units) |
| | Open file for reading (USE mode).
|
| |
| void | saveResults (const SimulationContext &ctx, double dt) |
| | Save one timestep of runoff results to file.
|
| |
| bool | readResults (SimulationContext &ctx, double *dt_out=nullptr) |
| | Read one timestep of runoff results from file.
|
| |
| void | close () |
| | Close the file and finalize header (write step count for SAVE mode).
|
| |
| bool | isOpen () const |
| |
Runoff interface file manager.
◆ ~RunoffInterfaceFile()
| openswmm::runoff_iface::RunoffInterfaceFile::~RunoffInterfaceFile |
( |
| ) |
|
|
inline |
◆ close()
| void openswmm::runoff_iface::RunoffInterfaceFile::close |
( |
| ) |
|
Close the file and finalize header (write step count for SAVE mode).
◆ isOpen()
| bool openswmm::runoff_iface::RunoffInterfaceFile::isOpen |
( |
| ) |
const |
|
inline |
◆ openForRead()
| int openswmm::runoff_iface::RunoffInterfaceFile::openForRead |
( |
const std::string & | path, |
|
|
int | n_subcatch, |
|
|
int | n_pollut, |
|
|
int | flow_units ) |
Open file for reading (USE mode).
- Returns
- 0 on success, error code on failure.
◆ openForWrite()
| int openswmm::runoff_iface::RunoffInterfaceFile::openForWrite |
( |
const std::string & | path, |
|
|
int | n_subcatch, |
|
|
int | n_pollut, |
|
|
int | flow_units ) |
Open file for writing (SAVE mode).
- Returns
- 0 on success, error code on failure.
◆ readResults()
| bool openswmm::runoff_iface::RunoffInterfaceFile::readResults |
( |
SimulationContext & | ctx, |
|
|
double * | dt_out = nullptr ) |
Read one timestep of runoff results from file.
- Parameters
-
| ctx | Simulation context (subcatchment results written here). |
| dt_out | Optional: receives the record's runoff timestep (sec), used by the USE-mode runoff clock (legacy runoff_readFromFile advances NewRunoffTime by the file's tStep). |
- Returns
- true if data was read, false if EOF.
◆ saveResults()
| void openswmm::runoff_iface::RunoffInterfaceFile::saveResults |
( |
const SimulationContext & | ctx, |
|
|
double | dt ) |
Save one timestep of runoff results to file.
- Parameters
-
| ctx | Simulation context (subcatchment results read from here). |
| dt | Timestep duration (seconds). |
The documentation for this class was generated from the following files: