OpenSWMM Engine  6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
Loading...
Searching...
No Matches
openswmm::OutputReader Class Reference

Reads SWMM 5.x binary .out files produced by DefaultOutputPlugin. More...

#include <OutputReader.hpp>

Collaboration diagram for openswmm::OutputReader:

Public Member Functions

 OutputReader ()=default
 
 ~OutputReader ()
 
 OutputReader (const OutputReader &)=delete
 
OutputReaderoperator= (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.
 

Detailed Description

Reads SWMM 5.x binary .out files produced by DefaultOutputPlugin.

Constructor & Destructor Documentation

◆ OutputReader() [1/2]

openswmm::OutputReader::OutputReader ( )
default

◆ ~OutputReader()

openswmm::OutputReader::~OutputReader ( )
Here is the call graph for this function:

◆ OutputReader() [2/2]

openswmm::OutputReader::OutputReader ( const OutputReader )
delete

Member Function Documentation

◆ close()

void openswmm::OutputReader::close ( )

Close the file and release resources.

Here is the caller graph for this function:

◆ error_code()

int openswmm::OutputReader::error_code ( ) const
inlinenoexcept
Here is the caller graph for this function:

◆ flow_units()

int openswmm::OutputReader::flow_units ( ) const
inlinenoexcept
Here is the caller graph for this function:

◆ get_link_attribute()

bool openswmm::OutputReader::get_link_attribute ( int  obj_idx,
int  period,
float *  values,
int *  count 
) const

All variables for one link at one period.

Here is the caller graph for this function:

◆ get_link_result()

bool openswmm::OutputReader::get_link_result ( int  period,
int  var,
float *  values 
) const

Read one link variable for all links at a period.

Here is the caller graph for this function:

◆ get_link_series()

bool openswmm::OutputReader::get_link_series ( int  obj_idx,
int  var,
int  start_period,
int  end_period,
float *  values 
) const
Here is the caller graph for this function:

◆ get_node_attribute()

bool openswmm::OutputReader::get_node_attribute ( int  obj_idx,
int  period,
float *  values,
int *  count 
) const

All variables for one node at one period.

Here is the caller graph for this function:

◆ get_node_result()

bool openswmm::OutputReader::get_node_result ( int  period,
int  var,
float *  values 
) const

Read one node variable for all nodes at a period.

Here is the caller graph for this function:

◆ get_node_series()

bool openswmm::OutputReader::get_node_series ( int  obj_idx,
int  var,
int  start_period,
int  end_period,
float *  values 
) const
Here is the caller graph for this function:

◆ get_period_time()

bool openswmm::OutputReader::get_period_time ( int  period,
double *  time 
) const

Get the simulation time for a given period.

Here is the caller graph for this function:

◆ get_subcatch_attribute()

bool openswmm::OutputReader::get_subcatch_attribute ( int  obj_idx,
int  period,
float *  values,
int *  count 
) const

All variables for one subcatchment at one period.

Here is the caller graph for this function:

◆ get_subcatch_result()

bool openswmm::OutputReader::get_subcatch_result ( int  period,
int  var,
float *  values 
) const

Read one subcatch variable for all subcatchments at a period.

Parameters
periodZero-based period index.
varVariable index within the subcatch result block.
valuesCaller-allocated array of subcatch_count floats.
Returns
true on success.
Here is the caller graph for this function:

◆ get_subcatch_series()

bool openswmm::OutputReader::get_subcatch_series ( int  obj_idx,
int  var,
int  start_period,
int  end_period,
float *  values 
) const
Here is the caller graph for this function:

◆ get_system_result()

bool openswmm::OutputReader::get_system_result ( int  period,
int  var,
float *  value 
) const

Read one system variable at a period.

Here is the caller graph for this function:

◆ get_system_series()

bool openswmm::OutputReader::get_system_series ( int  var,
int  start_period,
int  end_period,
float *  values 
) const
Here is the caller graph for this function:

◆ is_open()

bool openswmm::OutputReader::is_open ( ) const
inlinenoexcept

Whether the reader has a file open and valid.

◆ link_count()

int openswmm::OutputReader::link_count ( ) const
inlinenoexcept
Here is the caller graph for this function:

◆ link_id()

const char * openswmm::OutputReader::link_id ( int  index) const
Here is the caller graph for this function:

◆ link_var_count()

int openswmm::OutputReader::link_var_count ( ) const
inlinenoexcept

◆ node_count()

int openswmm::OutputReader::node_count ( ) const
inlinenoexcept
Here is the caller graph for this function:

◆ node_id()

const char * openswmm::OutputReader::node_id ( int  index) const
Here is the caller graph for this function:

◆ node_var_count()

int openswmm::OutputReader::node_var_count ( ) const
inlinenoexcept

◆ open()

bool openswmm::OutputReader::open ( const char *  path)

Open and parse the header/footer of a binary output file.

Parameters
pathFile path to the .out file.
Returns
true on success, false on error (bad magic, I/O failure, etc.).
Here is the call graph for this function:

◆ operator=()

OutputReader & openswmm::OutputReader::operator= ( const OutputReader )
delete

◆ period_count()

int openswmm::OutputReader::period_count ( ) const
inlinenoexcept
Here is the caller graph for this function:

◆ pollut_count()

int openswmm::OutputReader::pollut_count ( ) const
inlinenoexcept
Here is the caller graph for this function:

◆ report_step()

int openswmm::OutputReader::report_step ( ) const
inlinenoexcept
Here is the caller graph for this function:

◆ start_date()

double openswmm::OutputReader::start_date ( ) const
inlinenoexcept
Here is the caller graph for this function:

◆ subcatch_count()

int openswmm::OutputReader::subcatch_count ( ) const
inlinenoexcept
Here is the caller graph for this function:

◆ subcatch_id()

const char * openswmm::OutputReader::subcatch_id ( int  index) const
Here is the caller graph for this function:

◆ subcatch_var_count()

int openswmm::OutputReader::subcatch_var_count ( ) const
inlinenoexcept

◆ system_var_count()

int openswmm::OutputReader::system_var_count ( ) const
inlinenoexcept

◆ version()

int openswmm::OutputReader::version ( ) const
inlinenoexcept
Here is the caller graph for this function:

The documentation for this class was generated from the following files: