![]() |
OpenSWMM Engine
6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
|
OpenSWMM Engine — Statistics Query C API. More...
#include "openswmm_engine.h"Go to the source code of this file.
Functions | |
| SWMM_ENGINE_API int | swmm_stat_node_max_depth (SWMM_Engine engine, int idx, double *val) |
| Read maximum recorded water depth for one node. | |
| SWMM_ENGINE_API int | swmm_stat_node_max_overflow (SWMM_Engine engine, int idx, double *val) |
| Read maximum recorded overflow discharge for one node. | |
| SWMM_ENGINE_API int | swmm_stat_node_vol_flooded (SWMM_Engine engine, int idx, double *val) |
| Read cumulative flooded water volume for one node. | |
| SWMM_ENGINE_API int | swmm_stat_node_time_flooded (SWMM_Engine engine, int idx, double *val) |
| Read cumulative flooding duration for one node. | |
| SWMM_ENGINE_API int | swmm_stat_link_max_flow (SWMM_Engine engine, int idx, double *val) |
| Read maximum recorded absolute flow for one link. | |
| SWMM_ENGINE_API int | swmm_stat_link_max_velocity (SWMM_Engine engine, int idx, double *val) |
| Read maximum recorded absolute flow velocity for one link. | |
| SWMM_ENGINE_API int | swmm_stat_link_max_filling (SWMM_Engine engine, int idx, double *val) |
| Read maximum recorded depth/full-depth ratio for one link. | |
| SWMM_ENGINE_API int | swmm_stat_link_vol_flow (SWMM_Engine engine, int idx, double *val) |
| Read cumulative conveyed water volume for one link. | |
| SWMM_ENGINE_API int | swmm_stat_link_surcharge_time (SWMM_Engine engine, int idx, double *val) |
| Read cumulative surcharged duration for one link. | |
| SWMM_ENGINE_API int | swmm_stat_subcatch_precip (SWMM_Engine engine, int idx, double *val) |
| Read cumulative precipitation volume for one subcatchment. | |
| SWMM_ENGINE_API int | swmm_stat_subcatch_runoff_vol (SWMM_Engine engine, int idx, double *val) |
| Read cumulative runoff volume for one subcatchment. | |
| SWMM_ENGINE_API int | swmm_stat_subcatch_max_runoff (SWMM_Engine engine, int idx, double *val) |
| Read maximum recorded runoff discharge for one subcatchment. | |
| SWMM_ENGINE_API int | swmm_stat_node_max_depth_bulk (SWMM_Engine engine, double *buf, int count) |
| Copy maximum recorded water depth for a prefix of the node table. | |
| SWMM_ENGINE_API int | swmm_stat_link_max_flow_bulk (SWMM_Engine engine, double *buf, int count) |
| Copy maximum recorded absolute flow for a prefix of the link table. | |
| SWMM_ENGINE_API int | swmm_stat_subcatch_runoff_vol_bulk (SWMM_Engine engine, double *buf, int count) |
| Copy cumulative runoff volume for a prefix of the subcatchment table. | |
| SWMM_ENGINE_API int | swmm_stat_node_max_overflow_bulk (SWMM_Engine engine, double *buf, int count) |
| Copy maximum recorded overflow discharge for a prefix of the node table. | |
| SWMM_ENGINE_API int | swmm_stat_node_vol_flooded_bulk (SWMM_Engine engine, double *buf, int count) |
| Copy cumulative flooded water volume for a prefix of the node table. | |
| SWMM_ENGINE_API int | swmm_stat_node_time_flooded_bulk (SWMM_Engine engine, double *buf, int count) |
| Copy cumulative flooding duration for a prefix of the node table. | |
| SWMM_ENGINE_API int | swmm_stat_subcatch_max_runoff_bulk (SWMM_Engine engine, double *buf, int count) |
| Copy maximum recorded runoff discharge for a prefix of the subcatchment table. | |
| SWMM_ENGINE_API int | swmm_stat_link_max_velocity_bulk (SWMM_Engine engine, double *buf, int count) |
| Copy maximum recorded absolute flow velocity for a prefix of the link table. | |
| SWMM_ENGINE_API int | swmm_stat_link_max_filling_bulk (SWMM_Engine engine, double *buf, int count) |
| Copy maximum recorded depth/full-depth ratio for a prefix of the link table. | |
| SWMM_ENGINE_API int | swmm_stat_link_vol_flow_bulk (SWMM_Engine engine, double *buf, int count) |
| Copy cumulative conveyed water volume for a prefix of the link table. | |
| SWMM_ENGINE_API int | swmm_stat_link_surcharge_time_bulk (SWMM_Engine engine, double *buf, int count) |
| Copy cumulative surcharged duration for a prefix of the link table. | |
OpenSWMM Engine — Statistics Query C API.
Provides functions for querying cumulative statistics for nodes, links, and subcatchments after (or during) simulation.
| SWMM_ENGINE_API int swmm_stat_link_max_filling | ( | SWMM_Engine | engine, |
| int | idx, | ||
| double * | val ) |
Read maximum recorded depth/full-depth ratio for one link.
Does not advance/finalize the simulation or recompute the statistic. Distinct node/link object APIs may apply display-unit conversions; these swmm_stat_* accessors return the raw stored values.
| [in] | engine | Non-null live engine with initialized statistics storage; exclusive access is required. No lifecycle guard is imposed, so a running read reflects current accumulation. |
| [in] | idx | Zero-based link index in the current model. |
| [out] | val | Optional destination in dimensionless. Values are copied from internal statistics without project display-unit conversion. |
| SWMM_ENGINE_API int swmm_stat_link_max_filling_bulk | ( | SWMM_Engine | engine, |
| double * | buf, | ||
| int | count ) |
Copy maximum recorded depth/full-depth ratio for a prefix of the link table.
Uses the same raw internal units and object order as swmm_stat_link_max_filling(). No required-size output or short-buffer error is provided; query the object count separately when all rows are needed.
| [in] | engine | Non-null live engine with initialized statistics storage; exclusive access is required. No lifecycle guard is imposed, so a running read reflects current accumulation. |
| [out] | buf | Non-null caller-owned array of at least count doubles. Copies min(count,object count) values in dimensionless; entries beyond that prefix are unchanged. |
| [in] | count | Positive buffer capacity/requested prefix length in elements, not bytes. May be smaller than the full object count. |
| SWMM_ENGINE_API int swmm_stat_link_max_flow | ( | SWMM_Engine | engine, |
| int | idx, | ||
| double * | val ) |
Read maximum recorded absolute flow for one link.
Does not advance/finalize the simulation or recompute the statistic. Distinct node/link object APIs may apply display-unit conversions; these swmm_stat_* accessors return the raw stored values.
| [in] | engine | Non-null live engine with initialized statistics storage; exclusive access is required. No lifecycle guard is imposed, so a running read reflects current accumulation. |
| [in] | idx | Zero-based link index in the current model. |
| [out] | val | Optional destination in ft3/s. Values are copied from internal statistics without project display-unit conversion. |
| SWMM_ENGINE_API int swmm_stat_link_max_flow_bulk | ( | SWMM_Engine | engine, |
| double * | buf, | ||
| int | count ) |
Copy maximum recorded absolute flow for a prefix of the link table.
Uses the same raw internal units and object order as swmm_stat_link_max_flow(). No required-size output or short-buffer error is provided; query the object count separately when all rows are needed.
| [in] | engine | Non-null live engine with initialized statistics storage; exclusive access is required. No lifecycle guard is imposed, so a running read reflects current accumulation. |
| [out] | buf | Non-null caller-owned array of at least count doubles. Copies min(count,object count) values in ft3/s; entries beyond that prefix are unchanged. |
| [in] | count | Positive buffer capacity/requested prefix length in elements, not bytes. May be smaller than the full object count. |
| SWMM_ENGINE_API int swmm_stat_link_max_velocity | ( | SWMM_Engine | engine, |
| int | idx, | ||
| double * | val ) |
Read maximum recorded absolute flow velocity for one link.
Does not advance/finalize the simulation or recompute the statistic. Distinct node/link object APIs may apply display-unit conversions; these swmm_stat_* accessors return the raw stored values.
| [in] | engine | Non-null live engine with initialized statistics storage; exclusive access is required. No lifecycle guard is imposed, so a running read reflects current accumulation. |
| [in] | idx | Zero-based link index in the current model. |
| [out] | val | Optional destination in ft/s. Values are copied from internal statistics without project display-unit conversion. |
| SWMM_ENGINE_API int swmm_stat_link_max_velocity_bulk | ( | SWMM_Engine | engine, |
| double * | buf, | ||
| int | count ) |
Copy maximum recorded absolute flow velocity for a prefix of the link table.
Uses the same raw internal units and object order as swmm_stat_link_max_velocity(). No required-size output or short-buffer error is provided; query the object count separately when all rows are needed.
| [in] | engine | Non-null live engine with initialized statistics storage; exclusive access is required. No lifecycle guard is imposed, so a running read reflects current accumulation. |
| [out] | buf | Non-null caller-owned array of at least count doubles. Copies min(count,object count) values in ft/s; entries beyond that prefix are unchanged. |
| [in] | count | Positive buffer capacity/requested prefix length in elements, not bytes. May be smaller than the full object count. |
| SWMM_ENGINE_API int swmm_stat_link_surcharge_time | ( | SWMM_Engine | engine, |
| int | idx, | ||
| double * | val ) |
Read cumulative surcharged duration for one link.
Does not advance/finalize the simulation or recompute the statistic. Distinct node/link object APIs may apply display-unit conversions; these swmm_stat_* accessors return the raw stored values.
| [in] | engine | Non-null live engine with initialized statistics storage; exclusive access is required. No lifecycle guard is imposed, so a running read reflects current accumulation. |
| [in] | idx | Zero-based link index in the current model. |
| [out] | val | Optional destination in s. Values are copied from internal statistics without project display-unit conversion. |
| SWMM_ENGINE_API int swmm_stat_link_surcharge_time_bulk | ( | SWMM_Engine | engine, |
| double * | buf, | ||
| int | count ) |
Copy cumulative surcharged duration for a prefix of the link table.
Uses the same raw internal units and object order as swmm_stat_link_surcharge_time(). No required-size output or short-buffer error is provided; query the object count separately when all rows are needed.
| [in] | engine | Non-null live engine with initialized statistics storage; exclusive access is required. No lifecycle guard is imposed, so a running read reflects current accumulation. |
| [out] | buf | Non-null caller-owned array of at least count doubles. Copies min(count,object count) values in s; entries beyond that prefix are unchanged. |
| [in] | count | Positive buffer capacity/requested prefix length in elements, not bytes. May be smaller than the full object count. |
| SWMM_ENGINE_API int swmm_stat_link_vol_flow | ( | SWMM_Engine | engine, |
| int | idx, | ||
| double * | val ) |
Read cumulative conveyed water volume for one link.
Does not advance/finalize the simulation or recompute the statistic. Distinct node/link object APIs may apply display-unit conversions; these swmm_stat_* accessors return the raw stored values.
| [in] | engine | Non-null live engine with initialized statistics storage; exclusive access is required. No lifecycle guard is imposed, so a running read reflects current accumulation. |
| [in] | idx | Zero-based link index in the current model. |
| [out] | val | Optional destination in ft3. Values are copied from internal statistics without project display-unit conversion. |
| SWMM_ENGINE_API int swmm_stat_link_vol_flow_bulk | ( | SWMM_Engine | engine, |
| double * | buf, | ||
| int | count ) |
Copy cumulative conveyed water volume for a prefix of the link table.
Uses the same raw internal units and object order as swmm_stat_link_vol_flow(). No required-size output or short-buffer error is provided; query the object count separately when all rows are needed.
| [in] | engine | Non-null live engine with initialized statistics storage; exclusive access is required. No lifecycle guard is imposed, so a running read reflects current accumulation. |
| [out] | buf | Non-null caller-owned array of at least count doubles. Copies min(count,object count) values in ft3; entries beyond that prefix are unchanged. |
| [in] | count | Positive buffer capacity/requested prefix length in elements, not bytes. May be smaller than the full object count. |
| SWMM_ENGINE_API int swmm_stat_node_max_depth | ( | SWMM_Engine | engine, |
| int | idx, | ||
| double * | val ) |
Read maximum recorded water depth for one node.
Does not advance/finalize the simulation or recompute the statistic. Distinct node/link object APIs may apply display-unit conversions; these swmm_stat_* accessors return the raw stored values.
| [in] | engine | Non-null live engine with initialized statistics storage; exclusive access is required. No lifecycle guard is imposed, so a running read reflects current accumulation. |
| [in] | idx | Zero-based node index in the current model. |
| [out] | val | Optional destination in ft. Values are copied from internal statistics without project display-unit conversion. |
| SWMM_ENGINE_API int swmm_stat_node_max_depth_bulk | ( | SWMM_Engine | engine, |
| double * | buf, | ||
| int | count ) |
Copy maximum recorded water depth for a prefix of the node table.
Uses the same raw internal units and object order as swmm_stat_node_max_depth(). No required-size output or short-buffer error is provided; query the object count separately when all rows are needed.
| [in] | engine | Non-null live engine with initialized statistics storage; exclusive access is required. No lifecycle guard is imposed, so a running read reflects current accumulation. |
| [out] | buf | Non-null caller-owned array of at least count doubles. Copies min(count,object count) values in ft; entries beyond that prefix are unchanged. |
| [in] | count | Positive buffer capacity/requested prefix length in elements, not bytes. May be smaller than the full object count. |
| SWMM_ENGINE_API int swmm_stat_node_max_overflow | ( | SWMM_Engine | engine, |
| int | idx, | ||
| double * | val ) |
Read maximum recorded overflow discharge for one node.
Does not advance/finalize the simulation or recompute the statistic. Distinct node/link object APIs may apply display-unit conversions; these swmm_stat_* accessors return the raw stored values.
| [in] | engine | Non-null live engine with initialized statistics storage; exclusive access is required. No lifecycle guard is imposed, so a running read reflects current accumulation. |
| [in] | idx | Zero-based node index in the current model. |
| [out] | val | Optional destination in ft3/s. Values are copied from internal statistics without project display-unit conversion. |
| SWMM_ENGINE_API int swmm_stat_node_max_overflow_bulk | ( | SWMM_Engine | engine, |
| double * | buf, | ||
| int | count ) |
Copy maximum recorded overflow discharge for a prefix of the node table.
Uses the same raw internal units and object order as swmm_stat_node_max_overflow(). No required-size output or short-buffer error is provided; query the object count separately when all rows are needed.
| [in] | engine | Non-null live engine with initialized statistics storage; exclusive access is required. No lifecycle guard is imposed, so a running read reflects current accumulation. |
| [out] | buf | Non-null caller-owned array of at least count doubles. Copies min(count,object count) values in ft3/s; entries beyond that prefix are unchanged. |
| [in] | count | Positive buffer capacity/requested prefix length in elements, not bytes. May be smaller than the full object count. |
| SWMM_ENGINE_API int swmm_stat_node_time_flooded | ( | SWMM_Engine | engine, |
| int | idx, | ||
| double * | val ) |
Read cumulative flooding duration for one node.
Does not advance/finalize the simulation or recompute the statistic. Distinct node/link object APIs may apply display-unit conversions; these swmm_stat_* accessors return the raw stored values.
| [in] | engine | Non-null live engine with initialized statistics storage; exclusive access is required. No lifecycle guard is imposed, so a running read reflects current accumulation. |
| [in] | idx | Zero-based node index in the current model. |
| [out] | val | Optional destination in s. Values are copied from internal statistics without project display-unit conversion. |
| SWMM_ENGINE_API int swmm_stat_node_time_flooded_bulk | ( | SWMM_Engine | engine, |
| double * | buf, | ||
| int | count ) |
Copy cumulative flooding duration for a prefix of the node table.
Uses the same raw internal units and object order as swmm_stat_node_time_flooded(). No required-size output or short-buffer error is provided; query the object count separately when all rows are needed.
| [in] | engine | Non-null live engine with initialized statistics storage; exclusive access is required. No lifecycle guard is imposed, so a running read reflects current accumulation. |
| [out] | buf | Non-null caller-owned array of at least count doubles. Copies min(count,object count) values in s; entries beyond that prefix are unchanged. |
| [in] | count | Positive buffer capacity/requested prefix length in elements, not bytes. May be smaller than the full object count. |
| SWMM_ENGINE_API int swmm_stat_node_vol_flooded | ( | SWMM_Engine | engine, |
| int | idx, | ||
| double * | val ) |
Read cumulative flooded water volume for one node.
Does not advance/finalize the simulation or recompute the statistic. Distinct node/link object APIs may apply display-unit conversions; these swmm_stat_* accessors return the raw stored values.
| [in] | engine | Non-null live engine with initialized statistics storage; exclusive access is required. No lifecycle guard is imposed, so a running read reflects current accumulation. |
| [in] | idx | Zero-based node index in the current model. |
| [out] | val | Optional destination in ft3. Values are copied from internal statistics without project display-unit conversion. |
| SWMM_ENGINE_API int swmm_stat_node_vol_flooded_bulk | ( | SWMM_Engine | engine, |
| double * | buf, | ||
| int | count ) |
Copy cumulative flooded water volume for a prefix of the node table.
Uses the same raw internal units and object order as swmm_stat_node_vol_flooded(). No required-size output or short-buffer error is provided; query the object count separately when all rows are needed.
| [in] | engine | Non-null live engine with initialized statistics storage; exclusive access is required. No lifecycle guard is imposed, so a running read reflects current accumulation. |
| [out] | buf | Non-null caller-owned array of at least count doubles. Copies min(count,object count) values in ft3; entries beyond that prefix are unchanged. |
| [in] | count | Positive buffer capacity/requested prefix length in elements, not bytes. May be smaller than the full object count. |
| SWMM_ENGINE_API int swmm_stat_subcatch_max_runoff | ( | SWMM_Engine | engine, |
| int | idx, | ||
| double * | val ) |
Read maximum recorded runoff discharge for one subcatchment.
Does not advance/finalize the simulation or recompute the statistic. Distinct node/link object APIs may apply display-unit conversions; these swmm_stat_* accessors return the raw stored values.
| [in] | engine | Non-null live engine with initialized statistics storage; exclusive access is required. No lifecycle guard is imposed, so a running read reflects current accumulation. |
| [in] | idx | Zero-based subcatchment index in the current model. |
| [out] | val | Optional destination in ft3/s. Values are copied from internal statistics without project display-unit conversion. |
| SWMM_ENGINE_API int swmm_stat_subcatch_max_runoff_bulk | ( | SWMM_Engine | engine, |
| double * | buf, | ||
| int | count ) |
Copy maximum recorded runoff discharge for a prefix of the subcatchment table.
Uses the same raw internal units and object order as swmm_stat_subcatch_max_runoff(). No required-size output or short-buffer error is provided; query the object count separately when all rows are needed.
| [in] | engine | Non-null live engine with initialized statistics storage; exclusive access is required. No lifecycle guard is imposed, so a running read reflects current accumulation. |
| [out] | buf | Non-null caller-owned array of at least count doubles. Copies min(count,object count) values in ft3/s; entries beyond that prefix are unchanged. |
| [in] | count | Positive buffer capacity/requested prefix length in elements, not bytes. May be smaller than the full object count. |
| SWMM_ENGINE_API int swmm_stat_subcatch_precip | ( | SWMM_Engine | engine, |
| int | idx, | ||
| double * | val ) |
Read cumulative precipitation volume for one subcatchment.
Does not advance/finalize the simulation or recompute the statistic. Distinct node/link object APIs may apply display-unit conversions; these swmm_stat_* accessors return the raw stored values.
| [in] | engine | Non-null live engine with initialized statistics storage; exclusive access is required. No lifecycle guard is imposed, so a running read reflects current accumulation. |
| [in] | idx | Zero-based subcatchment index in the current model. |
| [out] | val | Optional destination in ft3. Values are copied from internal statistics without project display-unit conversion. |
| SWMM_ENGINE_API int swmm_stat_subcatch_runoff_vol | ( | SWMM_Engine | engine, |
| int | idx, | ||
| double * | val ) |
Read cumulative runoff volume for one subcatchment.
Does not advance/finalize the simulation or recompute the statistic. Distinct node/link object APIs may apply display-unit conversions; these swmm_stat_* accessors return the raw stored values.
| [in] | engine | Non-null live engine with initialized statistics storage; exclusive access is required. No lifecycle guard is imposed, so a running read reflects current accumulation. |
| [in] | idx | Zero-based subcatchment index in the current model. |
| [out] | val | Optional destination in ft3. Values are copied from internal statistics without project display-unit conversion. |
| SWMM_ENGINE_API int swmm_stat_subcatch_runoff_vol_bulk | ( | SWMM_Engine | engine, |
| double * | buf, | ||
| int | count ) |
Copy cumulative runoff volume for a prefix of the subcatchment table.
Uses the same raw internal units and object order as swmm_stat_subcatch_runoff_vol(). No required-size output or short-buffer error is provided; query the object count separately when all rows are needed.
| [in] | engine | Non-null live engine with initialized statistics storage; exclusive access is required. No lifecycle guard is imposed, so a running read reflects current accumulation. |
| [out] | buf | Non-null caller-owned array of at least count doubles. Copies min(count,object count) values in ft3; entries beyond that prefix are unchanged. |
| [in] | count | Positive buffer capacity/requested prefix length in elements, not bytes. May be smaller than the full object count. |