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

Namespaces

namespace  climate
 
namespace  constants
 
namespace  controls
 
namespace  culvert
 
namespace  datetime
 
namespace  divider
 
namespace  dynwave
 
namespace  edit
 
namespace  exfil
 
namespace  fastmath
 
namespace  findroot
 
namespace  forcemain
 
namespace  gage
 
namespace  gpkg
 
namespace  groundwater
 
namespace  hydraulics
 
namespace  hydstruct
 
namespace  iface
 
namespace  infil
 
namespace  inflow
 
namespace  inlet
 
namespace  inp_writer
 
namespace  input
 
namespace  kinwave
 
namespace  landuse
 
namespace  lid
 
 
namespace  mathexpr
 
namespace  node
 
namespace  ode
 
namespace  outfall
 
namespace  quality
 
namespace  rdii
 
namespace  roadway
 
namespace  runoff
 
namespace  runoff_iface
 
namespace  simd
 
namespace  snow
 
namespace  street
 
namespace  toposort
 
namespace  transect
 
namespace  treatment
 
namespace  twoD
 
namespace  ucf
 
namespace  xsect
 
namespace  xsect_batch
 
namespace  xsect_tables
 

Classes

struct  AquiferStore
 SoA storage for aquifer parameter sets. More...
 
struct  BuildupData
 
class  BuiltinDefaultInputPluginInfo
 
class  BuiltinDefaultOutputPluginInfo
 
class  BuiltinDefaultReportPluginInfo
 
class  BuiltinDefaultStateIOPluginInfo
 
struct  ControlRuleStore
 
struct  CurveNumState
 
class  DefaultInputPlugin
 Default input plugin that reads/writes SWMM .inp files. More...
 
class  DefaultOutputPlugin
 Default output plugin: writes SWMM 5.x compatible binary .out file. More...
 
class  DefaultReportPlugin
 Default report plugin: writes SWMM 5.x compatible .rpt report file. More...
 
class  DefaultStateIOPlugin
 Default state-IO plugin: OpenSWMM binary + legacy SWMM5 hot-start. More...
 
struct  DiscoveredFilter
 A FileFilter paired with the plugin id and version that emitted it. More...
 
struct  DiscoveredPlugin
 A plugin grouped by id with all the roles and filters it advertises. More...
 
struct  DwfData
 
struct  ExtInflowData
 
struct  FileFilter
 A file-format filter advertised by a plugin. More...
 
struct  FilesSpec
 
struct  ForcingData
 
struct  GageData
 Structure-of-Arrays storage for all rain gages. More...
 
struct  GageSnapshot
 Snapshot of rain gage state at an output time step. More...
 
struct  GreenAmptState
 
struct  HortonState
 
struct  HotStartFile
 In-memory hot start file data. More...
 
struct  HotStartHeader
 In-memory representation of the OPENSWMM_HS_V1 header. More...
 
struct  HotStartLinkRecord
 Link hydraulic state at hot-start save time. More...
 
class  HotStartManager
 Static utility class for hot start file operations. More...
 
struct  HotStartNodeRecord
 Node hydraulic state at hot-start save time. More...
 
struct  HotstartSaveEntry
 Configuration parsed from the [FILES] section. More...
 
struct  HotStartSubcatchRecord
 Subcatchment state at hot-start save time. More...
 
class  ICouplingPoint
 Abstract coupling point between a 1D SWMM object and a 2D mesh cell. More...
 
class  IInputPlugin
 Interface for input file reader/writer plugins. More...
 
struct  InletStore
 
struct  InletUsageStore
 
class  IOThread
 Producer-consumer IO thread for writing simulation snapshots. More...
 
class  IOutputPlugin
 Interface for output-writing plugins. More...
 
class  IPluginComponentInfo
 Describes a plugin component: metadata, capabilities, and factory methods. More...
 
class  IReportPlugin
 Interface for report-writing plugins. More...
 
class  IStateIOPlugin
 Interface for state / hot-start IO plugins. More...
 
struct  LanduseData
 
struct  LidControlStore
 SoA storage for LID control type definitions. More...
 
struct  LidUsageStore
 SoA storage for LID usage assignments to subcatchments. More...
 
struct  LinkData
 Structure-of-Arrays storage for all links. More...
 
struct  LinkSnapshot
 Snapshot of link state at an output time step. More...
 
class  NameIndex
 Bidirectional name↔index registry for SWMM objects. More...
 
struct  NodeData
 Structure-of-Arrays storage for all nodes. More...
 
struct  NodeSnapshot
 Snapshot of node state at an output time step. More...
 
class  OutputReader
 Reads SWMM 5.x binary .out files produced by DefaultOutputPlugin. More...
 
struct  PatternData
 
class  PluginFactory
 Manages plugin discovery, loading, and lifecycle for one engine instance. More...
 
struct  PluginSpec
 One plugin entry from the [PLUGINS] section. More...
 
struct  PollutantData
 Static properties for each pollutant species. More...
 
struct  RDIIAssignData
 
struct  RDIIDecayData
 
struct  RDIIDecayEntry
 
struct  RegistrationInfo
 Registration information for plugin activation. More...
 
class  Router
 Top-level routing orchestrator. More...
 
struct  ShapeGroup
 SoA parameter block for all links of one cross-section shape. More...
 
struct  SimulationContext
 Central, reentrant simulation context. More...
 
struct  SimulationOptions
 All SWMM simulation options parsed from [OPTIONS] section. More...
 
struct  SimulationSnapshot
 Complete simulation state snapshot at one output time step. More...
 
struct  SnowpackStore
 SoA storage for snowpack parameter sets. More...
 
struct  SpatialFrame
 Spatial frame containing CRS and georeferenced coordinates. More...
 
struct  StateAccessors
 Solver-neutral hooks for reading and writing solver-internal state (infiltration, groundwater) at hot-start save/load time. More...
 
struct  StreetStore
 
struct  SubcatchData
 Structure-of-Arrays storage for all subcatchments. More...
 
struct  SubcatchSnapshot
 Snapshot of subcatchment state at an output time step. More...
 
struct  Table
 
struct  TableBlock
 A single time series or rating curve. More...
 
struct  TableCursor
 Bidirectional cursor tracking the last accessed index in a Table. More...
 
struct  TableData
 SoA collection of all time series and curves in the model. More...
 
struct  TableValidation
 
struct  TransectStore
 
struct  TreatmentData
 
struct  UnitHydData
 
struct  UnitHydEntry
 
struct  UserFlagAssignment
 A (object_type, object_name, flag_name) → value assignment. More...
 
struct  UserFlagDef
 Schema entry for a single user-defined flag. More...
 
class  UserFlags
 Stores the full user-flags data: schema definitions + per-object values. More...
 
struct  WashoffData
 
struct  WriteTask
 One item in the IOThread write queue. More...
 
class  XSectGroups
 Shape-grouped cross-section manager for batch computation. More...
 
struct  XSectParams
 

Typedefs

using UserFlagValue = std::variant< bool, int, double, std::string >
 A concrete flag value assigned to a specific object.
 
using PluginInfoFactory = IPluginComponentInfo *(*)()
 Typedef for the C factory function that plugin libraries must export.
 

Enumerations

enum  ErrorCode : int {
  ERR_NONE = 0 ,
  ERR_MEMORY = 101 ,
  ERR_KINWAVE = 103 ,
  ERR_ODE_SOLVER = 105 ,
  ERR_TIMESTEP = 107 ,
  ERR_SUBCATCH_OUTLET = 108 ,
  ERR_AQUIFER_PARAMS = 109 ,
  ERR_GROUND_ELEV = 110 ,
  ERR_LENGTH = 111 ,
  ERR_ELEV_DROP = 112 ,
  ERR_ROUGHNESS = 113 ,
  ERR_BARRELS = 114 ,
  ERR_SLOPE = 115 ,
  ERR_NO_XSECT = 117 ,
  ERR_XSECT = 119 ,
  ERR_NO_CURVE = 121 ,
  ERR_PUMP_LIMITS = 122 ,
  ERR_LOOP = 131 ,
  ERR_MULTI_OUTLET = 133 ,
  ERR_DUMMY_LINK = 134 ,
  ERR_DIVIDER = 135 ,
  ERR_DIVIDER_LINK = 136 ,
  ERR_WEIR_DIVIDER = 137 ,
  ERR_NODE_DEPTH = 138 ,
  ERR_REGULATOR = 139 ,
  ERR_STORAGE_VOLUME = 140 ,
  ERR_OUTFALL = 141 ,
  ERR_REGULATOR_SHAPE = 143 ,
  ERR_NO_OUTLETS = 145 ,
  ERR_UNITHYD_TIMES = 151 ,
  ERR_UNITHYD_RATIOS = 153 ,
  ERR_RDII_AREA = 155 ,
  ERR_RAIN_FILE_CONFLICT = 156 ,
  ERR_RAIN_GAGE_FORMAT = 157 ,
  ERR_RAIN_GAGE_TSERIES = 158 ,
  ERR_RAIN_GAGE_INTERVAL = 159 ,
  ERR_CYCLIC_TREATMENT = 161 ,
  ERR_CURVE_SEQUENCE = 171 ,
  ERR_TIMESERIES_SEQUENCE = 173 ,
  ERR_SNOWMELT_PARAMS = 181 ,
  ERR_SNOWPACK_PARAMS = 182 ,
  ERR_LID_TYPE = 183 ,
  ERR_LID_LAYER = 184 ,
  ERR_LID_PARAMS = 185 ,
  ERR_LID_AREAS = 187 ,
  ERR_LID_CAPTURE_AREA = 188 ,
  ERR_START_DATE = 191 ,
  ERR_REPORT_DATE = 193 ,
  ERR_REPORT_STEP = 195 ,
  ERR_INPUT = 200 ,
  ERR_INPUT_LINE = 201 ,
  ERR_ITEMS = 203 ,
  ERR_KEYWORD = 205 ,
  ERR_DUP_NAME = 207 ,
  ERR_NAME = 209 ,
  ERR_NUMBER = 211 ,
  ERR_DATETIME = 213 ,
  ERR_CONTROL_RULE = 217 ,
  ERR_TRANSECT_UNKNOWN = 219 ,
  ERR_TRANSECT_SEQUENCE = 221 ,
  ERR_TRANSECT_TOO_FEW = 223 ,
  ERR_TRANSECT_TOO_MANY = 225 ,
  ERR_TRANSECT_MANNING = 227 ,
  ERR_TRANSECT_OVERBANK = 229 ,
  ERR_TRANSECT_NO_DEPTH = 231 ,
  ERR_MATH_EXPR = 233 ,
  ERR_INFILTRATION = 235 ,
  ERR_FILE_NAME = 301 ,
  ERR_INP_FILE = 303 ,
  ERR_RPT_FILE = 305 ,
  ERR_OUT_FILE = 307 ,
  ERR_OUT_SIZE = 308 ,
  ERR_OUT_WRITE = 309 ,
  ERR_OUT_READ = 311 ,
  ERR_RAIN_IFACE_SCRATCH = 313 ,
  ERR_RAIN_IFACE = 315 ,
  ERR_RAIN_FILE_OPEN = 317 ,
  ERR_RAIN_FILE_SEQUENCE = 318 ,
  ERR_RAIN_FILE_FORMAT = 319 ,
  ERR_RAIN_IFACE_FORMAT = 320 ,
  ERR_RAIN_IFACE_GAGE = 321 ,
  ERR_RUNOFF_IFACE = 323 ,
  ERR_RUNOFF_IFACE_COMPAT = 325 ,
  ERR_RUNOFF_IFACE_EOF = 327 ,
  ERR_RUNOFF_IFACE_READ = 329 ,
  ERR_HOTSTART_FILE = 331 ,
  ERR_HOTSTART_COMPAT = 333 ,
  ERR_HOTSTART_READ = 335 ,
  ERR_NO_CLIMATE_FILE = 336 ,
  ERR_CLIMATE_FILE_OPEN = 337 ,
  ERR_CLIMATE_FILE_READ = 338 ,
  ERR_CLIMATE_FILE_EOF = 339 ,
  ERR_RDII_IFACE_SCRATCH = 341 ,
  ERR_RDII_IFACE = 343 ,
  ERR_RDII_IFACE_FORMAT = 345 ,
  ERR_ROUTING_IFACE = 351 ,
  ERR_ROUTING_IFACE_FORMAT = 353 ,
  ERR_ROUTING_IFACE_NAMES = 355 ,
  ERR_ROUTING_IFACE_SAME = 357 ,
  ERR_TABLE_FILE_OPEN = 361 ,
  ERR_TABLE_FILE_READ = 363 ,
  ERR_SYSTEM = 500 ,
  ERR_API_NOT_OPENED = 501 ,
  ERR_API_NOT_STARTED = 502 ,
  ERR_API_NOT_ENDED = 503 ,
  ERR_API_OBJECT_TYPE = 504 ,
  ERR_API_OBJECT_INDEX = 505 ,
  ERR_API_OBJECT_NAME = 506 ,
  ERR_API_PROPERTY_TYPE = 507 ,
  ERR_API_PROPERTY_VALUE = 508 ,
  ERR_API_TIME_PERIOD = 509 ,
  ERR_TIMESERIES_EMPTY = 601 ,
  ERR_TIMESERIES_NAN = 603 ,
  ERR_TABLE_COL_MISMATCH = 605 ,
  ERR_GAGE_TSERIES_NOTFOUND = 607
}
 
enum  CffiErrorCode : int {
  CFFI_OK = 0 ,
  CFFI_ERR_NOMEM = 1 ,
  CFFI_ERR_INPFILE = 2 ,
  CFFI_ERR_RPTFILE = 3 ,
  CFFI_ERR_OUTFILE = 4 ,
  CFFI_ERR_PARSE = 5 ,
  CFFI_ERR_LIFECYCLE = 6 ,
  CFFI_ERR_BADHANDLE = 7 ,
  CFFI_ERR_BADINDEX = 8 ,
  CFFI_ERR_BADPARAM = 9 ,
  CFFI_ERR_PLUGIN = 10 ,
  CFFI_ERR_IO = 11 ,
  CFFI_ERR_HOTSTART = 12 ,
  CFFI_ERR_CRS = 13 ,
  CFFI_ERR_NUMERICAL = 14 ,
  CFFI_ERR_INTERNAL = 99
}
 
enum  CffiWarnCode : int {
  CFFI_WARN_NONE = 0 ,
  CFFI_WARN_HOTSTART_MISSING = 1 ,
  CFFI_WARN_UNKNOWN_SECTION = 2 ,
  CFFI_WARN_UNKNOWN_OPTION = 3 ,
  CFFI_WARN_DEPRECATED_KW = 4 ,
  CFFI_WARN_PLUGIN_INIT = 5 ,
  CFFI_WARN_NUMERICAL = 6 ,
  CFFI_WARN_STABILITY_LIMIT = 7
}
 
