![]() |
OpenSWMM Engine
6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
|
Reads SWMM 5.x binary .out files produced by DefaultOutputPlugin. More...
#include <OutputReader.hpp>
Public Member Functions | |
| OutputReader ()=default | |
| ~OutputReader () | |
| OutputReader (const OutputReader &)=delete | |
| OutputReader & | operator= (const OutputReader &)=delete |
| bool | open (const char *path) |
| Open and parse the header/footer of a binary output file. | |
| void | close () |
| Close the file and release resources. | |
| bool | is_open () const noexcept |
| Whether the reader has a file open and valid. | |
| int | version () const noexcept |
| int | flow_units () const noexcept |
| int | subcatch_count () const noexcept |
| int | node_count () const noexcept |
| int | link_count () const noexcept |
| int | pollut_count () const noexcept |
| int | period_count () const noexcept |
| double | start_date () const noexcept |
| int | report_step () const noexcept |
| int | error_code () const noexcept |
| int | subcatch_var_count () const noexcept |
| int | node_var_count () const noexcept |
| int | link_var_count () const noexcept |
| int | system_var_count () const noexcept |
| const char * | subcatch_id (int index) const |
| const char * | node_id (int index) const |
| const char * | link_id (int index) const |
| bool | get_subcatch_result (int period, int var, float *values) const |
| Read one subcatch variable for all subcatchments at a period. | |
| bool | get_node_result (int period, int var, float *values) const |
| Read one node variable for all nodes at a period. | |
| bool | get_link_result (int period, int var, float *values) const |
| Read one link variable for all links at a period. | |
| bool | get_system_result (int period, int var, float *value) const |
| Read one system variable at a period. | |
| bool | get_subcatch_series (int obj_idx, int var, int start_period, int end_period, float *values) const |
| bool | get_node_series (int obj_idx, int var, int start_period, int end_period, float *values) const |
| bool | get_link_series (int obj_idx, int var, int start_period, int end_period, float *values) const |
| bool | get_system_series (int var, int start_period, int end_period, float *values) const |
| bool | get_subcatch_attribute (int obj_idx, int period, float *values, int *count) const |
| All variables for one subcatchment at one period. | |
| bool | get_node_attribute (int obj_idx, int period, float *values, int *count) const |
| All variables for one node at one period. | |
| bool | get_link_attribute (int obj_idx, int period, float *values, int *count) const |
| All variables for one link at one period. | |
| bool | get_period_time (int period, double *time) const |
| Get the simulation time for a given period. | |
Reads SWMM 5.x binary .out files produced by DefaultOutputPlugin.
|
default |
| openswmm::OutputReader::~OutputReader | ( | ) |
|
delete |
| void openswmm::OutputReader::close | ( | ) |
Close the file and release resources.
|
inlinenoexcept |
|
inlinenoexcept |
| bool openswmm::OutputReader::get_link_attribute | ( | int | obj_idx, |
| int | period, | ||
| float * | values, | ||
| int * | count | ||
| ) | const |
All variables for one link at one period.
| bool openswmm::OutputReader::get_link_result | ( | int | period, |
| int | var, | ||
| float * | values | ||
| ) | const |
Read one link variable for all links at a period.
| bool openswmm::OutputReader::get_link_series | ( | int | obj_idx, |
| int | var, | ||
| int | start_period, | ||
| int | end_period, | ||
| float * | values | ||
| ) | const |
| bool openswmm::OutputReader::get_node_attribute | ( | int | obj_idx, |
| int | period, | ||
| float * | values, | ||
| int * | count | ||
| ) | const |
All variables for one node at one period.
| bool openswmm::OutputReader::get_node_result | ( | int | period, |
| int | var, | ||
| float * | values | ||
| ) | const |
Read one node variable for all nodes at a period.
| bool openswmm::OutputReader::get_node_series | ( | int | obj_idx, |
| int | var, | ||
| int | start_period, | ||
| int | end_period, | ||
| float * | values | ||
| ) | const |
| bool openswmm::OutputReader::get_period_time | ( | int | period, |
| double * | time | ||
| ) | const |
Get the simulation time for a given period.
| bool openswmm::OutputReader::get_subcatch_attribute | ( | int | obj_idx, |
| int | period, | ||
| float * | values, | ||
| int * | count | ||
| ) | const |
All variables for one subcatchment at one period.
| bool openswmm::OutputReader::get_subcatch_result | ( | int | period, |
| int | var, | ||
| float * | values | ||
| ) | const |
Read one subcatch variable for all subcatchments at a period.
| period | Zero-based period index. |
| var | Variable index within the subcatch result block. |
| values | Caller-allocated array of subcatch_count floats. |
| bool openswmm::OutputReader::get_subcatch_series | ( | int | obj_idx, |
| int | var, | ||
| int | start_period, | ||
| int | end_period, | ||
| float * | values | ||
| ) | const |
| bool openswmm::OutputReader::get_system_result | ( | int | period, |
| int | var, | ||
| float * | value | ||
| ) | const |
Read one system variable at a period.
| bool openswmm::OutputReader::get_system_series | ( | int | var, |
| int | start_period, | ||
| int | end_period, | ||
| float * | values | ||
| ) | const |
|
inlinenoexcept |
Whether the reader has a file open and valid.
|
inlinenoexcept |
| const char * openswmm::OutputReader::link_id | ( | int | index | ) | const |
|
inlinenoexcept |
|
inlinenoexcept |
| const char * openswmm::OutputReader::node_id | ( | int | index | ) | const |
|
inlinenoexcept |
| bool openswmm::OutputReader::open | ( | const char * | path | ) |
Open and parse the header/footer of a binary output file.
| path | File path to the .out file. |
|
delete |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
| const char * openswmm::OutputReader::subcatch_id | ( | int | index | ) | const |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |