OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
SimulationSnapshot.hpp File Reference

Read-only snapshot of simulation state passed to plugins. More...

#include "SnowResults.hpp"
#include <vector>
#include <string>
#include <cstdint>
Include dependency graph for SimulationSnapshot.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  openswmm::NodeSnapshot
 Snapshot of node state at an output time step. More...
 
struct  openswmm::LinkSnapshot
 Snapshot of link state at an output time step. More...
 
struct  openswmm::SubcatchSnapshot
 Snapshot of subcatchment state at an output time step. More...
 
struct  openswmm::GageSnapshot
 Snapshot of rain gage state at an output time step. More...
 
struct  openswmm::SimulationSnapshot
 Complete simulation state snapshot at one output time step. More...
 

Namespaces

namespace  openswmm
 

Detailed Description

Read-only snapshot of simulation state passed to plugins.

Numeric vectors own copied output-boundary data. ID, unit and species pointers borrow host metadata: they can be null and must remain alive and immutable until queued callbacks finish. Copying this struct copies those pointers rather than their targets.

Plugins read the const snapshot while the simulation advances. They must use snapshot data only, qualify optional arrays/metadata and copy anything retained beyond update; no mutable live-context access.

Note
The snapshot is allocated on the heap and managed by the IOThread's ring buffer. Do NOT store pointers to snapshot data beyond the scope of IOutputPlugin::update() or IReportPlugin::update().
See also
IOThread.hpp (in src/engine/output/)
IOutputPlugin.hpp
Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License
Apache-2.0