enum  WarnCode : int {
  WARN_NONE = 0 ,
  WARN_WET_STEP_REDUCED = 1 ,
  WARN_MAX_DEPTH_INCREASED = 2 ,
  WARN_NEGATIVE_OFFSET = 3 ,
  WARN_MIN_ELEV_DROP = 4 ,
  WARN_MIN_SLOPE = 5 ,
  WARN_DRY_STEP_INCREASED = 6 ,
  WARN_ROUTING_STEP_REDUCED = 7 ,
  WARN_ELEV_DROP_EXCEEDS = 8 ,
  WARN_GAGE_INTERVAL = 9 ,
  WARN_REGULATOR_CREST_LOW = 10 ,
  WARN_CONTROL_RULE_ATTR = 11 ,
  WARN_INLET_REMOVED = 12 ,
  WARN_TIMESERIES_DUPLICATE_X = 101 ,
  WARN_BOUNDARY_OVERLAP = 102
}
 
enum class  FileMode {
  FileMode::NONE ,
  FileMode::SAVE ,
  FileMode::USE
}
 Mode keyword for one [FILES] row — SAVE or USE. More...
 
enum class  EngineState : int32_t {
  EngineState::CREATED = 0 ,
  EngineState::OPENED = 1 ,
  EngineState::INITIALIZED = 2 ,
  EngineState::RUNNING = 3 ,
  EngineState::PAUSED = 4 ,
  EngineState::ENDED = 5 ,
  EngineState::REPORTED = 6 ,
  EngineState::CLOSED = 7 ,
  EngineState::ERROR_STATE = 8 ,
  EngineState::BUILDING = 9
}
 High-level engine lifecycle state. More...
 
enum class  FlowUnits : int {
  CFS = 0 ,
  GPM = 1 ,
  MGD = 2 ,
  CMS = 3 ,
  LPS = 4 ,
  MLD = 5
}
 Flow unit systems. More...
 
enum class  RoutingModel : int {
  STEADY = 0 ,
  KINWAVE = 1 ,
  DYNWAVE = 2
}
 Flow routing methods. More...
 
enum class  InfiltrationModel : int {
  HORTON = 0 ,
  MOD_HORTON = 1 ,
  GREEN_AMPT = 2 ,
  MOD_GREEN_AMPT = 3 ,
  CURVE_NUMBER = 4
}
 Infiltration methods. More...
 
enum class  RunoffModel : int {
  NONE = 0 ,
  NL_POND = 1
}
 Runoff routing methods. More...
 
enum class  NodeContinuity : int {
  EXPLICIT = 0 ,
  SEMI_IMPLICIT = 1
}
 Node continuity formulation for depth update. More...
 
enum class  UserFlagType : int {
  UserFlagType::BOOLEAN = 0 ,
  UserFlagType::INTEGER = 1 ,
  UserFlagType::REAL = 2 ,
  UserFlagType::STRING = 3
}
 Value type for a user flag. More...
 
enum class  ForcingMode : int8_t {
  NONE = 0 ,
  OVERRIDE = 1 ,
  ADD = 2
}
 
enum class  ForcingPersist : int8_t {
  RESET = 0 ,
  PERSIST = 1
}
 
enum class  RainSource : int8_t {
  TIMESERIES = 0 ,
  FILE_RAIN = 1
}
 Precipitation source type for a rain gage. More...
 
enum class  RainFileFormat : int8_t {
  UNKNOWN = -1 ,
  NWS_15 = 0 ,
  NWS_HOURLY = 1 ,
  DSI_3240 = 2 ,
  DSI_3260 = 3 ,
  HLY_PRCP = 4 ,
  STAN_PRCP = 5 ,
  USER_CSV = 6
}
 Rain data format in an external file. More...
 
enum class  LinkType : int8_t {
  CONDUIT = 0 ,
  PUMP = 1 ,
  ORIFICE = 2 ,
  WEIR = 3 ,
  OUTLET = 4
}
 Link type codes. More...
 
enum class  XsectShape : int16_t {
  CIRCULAR = 0 ,
  FILLED_CIRCULAR = 1 ,
  RECT_CLOSED = 2 ,
  RECT_OPEN = 3 ,
  TRAPEZOIDAL = 4 ,
  TRIANGULAR = 5 ,
  PARABOLIC = 6 ,
  POWER = 7 ,
  MODBASKETHANDLE = 8 ,
  EGGSHAPED = 9 ,
  HORSESHOE = 10 ,
  GOTHIC = 11 ,
  CATENARY = 12 ,
  SEMIELLIPTICAL = 13 ,
  BASKETHANDLE = 14 ,
  SEMICIRCULAR = 15 ,
  RECT_TRIANG = 16 ,
  RECT_ROUND = 17 ,
  HORIZ_ELLIPSE = 18 ,
  VERT_ELLIPSE = 19 ,
  ARCH = 20 ,
  IRREGULAR = 21 ,
  CUSTOM = 22 ,
  FORCE_MAIN = 23 ,
  STREET_XSECT = 24 ,
  DUMMY = 25
}
 Conduit cross-section shape code. More...
 
enum class  FlowClass : int8_t {
  DRY = 0 ,
  UP_DRY = 1 ,
  DN_DRY = 2 ,
  SUBCRITICAL = 3 ,
  SUPERCRITICAL = 4 ,
  UP_CRITICAL = 5 ,
  DN_CRITICAL = 6
}
 Link flow state. More...
 
enum class  NodeType : int8_t {
  JUNCTION = 0 ,
  OUTFALL = 1 ,
  DIVIDER = 2 ,
  STORAGE = 3
}
 Node type codes. More...
 
enum class  OutfallType : int8_t {
  FREE = 0 ,
  NORMAL = 1 ,
  FIXED = 2 ,
  TIDAL = 3 ,
  TIMESERIES = 4
}
 Outfall boundary condition type. More...
 
enum class  DividerType : int8_t {
  CUTOFF = 0 ,
  OVERFLOW_DIV = 1 ,
  TABULAR = 2 ,
  WEIR = 3
}
 Flow divider type. More...
 
enum class  MassUnits : int8_t {
  MG_PER_L = 0 ,
  UG_PER_L = 1 ,
  COUNTS_PER_L = 2
}
 Pollutant concentration units. More...
 
enum class  TableType : int {
  TIMESERIES = 0 ,
  CURVE_STORAGE = 1 ,
  CURVE_DIVERSION = 2 ,
  CURVE_RATING = 3 ,
  CURVE_SHAPE = 4 ,
  CURVE_CONTROL = 5 ,
  CURVE_TIDAL = 6 ,
  CURVE_PUMP1 = 7 ,
  CURVE_PUMP2 = 8 ,
  CURVE_PUMP3 = 9 ,
  CURVE_PUMP4 = 10 ,
  CURVE_PUMP5 = 11
}
 Type of data stored in a Table. More...
 
enum class  RouteModel : int {
  STEADY = 0 ,
  KINWAVE = 1 ,
  DYNWAVE = 2
}
 
enum class  XSectShape : int {
  DUMMY = 0 ,
  CIRCULAR = 1 ,
  FILLED_CIRCULAR = 2 ,
  RECT_CLOSED = 3 ,
  RECT_OPEN = 4 ,
  TRAPEZOIDAL = 5 ,
  TRIANGULAR = 6 ,
  PARABOLIC = 7 ,
  POWERFUNC = 8 ,
  RECT_TRIANG = 9 ,
  RECT_ROUND = 10 ,
  MOD_BASKET = 11 ,
  HORIZ_ELLIPSE = 12 ,
  VERT_ELLIPSE = 13 ,
  ARCH = 14 ,
  EGGSHAPED = 15 ,
  HORSESHOE = 16 ,
  GOTHIC = 17 ,
  CATENARY = 18 ,
  SEMIELLIPTICAL = 19 ,
  BASKETHANDLE = 20 ,
  SEMICIRCULAR = 21 ,
  IRREGULAR = 22 ,
  CUSTOM = 23 ,
  FORCE_MAIN = 24 ,
  STREET_XSECT = 25
}
 
