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

RDII interface file manager (USE = read/override, SAVE = export). More...

#include <RdiiInterface.hpp>

Collaboration diagram for openswmm::rdii_iface::RdiiInterfaceFile:

Public Member Functions

 ~RdiiInterfaceFile ()
 
int openForRead (SimulationContext &ctx, const std::string &path)
 Open an existing RDII file for reading (USE mode).
 
int openForWrite (const std::string &path, int rdii_step, const std::vector< int > &node_idx)
 Open an RDII file for writing (SAVE mode, binary format).
 
void applyFlows (SimulationContext &ctx, double current_date)
 USE mode: add the file's RDII flows for current_date to ctx.nodes.rdii_inflow (step-aligned, legacy semantics).
 
void saveFlows (double current_date, const std::vector< double > &node_flows)
 SAVE mode: write one record (date + per-node flows in cfs).
 
void close ()
 
bool isOpen () const
 
bool isWriting () const
 
int step () const
 

Detailed Description

RDII interface file manager (USE = read/override, SAVE = export).

Constructor & Destructor Documentation

◆ ~RdiiInterfaceFile()

openswmm::rdii_iface::RdiiInterfaceFile::~RdiiInterfaceFile ( )
inline
Here is the call graph for this function:

Member Function Documentation

◆ applyFlows()

void openswmm::rdii_iface::RdiiInterfaceFile::applyFlows ( SimulationContext & ctx,
double current_date )

USE mode: add the file's RDII flows for current_date to ctx.nodes.rdii_inflow (step-aligned, legacy semantics).

Here is the call graph for this function:

◆ close()

void openswmm::rdii_iface::RdiiInterfaceFile::close ( )
Here is the caller graph for this function:

◆ isOpen()

bool openswmm::rdii_iface::RdiiInterfaceFile::isOpen ( ) const
inline

◆ isWriting()

bool openswmm::rdii_iface::RdiiInterfaceFile::isWriting ( ) const
inline

◆ openForRead()

int openswmm::rdii_iface::RdiiInterfaceFile::openForRead ( SimulationContext & ctx,
const std::string & path )

Open an existing RDII file for reading (USE mode).

Auto-detects binary vs text format and parses the header.

Returns
0 on success, -1 cannot open, -2 invalid format / unresolvable node.
Here is the call graph for this function:

◆ openForWrite()

int openswmm::rdii_iface::RdiiInterfaceFile::openForWrite ( const std::string & path,
int rdii_step,
const std::vector< int > & node_idx )

Open an RDII file for writing (SAVE mode, binary format).

Parameters
rdii_stepHeader time step in seconds (wet weather step).
node_idxNode indices carrying RDII (RDIISolver::rdiiNodeList).
Returns
0 on success, -1 cannot open, -2 nothing to save (empty list).
Here is the call graph for this function:

◆ saveFlows()

void openswmm::rdii_iface::RdiiInterfaceFile::saveFlows ( double current_date,
const std::vector< double > & node_flows )

SAVE mode: write one record (date + per-node flows in cfs).

Parameters
node_flowsPer-node RDII flow array sized n_nodes (RDIISolver::nodeFlows()).

◆ step()

int openswmm::rdii_iface::RdiiInterfaceFile::step ( ) const
inline
Here is the caller graph for this function:

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