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

Interface for output-writing plugins. More...

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

Go to the source code of this file.

Classes

class  openswmm::IOutputPlugin
 Interface for output-writing plugins. More...
 

Namespaces

namespace  openswmm
 

Detailed Description

Interface for output-writing plugins.

Implement this interface to write SWMM simulation results to custom formats (HDF5, NetCDF, CSV, database, etc.).

Threading model: IOutputPlugin::update() is called from the IO thread, not the main simulation thread. update() receives a const SimulationSnapshot& — a read-only deep copy of the simulation arrays at the output time, plus borrowed immutable model metadata. Do NOT access the live SimulationContext from within update().

All other lifecycle methods (initialize, validate, prepare, finalize) are called from the main thread before/after the simulation loop.

Intended lifecycle order (implementations maintain their state)
initialize() → validate() → prepare()
→ update() [N times, IO thread]
→ finalize()
Note
Return codes: 0 = success; non-zero = error. PluginFactory aggregates return codes but does not set plugin states; implementations own transitions.
Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License
Apache-2.0