enum class  InfilModel : int {
  HORTON = 0 ,
  MOD_HORTON = 1 ,
  GREEN_AMPT = 2 ,
  MOD_GREEN_AMPT = 3 ,
  CURVE_NUM = 4
}
 
enum class  PluginType {
  PluginType::INPUT ,
  PluginType::OUTPUT ,
  PluginType::REPORT ,
  PluginType::STATE_IO
}
 Identifies a plugin capability. More...
 
enum class  PluginRole : int {
  PluginRole::INPUT_READ ,
  PluginRole::OUTPUT_WRITE ,
  PluginRole::REPORT_WRITE ,
  PluginRole::STATE_READ ,
  PluginRole::STATE_WRITE
}
 Identifies the I/O direction and category of a file filter entry. More...
 
enum class  PluginState : std::int32_t {
  PluginState::UNLOADED = 0 ,
  PluginState::LOADED = 1 ,
  PluginState::INITIALIZED = 2 ,
  PluginState::VALIDATED = 3 ,
  PluginState::PREPARED = 4 ,
  PluginState::UPDATING = 5 ,
  PluginState::FINALIZED = 6 ,
  PluginState::CLOSED = 7 ,
  PluginState::ERROR = -1
}
 Plugin lifecycle states. More...
 

Functions

std::from_chars_result from_chars_double (const char *first, const char *last, double &value) noexcept
 Locale-independent parse of a double from a character range.
 
std::string_view error_get_template (int code) noexcept
 Get the description template for an error code.
 
std::string_view warning_get_template (int code) noexcept
 Get the description template for a warning code.
 
std::string format_error (int code, std::string_view name="")
 Format an error message with object name substitution.
 
std::string format_error (int code, std::string_view name, std::string_view detail)
 Format an error message with object name and additional detail.
 
std::string format_warning (int code, std::string_view name="")
 Format a warning message with object name substitution.
 
std::string format_warning (int code, std::string_view name, std::string_view detail)
 Format a warning with additional detail.
 
std::string_view cffi_error_get_template (int code) noexcept
 Get the description for a CFFI error code (SWMM_ErrorCode).
 
std::string_view cffi_warning_get_template (int code) noexcept
 Get the description for a CFFI warning code (SWMM_WarnCode).
 
std::string format_cffi_error (int code, std::string_view name="")
 Format a CFFI error message.
 
std::string format_cffi_warning (int code, std::string_view name="")
 Format a CFFI warning message.
 
bool c_to_internal_node_type (int c_type, NodeType &out_type) noexcept
 
int internal_to_c_node_type (NodeType type) noexcept
 
bool c_to_internal_link_type (int c_type, LinkType &out_type) noexcept
 
int internal_to_c_link_type (LinkType type) noexcept
 
TableValidation validate_table (Table &tbl)
 
bool table_open_file (Table &tbl, std::size_t boundary_rows)
 
std::size_t table_load_cache (Table &tbl, std::size_t start_row)
 
double table_lookup_column (Table &tbl, int col_idx, double x_query)
 
double table_step_column (Table &tbl, int col_idx, double x_query)
 
double table_lookup_cursor (Table &tbl, double x_query) noexcept
 Look up a value in a Table using the bidirectional cursor.
 
double table_tseries_lookup_cursor (Table &tbl, double x_query) noexcept
 Time-series linear interpolation with out-of-range → 0 behaviour.
 
double table_step_cursor (Table &tbl, double x_query) noexcept
 Piecewise-constant (step function) table lookup with cursor.
 
double table_getStorageVolume (Table &tbl, double depth) noexcept
 Compute storage volume by trapezoidal integration of an area-vs-depth curve, matching legacy table_getStorageVolume() in table.c.
 
double table_getStorageDepth (Table &tbl, double volume) noexcept
 Invert a storage area-vs-depth curve to find depth from volume.
 
double table_inverseLookup (const Table &tbl, double y_query) noexcept
 Inverse lookup: given y, find corresponding x by linear interpolation.
 
double table_lookupEx (const Table &tbl, double x_query) noexcept
 Linear-interpolating lookup with linear extrapolation outside bounds.
 
double table_intervalLookup (const Table &tbl, double x_query) noexcept
 Step-function lookup: return y for the first x entry > x_query.
 
double table_getSlope (const Table &tbl, double x_query) noexcept
 Compute the slope (dy/dx) at a given x value.
 
double table_getMaxY (const Table &tbl) noexcept
 Return the maximum y value in the non-decreasing leading portion.
 
std::vector< DiscoveredFilterdiscover_all_filters ()
 Enumerate every FileFilter advertised by every discovered plugin.
 
std::vector< DiscoveredPlugindiscover_plugins_by_id ()
 Enumerate every discovered plugin, grouped by plugin_id.
 
const char * plugin_role_to_string (PluginRole role) noexcept
 Convert a PluginRole to a stable, human-readable string.
 
const char * plugin_state_to_string (PluginState state) noexcept
 Convert a PluginState to a human-readable string.
 
bool plugin_state_transition_valid (PluginState from, PluginState to) noexcept
 Check whether a state transition is valid.
 

Typedef Documentation

◆ PluginInfoFactory

Typedef for the C factory function that plugin libraries must export.

Every plugin shared library must export a function with this signature and the name openswmm_plugin_info. The PluginFactory looks this up via dlsym/GetProcAddress after loading the library.

Example implementation in your plugin:

static MyPluginComponentInfo g_info;
return &g_info;
}
OPENSWMM_GPKG_HIDDEN openswmm::IPluginComponentInfo * openswmm_plugin_info(void)
Definition GeoPackagePluginInfo.cpp:67
Describes a plugin component: metadata, capabilities, and factory methods.
Definition IPluginComponentInfo.hpp:179

Enumeration Type Documentation

◆ CffiErrorCode

Enumerator
CFFI_OK 
CFFI_ERR_NOMEM 

memory allocation error

CFFI_ERR_INPFILE 

cannot open input file

CFFI_ERR_RPTFILE 

cannot open report file

CFFI_ERR_OUTFILE 

cannot open output file

CFFI_ERR_PARSE 

input parsing error

CFFI_ERR_LIFECYCLE 

invalid engine lifecycle state transition

CFFI_ERR_BADHANDLE 

invalid engine handle

CFFI_ERR_BADINDEX 

invalid object index

CFFI_ERR_BADPARAM 

invalid parameter value

CFFI_ERR_PLUGIN 

plugin initialization or execution error

CFFI_ERR_IO 

file I/O error

CFFI_ERR_HOTSTART 

hot start file error

CFFI_ERR_CRS 

coordinate reference system error

CFFI_ERR_NUMERICAL 

numerical solver error

CFFI_ERR_INTERNAL 

internal engine error

◆ CffiWarnCode

Enumerator
CFFI_WARN_NONE 
CFFI_WARN_HOTSTART_MISSING 

hot start file not found, cold start used

CFFI_WARN_UNKNOWN_SECTION 

unknown section in input file

CFFI_WARN_UNKNOWN_OPTION 

unknown option in input file

CFFI_WARN_DEPRECATED_KW 

deprecated keyword used

CFFI_WARN_PLUGIN_INIT 

plugin initialization warning

CFFI_WARN_NUMERICAL 

numerical approximation used

CFFI_WARN_STABILITY_LIMIT 

time step reduced for stability

◆ DividerType

enum class openswmm::DividerType : int8_t
strong

Flow divider type.

See also
Legacy: DividerType in src/solver/enums.h
Enumerator
CUTOFF 
OVERFLOW_DIV 

Renamed from OVERFLOW to avoid macOS math.h macro collision.

TABULAR 
WEIR 

◆ ErrorCode

enum openswmm::ErrorCode : int
Enumerator
ERR_NONE 
ERR_MEMORY 

memory allocation error

ERR_KINWAVE 

cannot solve KW equations for Link s

ERR_ODE_SOLVER 

cannot open ODE solver

ERR_TIMESTEP 

cannot compute a valid time step

ERR_SUBCATCH_OUTLET 

ambiguous outlet ID name for Subcatchment s

ERR_AQUIFER_PARAMS 

invalid parameter values for Aquifer s

ERR_GROUND_ELEV 

ground elevation is below water table for Subcatchment s

ERR_LENGTH 

invalid length for Conduit s

ERR_ELEV_DROP 

elevation drop exceeds length for Conduit s

ERR_ROUGHNESS 

invalid roughness for Conduit s

ERR_BARRELS 

invalid number of barrels for Conduit s

ERR_SLOPE 

adverse slope for Conduit s

ERR_NO_XSECT 

no cross section defined for Link s

ERR_XSECT 

invalid cross section for Link s

ERR_NO_CURVE 

missing or invalid pump curve assigned to Pump s

ERR_PUMP_LIMITS 

startup depth not higher than shutoff depth for Pump s

ERR_LOOP 

links form cyclic loops in the drainage system

ERR_MULTI_OUTLET 

Node s has more than one outlet link.

ERR_DUMMY_LINK 

Node s has illegal DUMMY link connections.

ERR_DIVIDER 

Divider s does not have two outlet links.

ERR_DIVIDER_LINK 

Divider s has invalid diversion link.

ERR_WEIR_DIVIDER 

Weir Divider s has invalid parameters.

ERR_NODE_DEPTH 

Node s has initial depth greater than maximum depth.

ERR_REGULATOR 

Regulator s is the outlet of a non-storage node.

ERR_STORAGE_VOLUME 

Storage node s has negative volume at full depth.

ERR_OUTFALL 

Outfall s has more than 1 inlet link or an outlet link.

ERR_REGULATOR_SHAPE 

Regulator s has invalid cross-section shape.

ERR_NO_OUTLETS 

Drainage system has no acceptable outlet nodes.

ERR_UNITHYD_TIMES 

a Unit Hydrograph in set s has invalid time base

ERR_UNITHYD_RATIOS 

a Unit Hydrograph in set s has invalid response ratios

ERR_RDII_AREA 

invalid sewer area for RDII at node s

ERR_RAIN_FILE_CONFLICT 

ambiguous station ID for Rain Gage s

ERR_RAIN_GAGE_FORMAT 

inconsistent rainfall format for Rain Gage s

ERR_RAIN_GAGE_TSERIES 

time series for Rain Gage s is also used by another object

ERR_RAIN_GAGE_INTERVAL 

recording interval greater than time series interval for Rain Gage s

ERR_CYCLIC_TREATMENT 

cyclic dependency in treatment functions at node s

ERR_CURVE_SEQUENCE 

Curve s has invalid or out of sequence data.

ERR_TIMESERIES_SEQUENCE 

Time Series s has its data out of sequence.

ERR_SNOWMELT_PARAMS 

invalid Snow Melt Climatology parameters

ERR_SNOWPACK_PARAMS 

invalid parameters for Snow Pack s

ERR_LID_TYPE 

no type specified for LID s

ERR_LID_LAYER 

missing layer for LID s

ERR_LID_PARAMS 

invalid parameter value for LID s

ERR_LID_AREAS 

LID area exceeds total area for Subcatchment s.

ERR_LID_CAPTURE_AREA 

LID capture area exceeds total impervious area for Subcatchment s.

ERR_START_DATE 

simulation start date comes after ending date

ERR_REPORT_DATE 

report start date comes after ending date

ERR_REPORT_STEP 

reporting time step or duration is less than routing time step

ERR_INPUT 

one or more errors in input file

ERR_INPUT_LINE 

too many characters in input line

ERR_ITEMS 

too few items

ERR_KEYWORD 

invalid keyword s

ERR_DUP_NAME 

duplicate ID name s

ERR_NAME 

undefined object s

ERR_NUMBER 

invalid number s

ERR_DATETIME 

invalid date/time s

ERR_CONTROL_RULE 

control rule clause invalid or out of sequence

ERR_TRANSECT_UNKNOWN 

data provided for unidentified transect

ERR_TRANSECT_SEQUENCE 

transect station out of sequence

ERR_TRANSECT_TOO_FEW 

Transect s has too few stations.

ERR_TRANSECT_TOO_MANY 

Transect s has too many stations.

ERR_TRANSECT_MANNING 

Transect s has no Manning's N.

ERR_TRANSECT_OVERBANK 

Transect s has invalid overbank locations.

ERR_TRANSECT_NO_DEPTH 

Transect s has no depth.

ERR_MATH_EXPR 

invalid math expression

ERR_INFILTRATION 

invalid infiltration parameters

ERR_FILE_NAME 

files share same names

ERR_INP_FILE 

cannot open input file

ERR_RPT_FILE 

cannot open report file

ERR_OUT_FILE 

cannot open binary results file

ERR_OUT_SIZE 

output will exceed maximum file size

ERR_OUT_WRITE 

error writing to binary results file

ERR_OUT_READ 

error reading from binary results file

ERR_RAIN_IFACE_SCRATCH 

cannot open scratch rainfall interface file

ERR_RAIN_IFACE 

cannot open rainfall interface file s

ERR_RAIN_FILE_OPEN 

cannot open rainfall data file s

ERR_RAIN_FILE_SEQUENCE 

line is out of sequence in rainfall data file s

ERR_RAIN_FILE_FORMAT 

unknown format for rainfall data file s

ERR_RAIN_IFACE_FORMAT 

invalid format for rainfall interface file

ERR_RAIN_IFACE_GAGE 

no data in rainfall interface file for gage s

ERR_RUNOFF_IFACE 

cannot open runoff interface file s

ERR_RUNOFF_IFACE_COMPAT 

incompatible data found in runoff interface file

ERR_RUNOFF_IFACE_EOF 

attempting to read beyond end of runoff interface file

ERR_RUNOFF_IFACE_READ 

error in reading from runoff interface file

ERR_HOTSTART_FILE 

cannot open hot start interface file s

ERR_HOTSTART_COMPAT 

incompatible data found in hot start interface file

ERR_HOTSTART_READ 

error in reading from hot start interface file

ERR_NO_CLIMATE_FILE 

no climate file specified for evaporation and/or wind speed

ERR_CLIMATE_FILE_OPEN 

cannot open climate file s

ERR_CLIMATE_FILE_READ 

error in reading from climate file s

ERR_CLIMATE_FILE_EOF 

attempt to read beyond end of climate file s

ERR_RDII_IFACE_SCRATCH 

cannot open scratch RDII interface file

ERR_RDII_IFACE 

cannot open RDII interface file s

ERR_RDII_IFACE_FORMAT 

invalid format for RDII interface file

ERR_ROUTING_IFACE 

cannot open routing interface file s

ERR_ROUTING_IFACE_FORMAT 

invalid format for routing interface file s

ERR_ROUTING_IFACE_NAMES 

mis-matched names in routing interface file s

ERR_ROUTING_IFACE_SAME 

inflows and outflows interface files have same name

ERR_TABLE_FILE_OPEN 

could not open external file used for Time Series s

ERR_TABLE_FILE_READ 

invalid data in external file used for Time Series s

ERR_SYSTEM 

System exception thrown.

ERR_API_NOT_OPENED 

project not opened

ERR_API_NOT_STARTED 

simulation not started

ERR_API_NOT_ENDED 

simulation not ended

ERR_API_OBJECT_TYPE 

invalid object type

ERR_API_OBJECT_INDEX 

invalid object index

ERR_API_OBJECT_NAME 

invalid object name

ERR_API_PROPERTY_TYPE 

invalid property type

ERR_API_PROPERTY_VALUE 

invalid property value

ERR_API_TIME_PERIOD 

invalid time period

ERR_TIMESERIES_EMPTY 

Time Series s has no data.

ERR_TIMESERIES_NAN 

Time Series s contains NaN or Inf values.

ERR_TABLE_COL_MISMATCH 

column count mismatch in data for s

ERR_GAGE_TSERIES_NOTFOUND 

Rain Gage s references unknown time series.

◆ FlowClass

enum class openswmm::FlowClass : int8_t
strong

Link flow state.

See also
Legacy: FlowClass in src/solver/enums.h
Enumerator
DRY 
UP_DRY 
DN_DRY 
SUBCRITICAL 
SUPERCRITICAL 
UP_CRITICAL 
DN_CRITICAL 

◆ FlowUnits

enum class openswmm::FlowUnits : int
strong

Flow unit systems.

See also
Legacy: FlowUnitsType in enums.h
Enumerator
CFS 

Cubic feet per second.

GPM 

Gallons per minute.

MGD 

Million gallons per day.

CMS 

Cubic meters per second.

LPS 

Liters per second.

MLD 

Million liters per day.

◆ ForcingMode

enum class openswmm::ForcingMode : int8_t
strong
Enumerator
NONE 

Use model-computed value (no forcing)

OVERRIDE 

Replace computed value with user value.

ADD 

Add user value to computed value.

◆ ForcingPersist

enum class openswmm::ForcingPersist : int8_t
strong
Enumerator
RESET 

Auto-clear after each timestep.

PERSIST 

Keep until explicitly cleared.

◆ InfilModel

enum class openswmm::InfilModel : int
strong
Enumerator
HORTON 
MOD_HORTON 

Modified Horton: linear decay fp = f0 - kd * Fe.

GREEN_AMPT 
MOD_GREEN_AMPT 

Modified Green-Ampt: does not reset F between events.

CURVE_NUM 

◆ InfiltrationModel

enum class openswmm::InfiltrationModel : int
strong

Infiltration methods.

See also
Legacy: InfilModelType in enums.h
Enumerator
HORTON 
MOD_HORTON 
GREEN_AMPT 
MOD_GREEN_AMPT 
CURVE_NUMBER 

◆ LinkType

enum class openswmm::LinkType : int8_t
strong

Link type codes.

See also
Legacy: LinkType in src/solver/enums.h
Enumerator
CONDUIT 
PUMP 
ORIFICE 
WEIR 
OUTLET 

◆ MassUnits

enum class openswmm::MassUnits : int8_t
strong

Pollutant concentration units.

See also
Legacy: MassUnitsType in src/solver/enums.h
Enumerator
MG_PER_L 

Milligrams per liter.

UG_PER_L 

Micrograms per liter.

COUNTS_PER_L 

Counts per liter (bacteria)

◆ NodeContinuity

enum class openswmm::NodeContinuity : int
strong

Node continuity formulation for depth update.

Controls how node depths are updated in the dynamic wave solver:

  • EXPLICIT: Classic two-branch formulation — separate non-surcharged (dV/surfArea) and surcharged (EXTRAN dQ/dH) paths.
  • SEMI_IMPLICIT: Unified formulation that integrates sumdqdh into the depth update so that head changes affect inflow/outflow rates within the same timestep. Merges surcharged and non-surcharged states into a single equation: dy = dV / (surfArea + sumdqdh * dt).

Specified in [OPTIONS] as:

NODE_CONTINUITY EXPLICIT ;; default (legacy behaviour)
NODE_CONTINUITY SEMI_IMPLICIT ;; unified semi-implicit formulation
@ EXPLICIT
Classic explicit two-branch (default)
@ SEMI_IMPLICIT
Unified semi-implicit formulation.
Enumerator
EXPLICIT 

Classic explicit two-branch (default)

SEMI_IMPLICIT 

Unified semi-implicit formulation.

◆ NodeType

enum class openswmm::NodeType : int8_t
strong

Node type codes.

See also
Legacy: NodeType in src/solver/enums.h
Enumerator
JUNCTION 
OUTFALL 
DIVIDER 
STORAGE 

◆ OutfallType

enum class openswmm::OutfallType : int8_t
strong

Outfall boundary condition type.

See also
Legacy: OutfallType in src/solver/enums.h
Enumerator
FREE 
NORMAL 
FIXED 
TIDAL 
TIMESERIES 

◆ RainFileFormat

enum class openswmm::RainFileFormat : int8_t
strong

Rain data format in an external file.

See also
Legacy: RainFileType in src/solver/enums.h
Enumerator
UNKNOWN 
NWS_15 

NWS 15-minute data.

NWS_HOURLY 

NWS hourly data.

DSI_3240 

NCDC DSI 3240 hourly.

DSI_3260 

NCDC DSI 3260 15-minute.

HLY_PRCP 

HLY_PRCP format.

STAN_PRCP 

Standard SWMM rain file.

USER_CSV 

User-supplied multi-column CSV (new in 6.0.0, R08)

◆ RainSource

enum class openswmm::RainSource : int8_t
strong

Precipitation source type for a rain gage.

See also
Legacy: RainType in src/solver/enums.h
Enumerator
TIMESERIES 

Data from an in-file [TIMESERIES].

FILE_RAIN 

Data from an external rain file.

◆ RouteModel

enum class openswmm::RouteModel : int
strong
Enumerator
STEADY 

Steady-state (pass-through)

KINWAVE 

Kinematic wave.

DYNWAVE 

Dynamic wave (St. Venant)

◆ RoutingModel

enum class openswmm::RoutingModel : int
strong

Flow routing methods.

See also
Legacy: RouteModelType in enums.h
Enumerator
STEADY 

Steady-state (no routing)

KINWAVE 

Kinematic wave approximation.

DYNWAVE 

Dynamic wave (full Saint-Venant)

◆ RunoffModel

enum class openswmm::RunoffModel : int
strong

Runoff routing methods.

See also
Legacy: RunoffModelType in enums.h
Enumerator
NONE 
NL_POND 

Non-linear reservoir (default)

◆ TableType

enum class openswmm::TableType : int
strong

Type of data stored in a Table.

See also
Legacy reference: TableType in src/solver/enums.h
Enumerator
TIMESERIES 

Rainfall, inflow, or other time-varying values.

CURVE_STORAGE 

Storage node volume-depth curve.

CURVE_DIVERSION 

Diversion rating curve.

CURVE_RATING 

Outfall/weir rating curve.

CURVE_SHAPE 

Cross-section shape curve.

CURVE_CONTROL 

Control rule action curve.

CURVE_TIDAL 

Tidal stage curve.

CURVE_PUMP1 

Pump curve type 1 (ON/OFF depth)

CURVE_PUMP2 

Pump curve type 2 (head vs flow)

CURVE_PUMP3 

Pump curve type 3 (volume vs time)

CURVE_PUMP4 

Pump curve type 4 (depth vs speed)

CURVE_PUMP5 

Pump curve type 5 (head vs flow, variable speed)

◆ WarnCode

enum openswmm::WarnCode : int
Enumerator
WARN_NONE 
WARN_WET_STEP_REDUCED 

wet weather time step reduced to recording interval for Rain Gage s

WARN_MAX_DEPTH_INCREASED 

maximum depth increased for Node s

WARN_NEGATIVE_OFFSET 

negative offset ignored for Link s

WARN_MIN_ELEV_DROP 

minimum elevation drop used for Conduit s

WARN_MIN_SLOPE 

minimum slope used for Conduit s

WARN_DRY_STEP_INCREASED 

dry weather time step increased to the wet weather time step

WARN_ROUTING_STEP_REDUCED 

routing time step reduced to the wet weather time step

WARN_ELEV_DROP_EXCEEDS 

elevation drop exceeds length for Conduit s

WARN_GAGE_INTERVAL 

time series interval greater than recording interval for Rain Gage s

WARN_REGULATOR_CREST_LOW 

crest elevation is below downstream invert for regulator Link s

WARN_CONTROL_RULE_ATTR 

non-matching attributes in Control Rule s

WARN_INLET_REMOVED 

inlet removed due to unsupported shape for Conduit s

WARN_TIMESERIES_DUPLICATE_X 

Time Series s has duplicate x values.

WARN_BOUNDARY_OVERLAP 

boundary regions overlap for s

◆ XsectShape

enum class openswmm::XsectShape : int16_t
strong

Conduit cross-section shape code.

See also
Legacy: XsectType in src/solver/enums.h
Enumerator
CIRCULAR 
FILLED_CIRCULAR 
RECT_CLOSED 
RECT_OPEN 
TRAPEZOIDAL 
TRIANGULAR 
PARABOLIC 
POWER 
MODBASKETHANDLE 
EGGSHAPED 
HORSESHOE 
GOTHIC 
CATENARY 
SEMIELLIPTICAL 
BASKETHANDLE 
SEMICIRCULAR 
RECT_TRIANG 

Rectangular-triangular bottom.

RECT_ROUND 

Rectangular-round bottom.

HORIZ_ELLIPSE 

Horizontal elliptical pipe.

VERT_ELLIPSE 

Vertical elliptical pipe.

ARCH 

Arch pipe.

IRREGULAR 

User-supplied shape curve.

CUSTOM 

Shape from CURVE_SHAPE table.

FORCE_MAIN 

Circular force main (Hazen-Williams or D-W)

STREET_XSECT 

Street cross-section.

DUMMY 

Dummy (no geometry)

◆ XSectShape

enum class openswmm::XSectShape : int
strong
Enumerator
DUMMY 
CIRCULAR 
FILLED_CIRCULAR 
RECT_CLOSED 
RECT_OPEN 
TRAPEZOIDAL 
TRIANGULAR 
PARABOLIC 
POWERFUNC 
RECT_TRIANG 
RECT_ROUND 
MOD_BASKET 
HORIZ_ELLIPSE 
VERT_ELLIPSE 
ARCH 
EGGSHAPED 
HORSESHOE 
GOTHIC 
CATENARY 
SEMIELLIPTICAL 
BASKETHANDLE 
SEMICIRCULAR 
IRREGULAR 
CUSTOM 
FORCE_MAIN 
STREET_XSECT 

Function Documentation

◆ c_to_internal_link_type()

bool openswmm::c_to_internal_link_type ( int  c_type,
LinkType out_type 
)
inlinenoexcept
Here is the caller graph for this function:

◆ c_to_internal_node_type()

bool openswmm::c_to_internal_node_type ( int  c_type,
NodeType out_type 
)
inlinenoexcept
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cffi_error_get_template()

std::string_view openswmm::cffi_error_get_template ( int  code)
noexcept

Get the description for a CFFI error code (SWMM_ErrorCode).

Parameters
codeCFFI error code (from CffiErrorCode / SWMM_ErrorCode enum).
Returns
Description string.
Here is the caller graph for this function:

◆ cffi_warning_get_template()

std::string_view openswmm::cffi_warning_get_template ( int  code)
noexcept

Get the description for a CFFI warning code (SWMM_WarnCode).

Parameters
codeCFFI warning code (from CffiWarnCode / SWMM_WarnCode enum).
Returns
Description string.
Here is the caller graph for this function:

◆ discover_all_filters()

std::vector< DiscoveredFilter > openswmm::discover_all_filters ( )

Enumerate every FileFilter advertised by every discovered plugin.

Constructs a transient PluginFactory, runs auto-discovery, then flattens IPluginComponentInfo::file_filters() across all components. The returned list preserves the order of (plugin, filter-within-plugin).

Returns
Flat snapshot of all advertised filters.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ discover_plugins_by_id()

std::vector< DiscoveredPlugin > openswmm::discover_plugins_by_id ( )

Enumerate every discovered plugin, grouped by plugin_id.

Walks discover_all_filters() and folds entries that share a plugin_id into a single DiscoveredPlugin. roles is de-duplicated. Order of plugins follows the order in which their first filter is encountered (stable across calls).

Use this when you need "what does plugin X support overall" rather than "give me every (plugin, filter) pair".

Returns
Flat snapshot of plugins, one entry per plugin_id.
Here is the call graph for this function:

◆ error_get_template()

std::string_view openswmm::error_get_template ( int  code)
noexcept

Get the description template for an error code.

Returns the legacy-compatible description string with s placeholder for the object name. Returns empty string for unknown codes.

Parameters
codeError code (from ErrorCode enum).
Returns
Description template string (e.g., "could not open external file used for Time Series %s.").
Here is the caller graph for this function:

◆ format_cffi_error()

std::string openswmm::format_cffi_error ( int  code,
std::string_view  name = "" 
)

Format a CFFI error message.

Parameters
codeCFFI error code.
nameOptional object name for context.
Returns
Formatted string like " CFFI ERROR 5: input parsing error."
Here is the call graph for this function:

◆ format_cffi_warning()

std::string openswmm::format_cffi_warning ( int  code,
std::string_view  name = "" 
)

Format a CFFI warning message.

Parameters
codeCFFI warning code.
nameOptional object name for context.
Returns
Formatted string like " CFFI WARNING 2: unknown section in input file."
Here is the call graph for this function:

◆ format_error() [1/2]

std::string openswmm::format_error ( int  code,
std::string_view  name,
std::string_view  detail 
)

Format an error message with object name and additional detail.

Produces output like: " ERROR 173: Time Series RAIN1 has its data out of sequence at 01/01/2024 02:00:00."

Parameters
codeError code.
nameObject name to substitute for s.
detailAdditional detail appended after the template.
Returns
Formatted error message string.
Here is the call graph for this function:

◆ format_error() [2/2]

std::string openswmm::format_error ( int  code,
std::string_view  name = "" 
)

Format an error message with object name substitution.

Produces output like: " ERROR 173: Time Series RAIN1 has its data out of sequence."

Parameters
codeError code.
nameObject name to substitute for s.
Returns
Formatted error message string.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ format_warning() [1/2]

std::string openswmm::format_warning ( int  code,
std::string_view  name,
std::string_view  detail 
)

Format a warning with additional detail.

Here is the call graph for this function:

◆ format_warning() [2/2]

std::string openswmm::format_warning ( int  code,
std::string_view  name = "" 
)

Format a warning message with object name substitution.

Parameters
codeWarning code.
nameObject name to substitute for s.
Returns
Formatted warning message string.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ from_chars_double()

std::from_chars_result openswmm::from_chars_double ( const char *  first,
const char *  last,
double &  value 
)
inlinenoexcept

Locale-independent parse of a double from a character range.

On toolchains that support std::from_chars for doubles this forwards directly; otherwise it falls back to std::strtod via a null-terminated temporary copy.

Here is the caller graph for this function:

◆ internal_to_c_link_type()

int openswmm::internal_to_c_link_type ( LinkType  type)
inlinenoexcept
Here is the caller graph for this function:

◆ internal_to_c_node_type()

int openswmm::internal_to_c_node_type ( NodeType  type)
inlinenoexcept
Here is the call graph for this function:
Here is the caller graph for this function:

◆ plugin_state_to_string()

const char * openswmm::plugin_state_to_string ( PluginState  state)
inlinenoexcept

Convert a PluginState to a human-readable string.

Parameters
statePlugin state.
Returns
Static null-terminated string (never NULL).

◆ plugin_state_transition_valid()

bool openswmm::plugin_state_transition_valid ( PluginState  from,
PluginState  to 
)
inlinenoexcept

Check whether a state transition is valid.

Parameters
fromCurrent state.
toTarget state.
Returns
true if the transition is allowed.

◆ table_getMaxY()

double openswmm::table_getMaxY ( const Table tbl)
inlinenoexcept

Return the maximum y value in the non-decreasing leading portion.

Matches legacy table_getMaxY() in table.c. Scans until y starts decreasing and returns the peak.

Parameters
tblTable to query (const).
Returns
Maximum y before the first decreasing step.

◆ table_getSlope()

double openswmm::table_getSlope ( const Table tbl,
double  x_query 
)
inlinenoexcept

Compute the slope (dy/dx) at a given x value.

Matches legacy table_getSlope() in table.c. Returns the slope of the interval containing x_query. Clamped to the nearest interval at boundaries.

Parameters
tblTable to query (const — no cursor update).
x_queryThe independent variable value.
Returns
dy/dx at x_query.

◆ table_getStorageDepth()

double openswmm::table_getStorageDepth ( Table tbl,
double  volume 
)
inlinenoexcept

Invert a storage area-vs-depth curve to find depth from volume.

Matches legacy table_getStorageDepth() in table.c. Uses the trapezoidal volume formula to bracket the target volume, then applies a quadratic formula to solve for depth within that interval.

Parameters
tblTable with x = depth, y = surface area.
volumeTarget volume.
Returns
Depth corresponding to the given volume.
Here is the caller graph for this function:

◆ table_getStorageVolume()

double openswmm::table_getStorageVolume ( Table tbl,
double  depth 
)
inlinenoexcept

Compute storage volume by trapezoidal integration of an area-vs-depth curve, matching legacy table_getStorageVolume() in table.c.

Parameters
tblTable with x = depth, y = surface area.
depthDepth to integrate to.
Returns
Volume (same units as area * depth).
Here is the caller graph for this function:

◆ table_intervalLookup()

double openswmm::table_intervalLookup ( const Table tbl,
double  x_query 
)
inlinenoexcept

Step-function lookup: return y for the first x entry > x_query.

Matches legacy table_intervalLookup() in table.c. Used for pattern time series where the value applies until the next time point. Returns y[0] if x_query < x[0], y[last] if x_query >= x[last].

Parameters
tblTable to look up (const — no cursor update).
x_queryThe independent variable value.
Returns
y value of the first entry whose x is strictly greater than x_query (step function).

◆ table_inverseLookup()

double openswmm::table_inverseLookup ( const Table tbl,
double  y_query 
)
inlinenoexcept

Inverse lookup: given y, find corresponding x by linear interpolation.

Matches legacy table_inverseLookup() in table.c. Assumes y is monotonically increasing. Clamped at boundaries.

Parameters
tblTable to search (y must be monotone-increasing).
y_queryThe dependent variable value to invert.
Returns
Interpolated x value.

◆ table_load_cache()

std::size_t openswmm::table_load_cache ( Table tbl,
std::size_t  start_row 
)

◆ table_lookup_column()

double openswmm::table_lookup_column ( Table tbl,
int  col_idx,
double  x_query 
)

◆ table_lookup_cursor()

double openswmm::table_lookup_cursor ( Table tbl,
double  x_query 
)
inlinenoexcept

Look up a value in a Table using the bidirectional cursor.

Performs linear interpolation between adjacent entries. Clamping behavior at boundaries:

  • x_query < x[0]: returns y[0]
  • x_query > x[last]: returns y[last]
  • Otherwise: linear interpolation between bracketing entries

The cursor is updated on each call to reflect the current position. For monotonically advancing queries (typical), this is O(1) amortized.

Parameters
tblTable to look up (cursor is modified in-place).
x_queryThe independent variable value to look up.
Returns
Interpolated y value.
Note
NOT thread-safe — do not call from multiple threads on the same Table without external synchronization (each thread should own its cursor copy).
See also
Legacy reference: src/solver/table.c — table_lookup()
Here is the caller graph for this function:

◆ table_lookupEx()

double openswmm::table_lookupEx ( const Table tbl,
double  x_query 
)
inlinenoexcept

Linear-interpolating lookup with linear extrapolation outside bounds.

Matches legacy table_lookupEx() in table.c. Unlike table_lookup_cursor(), this extends the table using the slope of the first (below) or last (above) interval rather than clamping. Used for storage exfiltration bottom-area extrapolation.

Parameters
tblTable to look up (const — no cursor update).
x_queryThe independent variable value.
Returns
Interpolated or extrapolated y value.

◆ table_open_file()

bool openswmm::table_open_file ( Table tbl,
std::size_t  boundary_rows 
)
Here is the call graph for this function:

◆ table_step_column()

double openswmm::table_step_column ( Table tbl,
int  col_idx,
double  x_query 
)

◆ table_step_cursor()

double openswmm::table_step_cursor ( Table tbl,
double  x_query 
)
inlinenoexcept

Piecewise-constant (step function) table lookup with cursor.

Returns y[idx] where x[idx] <= x_query < x[idx+1]. No interpolation — the value is held constant until the next table entry. This is the correct behavior for rain time series where each entry represents the value for the following interval.

Parameters
tblTable to look up (cursor is modified in-place).
x_queryThe independent variable value to look up.
Returns
Step-function y value (no interpolation).
See also
Legacy reference: gage.cgage_setState() uses step-function logic
Here is the caller graph for this function:

◆ table_tseries_lookup_cursor()

double openswmm::table_tseries_lookup_cursor ( Table tbl,
double  x_query 
)
inlinenoexcept

Time-series linear interpolation with out-of-range → 0 behaviour.

Matches legacy table_tseriesLookup(..., extend=FALSE):

  • x_query < first x → return 0 (not yet started)
  • x_query > last x → return 0 (series ended, do NOT hold last value)
  • otherwise → linear interpolation with cursor

Use this for external-inflow, evaporation, and similar time series where the inflow should drop to zero once the series is exhausted.

Parameters
tblTable to look up (cursor is modified in-place).
x_queryThe independent variable value (e.g. simulation date).
Returns
Interpolated y value, or 0 outside the series range.
See also
Legacy: table.c::table_tseriesLookup(tbl, x, extend=FALSE)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ validate_table()

TableValidation openswmm::validate_table ( Table tbl)
Here is the call graph for this function:

◆ warning_get_template()

std::string_view openswmm::warning_get_template ( int  code)
noexcept

Get the description template for a warning code.

Parameters
codeWarning code (from WarnCode enum).
Returns
Description template string.
Here is the caller graph for this function: