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

Namespaces

namespace  climate
 
namespace  components
 
namespace  constants
 
namespace  controls
 
namespace  culvert
 
namespace  datetime
 
namespace  detail
 
namespace  divider
 
namespace  dynwave
 
namespace  edit
 
namespace  exfil
 
namespace  fastmath
 
namespace  findroot
 
namespace  forcemain
 
namespace  fv
 
namespace  gage
 
namespace  gpkg
 
namespace  groundwater
 
namespace  hydkernels
 
namespace  hydraulics
 
namespace  hydstruct
 
namespace  iface
 
namespace  infil
 
namespace  inflow
 
namespace  inlet
 
namespace  inp_writer
 
namespace  input
 
namespace  io
 
namespace  kinwave
 
namespace  landuse
 
namespace  lard
 
namespace  lid
 
namespace  link
 
namespace  mathexpr
 
namespace  node
 
namespace  ode
 
namespace  outfall
 
namespace  perf
 
namespace  quality
 
namespace  rdii
 
namespace  rdii_iface
 
namespace  roadway
 
namespace  runoff
 
namespace  runoff_iface
 
namespace  simd
 
namespace  snow
 
namespace  street
 
namespace  threadinfo
 
namespace  toposort
 
namespace  transect
 
namespace  transport
 
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  ArdConfigData
 Parsed model.ard state consumed by ArdEngine::init (phase E3). More...
 
struct  ArdTransportRow
 One raw [TRANSPORT_BOUNDARIES] or [TRANSPORT_SOURCES] row (E5a). More...
 
struct  BedZoneState
 Runtime bed state, one entry per LINK. More...
 
struct  BuildupData
 
class  BuiltinDefaultInputPluginInfo
 
class  BuiltinDefaultOutputPluginInfo
 
class  BuiltinDefaultReportPluginInfo
 
class  BuiltinDefaultStateIOPluginInfo
 
struct  CiEqual
 Transparent case-insensitive equality for unordered containers. More...
 
struct  CiHash
 Transparent case-insensitive hash (FNV-1a over the uppercase fold). More...
 
struct  CloudConfig
 [CLOUD_COVER] — one fraction driving two modules (H6a, D-H6a-2). More...
 
struct  ConductionConfig
 Vertical conduction between LID layers (plan §6.1 D-H5b, H5b). More...
 
struct  ConduitData
 Dense SoA for conduit-only properties (one row per CONDUIT link). More...
 
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  DividerData
 Dense SoA for flow-divider properties (one row per DIVIDER node). More...
 
struct  DwfData
 
struct  ExtInflowData
 
struct  FileFilter
 A file-format filter advertised by a plugin. More...
 
struct  FilePathPair
 Two-string carrier for any external file path that appears in a SWMM .inp file. 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  HeatConfigData
 Parsed model.heat state (heat component, phase H1). More...
 
struct  HeatElement
 Which element a flux evaluator is being called for. More...
 
struct  HeatOverrideData
 Dense per-element attribute storage (PE2, D-PE2). More...
 
struct  HeatOverrideRow
 
struct  HeatState
 Runtime heat state shared by the engines (phase H1). More...
 
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  InitialQualityData
 
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  LidLayerSpeciesState
 Per-(unit, layer, species) state for every LID unit in the model. 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...
 
struct  LinkSubtypes
 Owns the five link subtype side-tables plus the reverse index map. 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...
 
struct  NodeSubtypes
 Owns the three node subtype side-tables plus the reverse index map. More...
 
struct  OrificeData
 
struct  OutfallData
 Dense SoA for outfall boundary-condition properties (one row per OUTFALL). More...
 
struct  OutletData
 
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  ProcessComponentSpec
 One row of [PROCESS_COMPONENTS] (Unified Transport suite, D-UT8). More...
 
struct  PumpData
 
struct  RadiativeConfig
 [RADIATIVE_FLUXES] parameters (heat plan §2.2, phase H3). More...
 
struct  RDIIAssignData
 
struct  RDIIDecayData
 
struct  RDIIDecayEntry
 
struct  ReactionData
 
struct  RegistrationInfo
 Registration information for plugin activation. More...
 
class  Router
 Top-level routing orchestrator. More...
 
struct  RxExprSpan
 Compiled expression = span into the shared pool. len 0 ⇒ no expression. More...
 
struct  RxToken
 
struct  SedimentConfig
 [SEDIMENT_EXCHANGE] — the bed zone's material and geometry. 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  SolarConfig
 [SOLAR_RADIATION] — site geometry and Bird atmosphere (H6a). More...
 
struct  SpatialFrame
 Spatial frame containing CRS and georeferenced coordinates. More...
 
class  SpeciesRegistry
 
struct  StateAccessors
 Solver-neutral hooks for reading and writing solver-internal state (infiltration, groundwater) at hot-start save/load time. More...
 
struct  StorageData
 Dense SoA for storage-unit properties (one row per STORAGE node). 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  WaterAgeConfigData
 Parsed model.age state (waterage component, phase A1a). More...
 
struct  WaterAgeState
 
struct  WeirData
 
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 ,
  ERR_VJ_LINK_COUNT = 609 ,
  ERR_VJ_XSECT_MISMATCH = 611 ,
  ERR_VJ_OFFSET = 613 ,
  ERR_VJ_INVERT_MISMATCH = 615 ,
  ERR_VJ_LATERAL_INFLOW = 617 ,
  ERR_VJ_ROUTING_MODEL = 619 ,
  ERR_VJ_EXTRA_TOKENS = 621 ,
  ERR_IJ_NOT_STREET = 623 ,
  ERR_IJ_DESIGN = 625 ,
  ERR_IJ_CAPTURE_NODE = 627 ,
  ERR_IJ_USAGE_ON_PAIR = 629 ,
  ERR_IJ_EXTRA_TOKENS = 631 ,
  ERR_IJ_NO_USAGE = 633 ,
  ERR_INLET_USAGE_SHAPE = 635
}
 
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_UH_PARAMS_REPEATED = 13 ,
  WARN_TIMESERIES_DUPLICATE_X = 101 ,
  WARN_BOUNDARY_OVERLAP = 102 ,
  WARN_FILES_SLOT_UNSUPPORTED = 103 ,
  WARN_2D_OPTION_RETIRED = 104 ,
  WARN_FV_OPTION_INERT = 105 ,
  WARN_DW_OPTION_UNDER_FV = 106 ,
  WARN_RAIN_CSV_ROWS_SKIPPED = 107 ,
  WARN_FV_SLOT_CAP = 108
}
 
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 ,
  FV = 3
}
 Flow routing methods. More...
 
enum class  QualitySolverKind : int {
  LEGACY = 0 ,
  EULERIAN_ARD = 1 ,
  LAGRANGIAN = 2
}
 Water-quality engine ([OPTIONS] QUALITY_SOLVER, master plan D-UT6). 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  ArdDispersionMode : int {
  OFF = 0 ,
  FISCHER = 1 ,
  VALUE = 2
}
 Global dispersion coefficient model ([TRANSPORT_OPTIONS] DISPERSION). 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  HeatSource : int {
  RAINFALL = 0 ,
  DWF = 1 ,
  GW = 2 ,
  RDII = 3 ,
  EXTERNAL_INFLOW = 4 ,
  IFACE = 5 ,
  INITIAL_STATE = 6 ,
  COUNT_ = 7
}
 
enum class  HeatSubArea : int {
  IMPERV0 = 0 ,
  IMPERV1 = 1 ,
  PERV = 2 ,
  COUNT_ = 3
}
 
enum class  DryTempPolicy : int {
  HOLD = 0 ,
  AIR = 1 ,
  DEFAULT = 2
}
 What a dry or absent element reports (plan D-H5c, user 2026-08-19). More...
 
enum class  ShortwaveMode : int {
  CONSTANT = 0 ,
  TIMESERIES = 1 ,
  COMPUTED = 2
}
 Where incoming shortwave Jin comes from (plan §2.5, phase H6a). More...
 
enum class  HeatElemKind : std::uint8_t {
  NODE = 0 ,
  LINK = 1 ,
  SUBCATCH = 2 ,
  LID = 3 ,
  CELL2D = 4
}
 What kind of element a flux is being evaluated for (D-PE1). More...
 
enum class  HeatScope : std::uint8_t {
  GLOBAL = 0 ,
  TAG = 1 ,
  NODE = 2 ,
  LINK = 3
}
 Scope of one override row (D-PE3). Ordered by specificity. More...
 
enum class  HeatAttr : int {
  ALBEDO = 0 ,
  SHADE_FACTOR ,
  SKY_VIEW ,
  EMISS_WATER ,
  EMISS_LANDCOVER ,
  LANDCOVER_TEMP ,
  SED_THERMAL_DIFFUSIVITY ,
  SED_SOLUTE_DIFFUSIVITY ,
  SED_BED_THICKNESS ,
  SED_GROUND_DEPTH ,
  SED_GROUND_TEMP ,
  SED_HYPORHEIC_VELOCITY ,
  SED_DENSITY ,
  SED_SPECIFIC_HEAT ,
  COUNT_
}
 Which attribute an override row sets. More...
 
enum class  LidLayer : int {
  SURFACE = 0 ,
  PAVEMENT = 1 ,
  SOIL = 2 ,
  STORAGE = 3 ,
  COUNT_ = 4
}
 
enum class  LidSpecies : int {
  AGE = 0 ,
  TEMPERATURE = 1 ,
  COUNT_ = 2
}
 Species rows carried on the LID layers. 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  StorageShape : int8_t {
  TABULAR = 0 ,
  FUNCTIONAL = 1 ,
  CYLINDRICAL = 2 ,
  CONICAL = 3 ,
  PARABOLOID = 4 ,
  PYRAMIDAL = 5
}
 Storage-unit surface-area relation. More...
 
enum class  MassUnits : int8_t {
  MG_PER_L = 0 ,
  UG_PER_L = 1 ,
  COUNTS_PER_L = 2
}
 Pollutant concentration units. More...
 
enum class  ReactionSolverKind : int {
  EUL = 0 ,
  RK5 = 1 ,
  ROS2 = 2 ,
  BDF2 = 3
}
 
enum class  ReactionCoupling : int {
  NONE = 0 ,
  FULL = 1
}
 
enum class  ReactionRateUnits : int {
  SEC = 0 ,
  MIN = 1 ,
  HR = 2 ,
  DAY = 3
}
 
enum class  ReactionAreaUnits : int {
  FT2 = 0 ,
  M2 = 1 ,
  CM2 = 2
}
 
enum class  ReactionExprForm : int {
  NONE = 0 ,
  RATE = 1 ,
  EQUIL = 2 ,
  FORMULA = 3
}
 
enum class  RxHydVar : int {
  D = 0 ,
  Q ,
  U ,
  RE ,
  US ,
  FF ,
  AV ,
  HRT ,
  DT ,
  TEMP ,
  COUNT_
}
 
enum class  SpeciesKind : int {
  POLLUTANT = 0 ,
  RESERVED_AGE = 1 ,
  RESERVED_TEMPERATURE = 2 ,
  MSX_BULK = 3 ,
  MSX_WALL = 4
}
 Constituent kinds (master plan §4.1). 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 ,
  CURVE_WEIR = 12
}
 Type of data stored in a Table. More...
 
enum class  WaterAgeSource : int {
  RAINFALL = 0 ,
  DWF = 1 ,
  GW = 2 ,
  RDII = 3 ,
  EXTERNAL_INFLOW = 4 ,
  IFACE = 5 ,
  INITIAL_STATE = 6 ,
  COUNT_ = 7
}
 
enum class  SubArea : int {
  IMPERV0 = 0 ,
  IMPERV1 = 1 ,
  PERV = 2 ,
  COUNT_ = 3
}
 Runtime age state shared by the engines (phase A1a). More...
 
enum class  RouteModel : int {
  STEADY = 0 ,
  KINWAVE = 1 ,
  DYNWAVE = 2 ,
  FV = 3
}
 
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 ,
  CONSTANT = 5
}
 
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.
 
constexpr char ci_upper (char c) noexcept
 ASCII-only uppercase fold; mirrors legacy hash.c UCHAR exactly.
 
bool ieq (std::string_view a, std::string_view b) noexcept
 Case-insensitive equality (ASCII fold), matching legacy samestr().
 
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
 
bool isSedimentAttr (HeatAttr a) noexcept
 
constexpr bool storage_shape_is_geometric (StorageShape s) noexcept
 True when s is one of the four geometric shapes (i.e. its a/b/c are the quadratic coefficients, not TABULAR/FUNCTIONAL).
 
bool storage_shape_params_valid (StorageShape s, double p1, double p2, double p3) noexcept
 Validate raw shape parameters.
 
bool storage_shape_coeffs (StorageShape s, double p1, double p2, double p3, double &a, double &b, double &c) noexcept
 Derive the area-relation coefficients for a geometric shape.
 
const char * storage_shape_keyword (StorageShape s) noexcept
 Canonical INP/GeoPackage keyword for a shape.
 
bool storage_shape_from_keyword (std::string_view kw, StorageShape &out) noexcept
 Parse a shape keyword (caller upper-cases first).
 
constexpr bool storage_shape_is_valid_code (int v) noexcept
 True when v is a valid StorageShape ordinal (C API boundary check).
 
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.
 

Variables

constexpr double kLitersPerFt3 = 28.316846592
 
constexpr int kRxMaxStackDepth = 32
 
constexpr double kStoragePi = 3.141592653589793
 π to the precision legacy uses (src/legacy/engine/consts.h).
 
long g_trace_rstep_sn
 

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:195

Enumeration Type Documentation

◆ ArdDispersionMode

enum class openswmm::ArdDispersionMode : int
strong

Global dispersion coefficient model ([TRANSPORT_OPTIONS] DISPERSION).

Enumerator
OFF 

no global dispersion (per-conduit overrides still apply)

FISCHER 

Fischer et al. (1979): D = 0.011 v²B²/(Y·U*), U* = √(gYS)

VALUE 

uniform user value (display units, len²/s)

◆ 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 

◆ DryTempPolicy

enum class openswmm::DryTempPolicy : int
strong

What a dry or absent element reports (plan D-H5c, user 2026-08-19).

A4 zeroes a LID layer holding no water — "no water, no age" — and that is right for age and wrong for temperature, because 0 °C is a real temperature. The three defensible answers serve different studies, so the deck picks one rather than the engine deciding.

Enumerator
HOLD 

Freeze the last wet value; rewetting mixes against it. Invents no number and needs no forcing series, which is why it is the default.

AIR 

Track air temperature — the physical answer for an exposed dry surface. Costs a dependency on the met forcing.

DEFAULT 

Fall to HeatConfigData::kDefaultTemp. Reproducible, but it invents a number that then looks like data.

◆ 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.

ERR_VJ_LINK_COUNT 

Virtual Junction s must connect exactly two conduits.

ERR_VJ_XSECT_MISMATCH 

Virtual Junction s connects conduits with different cross sections.

ERR_VJ_OFFSET 

Virtual Junction s has a conduit with a nonzero offset.

ERR_VJ_INVERT_MISMATCH 

Virtual Junction s conduit inverts do not agree at the node.

ERR_VJ_LATERAL_INFLOW 

Virtual Junction s cannot be coupled to a 2D surface mesh (point laterals are allowed)

ERR_VJ_ROUTING_MODEL 

Virtual Junction s requires DYNWAVE or FV flow routing.

ERR_VJ_EXTRA_TOKENS 

too many items for Virtual Junction s

ERR_IJ_NOT_STREET 

Inlet Junction s must connect two STREET conduits (or RECT_OPEN/TRAPEZOIDAL for drop inlets)

ERR_IJ_DESIGN 

Inlet Junction s references an unknown inlet design.

ERR_IJ_CAPTURE_NODE 

Inlet Junction s has an invalid capture node (missing, itself, or virtual)

ERR_IJ_USAGE_ON_PAIR 

Inlet Junction s conduit also carries an [INLET_USAGE] entry.

ERR_IJ_EXTRA_TOKENS 

too many items for Inlet Junction s

ERR_IJ_NO_USAGE 

Inlet Junction s has no inlet design assigned.

ERR_INLET_USAGE_SHAPE 

Inlet s cannot be used with the cross section of s.

◆ 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.

◆ HeatAttr

enum class openswmm::HeatAttr : int
strong

Which attribute an override row sets.

One enum spanning both config structs, so one row type serves both and the parser, the resolver and the serializer share a single table. COUNT_ is load-bearing: the attribute-name table in HeatComponent.cpp static_asserts against it, so adding an attribute here without teaching the parser and the writer breaks the build rather than silently dropping the new key on save.

Enumerator
ALBEDO 
SHADE_FACTOR 
SKY_VIEW 
EMISS_WATER 
EMISS_LANDCOVER 
LANDCOVER_TEMP 

NEW (PE2) — NaN means "use air temperature".

SED_THERMAL_DIFFUSIVITY 
SED_SOLUTE_DIFFUSIVITY 
SED_BED_THICKNESS 
SED_GROUND_DEPTH 
SED_GROUND_TEMP 
SED_HYPORHEIC_VELOCITY 
SED_DENSITY 
SED_SPECIFIC_HEAT 
COUNT_ 

◆ HeatElemKind

enum class openswmm::HeatElemKind : std::uint8_t
strong

What kind of element a flux is being evaluated for (D-PE1).

Enumerator
NODE 
LINK 
SUBCATCH 
LID 
CELL2D 

S4 (D-2DT5): a 2D surface cell. Carries no per-element override storage yet (S5 adds the CELL2D scope); the accessors' LINK/NODE tests fall through to the global, which is the safe answer.

◆ HeatScope

enum class openswmm::HeatScope : std::uint8_t
strong

Scope of one override row (D-PE3). Ordered by specificity.

Enumerator
GLOBAL 
TAG 
NODE 
LINK 

◆ HeatSource

enum class openswmm::HeatSource : int
strong

Source pathways with a configurable inlet temperature ([HEAT_SOURCES]). Order is the storage index of HeatConfigData::global_temp, and matches WaterAgeSource one-for-one so the two tables read the same way.

Enumerator
RAINFALL 

washoff runoff. H5b retired this row's second job: a LID drain now leaves at its own storage-layer temperature, not the rain's.

DWF 
GW 
RDII 
EXTERNAL_INFLOW 
IFACE 
INITIAL_STATE 

water in the network at t = 0

COUNT_ 

◆ HeatSubArea

enum class openswmm::HeatSubArea : int
strong

H5a: which subarea of a subcatchment a ponded temperature belongs to. Deliberately a SEPARATE enum from openswmm::SubArea (A3's), even though the members coincide today: nothing guarantees the age and heat tracks keep the same subarea decomposition, and a shared enum would make a future divergence a silent index error rather than a compile error.

Enumerator
IMPERV0 
IMPERV1 
PERV 
COUNT_ 

◆ 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 
CONSTANT 

Constant rate, capacity-bounded. 2D-only (no legacy [INFILTRATION] token); see plan §5.5.1.

◆ 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 

◆ LidLayer

enum class openswmm::LidLayer : int
strong

A4: layer index within a LID unit. These are exactly the four LIDGroupSoA fields that carry water state (surf_depth, pave_depth, soil_moist, stor_depth) and exactly the four terms LIDSolver::storedVolume() sums. A drainage mat has thickness and void but no depth field of its own — the green roof stores its mat water in stor_depth — so it is not a fifth layer here.

Enumerator
SURFACE 
PAVEMENT 
SOIL 
STORAGE 
COUNT_ 

◆ LidSpecies

enum class openswmm::LidSpecies : int
strong

Species rows carried on the LID layers.

Enumerator
AGE 
TEMPERATURE 

H5b. A4 reserved the stride for exactly this: one more row, no second array, no change to layer_index.

COUNT_ 

◆ 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)
Definition SimulationOptions.hpp:144
@ SEMI_IMPLICIT
Unified semi-implicit formulation.
Definition SimulationOptions.hpp:145
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 

◆ QualitySolverKind

enum class openswmm::QualitySolverKind : int
strong

Water-quality engine ([OPTIONS] QUALITY_SOLVER, master plan D-UT6).

Enumerator
LEGACY 

Legacy-parity CSTR mixing (QualityRouting.cpp)

EULERIAN_ARD 

Eulerian ARD on the FV cell mesh (all routing models)

LAGRANGIAN 

LARD segment transport. LIVE: LTD advection + junction/storage mixing (X2 8c141a5e), RWPT dispersion (X3b b9852cee), water age (X4 9f155227), exact-exponential KDECAY. NOT YET, each behind a live open() warning in SWMMEngine::open: MSX reactions on segments (L3), treatment interop, heat (H7). Storage mixing beyond CMSTR is also absent but is NOT warned — there is no input surface for it yet, so there is nothing to bypass. (This comment said "X1 skeleton dispatch only; transport lands in X2" until 2026-08-25, five rounds after X2 landed.) (plans/transport/LARD_AGE_EXPEDITE_SUBPLAN_2026-08-23.md, plans/LAGRANGIAN_QUALITY_STRATEGY.md)

◆ 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 text file — CSV, TSV, or PCSWMM TSF, auto-detected by content (new in 6.0.0, R08; extended per MULTICOLUMN_SERIES_SINGLE_READ plan)

◆ 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.

◆ ReactionAreaUnits

enum class openswmm::ReactionAreaUnits : int
strong
Enumerator
FT2 
M2 
CM2 

◆ ReactionCoupling

enum class openswmm::ReactionCoupling : int
strong
Enumerator
NONE 
FULL 

◆ ReactionExprForm

enum class openswmm::ReactionExprForm : int
strong
Enumerator
NONE 
RATE 
EQUIL 
FORMULA 

◆ ReactionRateUnits

enum class openswmm::ReactionRateUnits : int
strong
Enumerator
SEC 
MIN 
HR 
DAY 

◆ ReactionSolverKind

enum class openswmm::ReactionSolverKind : int
strong
Enumerator
EUL 
RK5 
ROS2 
BDF2 

◆ RouteModel

enum class openswmm::RouteModel : int
strong
Enumerator
STEADY 

Steady-state (pass-through)

KINWAVE 

Kinematic wave.

DYNWAVE 

Dynamic wave (St. Venant, implicit Picard)

FV 

Explicit conservative finite volume (Godunov)

◆ 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, implicit Picard)

FV 

Explicit conservative finite volume (Godunov, HLL/HLLC)

◆ 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)

◆ RxHydVar

enum class openswmm::RxHydVar : int
strong

Hydraulic variables available in reaction expressions (reactions plan §2; engines populate the evaluation environment at R6). Order is the ABI of the evaluator's hydvar array.

Enumerator

depth (ft)

flow (cfs)

velocity (ft/s)

RE 

Reynolds number.

US 

shear velocity (ft/s)

FF 

Darcy-Weisbach friction factor.

AV 

wetted surface area per volume (1/ft)

HRT 

hydraulic residence time (s)

DT 

reaction step (s)

TEMP 

local water temperature (degC); [REACTION_OPTIONS] TEMPERATURE constant when HEAT_TRANSPORT is off

COUNT_ 

◆ ShortwaveMode

enum class openswmm::ShortwaveMode : int
strong

Where incoming shortwave Jin comes from (plan §2.5, phase H6a).

The three spellings of [RADIATIVE_FLUXES] SHORTWAVE are mutually exclusive by parse error, not by precedence (D-H6a-3). A ladder would let a deck configuring two sources run plausibly while silently discarding one; the parser refuses instead, the way it already refuses an out-of-range fraction rather than clamping it.

Enumerator
CONSTANT 

SHORTWAVE GLOBAL <W/m²> — the H3 spelling.

TIMESERIES 

SHORTWAVE GLOBAL TIMESERIES <name> — measured.

COMPUTED 

SHORTWAVE GLOBAL COMPUTED — position + clear-sky.

◆ SpeciesKind

enum class openswmm::SpeciesKind : int
strong

Constituent kinds (master plan §4.1).

Enumerator
POLLUTANT 

legacy [POLLUTANTS] entry

RESERVED_AGE 

WATER_AGE (phase A1)

RESERVED_TEMPERATURE 

TEMPERATURE (phase H1)

MSX_BULK 

reactions component BULK species (R1)

MSX_WALL 

reactions component WALL species (R1)

◆ StorageShape

enum class openswmm::StorageShape : int8_t
strong

Storage-unit surface-area relation.

Values mirror legacy enum StorageType (src/legacy/engine/enums.h:833-847) ordinal-for-ordinal, so the int carried by the C API is the same code the legacy solver uses.

The relation determines how the StorageData a/b/c coefficients are read — they are overloaded:

  • FUNCTIONAL: Area = c + a*d^b (power law)
  • CYLINDRICAL..PYRAMIDAL: Area = c + a*d + b*d² (quadratic) See StorageGeometry.hpp for the raw-parameter → coefficient mapping.
See also
Legacy: StorageType in src/legacy/engine/enums.h
Enumerator
TABULAR 

Area vs. depth from a curve (StorageData::curve)

FUNCTIONAL 

Area = c + a*d^b.

CYLINDRICAL 

Elliptical cylinder (p1 = major axis, p2 = minor axis)

CONICAL 

Elliptical cone (p1, p2 = base axes, p3 = side slope)

PARABOLOID 

Elliptical paraboloid(p1, p2 = top axes, p3 = height ≠ 0)

PYRAMIDAL 

Rectangular pyramid (p1 = length, p2 = width, p3 = side slope)

◆ SubArea

enum class openswmm::SubArea : int
strong

Runtime age state shared by the engines (phase A1a).

node_age_vol_in is a RATE (age·ft³/s), the age analogue of nodes.qual_mass_in — loaders add q · age_source and the engine integrates it over its substeps. node_age/link_age are the PUBLISHED mean ages (seconds) the API and gates read. A3: subarea index within a subcatchment. Matches the RunoffSolver's three ponded depths (depth_imperv0/1/perv, Runoff.hpp:86-88) so the age array can be indexed the same way the water is.

Enumerator
IMPERV0 

impervious, no depression storage

IMPERV1 

impervious with depression storage

PERV 
COUNT_ 

◆ 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)

CURVE_WEIR 

Weir rating curve (legacy CurveTypeWords "WEIR")

◆ 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_UH_PARAMS_REPEATED 

parameters for same month provided more than once for Unit Hydrograph s

WARN_TIMESERIES_DUPLICATE_X 

Time Series s has duplicate x values.

WARN_BOUNDARY_OVERLAP 

boundary regions overlap for s

WARN_FILES_SLOT_UNSUPPORTED 

[FILES] s is not supported and was ignored

WARN_2D_OPTION_RETIRED 

[2D_OPTIONS] s retired with CVODE/ARKODE and was ignored

WARN_FV_OPTION_INERT 

s has no effect under FLOW_ROUTING FV

WARN_DW_OPTION_UNDER_FV 

s is a dynamic wave option and does not apply under FLOW_ROUTING FV

WARN_RAIN_CSV_ROWS_SKIPPED 

unreadable row(s) skipped in rainfall CSV for Rain Gage s

WARN_FV_SLOT_CAP 

slot width cap (5% of top width) overrides FV_SLOT_CELERITY for s

◆ WaterAgeSource

enum class openswmm::WaterAgeSource : int
strong

Source pathways with configurable initial age ([WATER_AGE_SOURCES]). Order is the storage index of WaterAgeConfigData::global_age.

Enumerator
RAINFALL 

washoff runoff (and LID drains until A4)

DWF 
GW 
RDII 
EXTERNAL_INFLOW 
IFACE 
INITIAL_STATE 

water in the network at t = 0

COUNT_ 

◆ 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 

◆ 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)

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 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:

◆ ci_upper()

char openswmm::ci_upper ( char c)
inlineconstexprnoexcept

ASCII-only uppercase fold; mirrors legacy hash.c UCHAR exactly.

Here is the caller graph for this function:

◆ discover_all_filters()

SWMM_ENGINE_API 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.
Note
Returns std::vector by value across the library boundary. Safe for consumers built with the same toolchain and C++ runtime as the engine (which is what the GUI and the in-tree CI do). A consumer built with a different MSVC runtime/STL must not call this directly.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ discover_plugins_by_id()

SWMM_ENGINE_API 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.
Note
Same cross-boundary std::vector caveat as discover_all_filters().
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 converts via strtod_l against a cached C locale, using a stack buffer for the null termination strtod requires.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ieq()

bool openswmm::ieq ( std::string_view a,
std::string_view b )
inlinenoexcept

Case-insensitive equality (ASCII fold), matching legacy samestr().

Here is the call graph for this function:
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 caller graph for this function:

◆ isSedimentAttr()

bool openswmm::isSedimentAttr ( HeatAttr a)
inlinenoexcept

True when the attribute belongs to SedimentConfig rather than RadiativeConfig. One predicate, so the two families cannot drift apart about which struct owns a key.

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.

◆ storage_shape_coeffs()

bool openswmm::storage_shape_coeffs ( StorageShape s,
double p1,
double p2,
double p3,
double & a,
double & b,
double & c )
inlinenoexcept

Derive the area-relation coefficients for a geometric shape.

Formulas are legacy node.c:713-752, verbatim:

     | shape       | a (=a1)          | b (=a2)            | c (=a0)   |
     |-------------|------------------|--------------------|-----------|
     | CYLINDRICAL | 0                | 0                  | π·A·B     |
     | CONICAL     | 2π·B·Z           | π·(B/A)·Z²         | π·A·B     |
     | PARABOLOID  | π·A·B / Z        | 0                  | 0         |
     | PYRAMIDAL   | 2·(L + W)·Z      | 4·Z²               | L·W       |

     where A = p1/2, B = p2/2 (semi-axes), Z = p3, L = p1, W = p2.
Parameters
[out]a,b,cUntouched when the shape is not geometric or params are invalid.
Returns
false when s is TABULAR/FUNCTIONAL (nothing to derive) or the params are invalid — callers treat the latter as an input error.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ storage_shape_from_keyword()

bool openswmm::storage_shape_from_keyword ( std::string_view kw,
StorageShape & out )
inlinenoexcept

Parse a shape keyword (caller upper-cases first).

Accepts PARABOLOID as an alias for the canonical PARABOLIC so a file written against the enumerator name still reads back.

Returns
false when the keyword is not a storage shape.
Here is the caller graph for this function:

◆ storage_shape_is_geometric()

bool openswmm::storage_shape_is_geometric ( StorageShape s)
inlineconstexprnoexcept

True when s is one of the four geometric shapes (i.e. its a/b/c are the quadratic coefficients, not TABULAR/FUNCTIONAL).

Here is the caller graph for this function:

◆ storage_shape_is_valid_code()

bool openswmm::storage_shape_is_valid_code ( int v)
inlineconstexprnoexcept

True when v is a valid StorageShape ordinal (C API boundary check).

◆ storage_shape_keyword()

const char * openswmm::storage_shape_keyword ( StorageShape s)
inlinenoexcept

Canonical INP/GeoPackage keyword for a shape.

Note
PARABOLOID's keyword is PARABOLIC — that is what legacy writes and reads (src/legacy/engine/text.h:195). The enumerator keeps the geometric name.
Here is the caller graph for this function:

◆ storage_shape_params_valid()

bool openswmm::storage_shape_params_valid ( StorageShape s,
double p1,
double p2,
double p3 )
inlinenoexcept

Validate raw shape parameters.

Mirrors legacy node.c:700-708 — length and width must be > 0, slope/height must be >= 0, and a PARABOLOID's height may not be 0 (it divides). TABULAR/FUNCTIONAL always validate (their params are unused here).

Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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.
Here is the caller graph for this function:

◆ 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:

Variable Documentation

◆ g_trace_rstep_sn

long openswmm::g_trace_rstep_sn
extern

◆ kLitersPerFt3

double openswmm::kLitersPerFt3 = 28.316846592
inlineconstexpr

Litres per cubic foot — the species-mass/s → internal conc·ft³/s source conversion (internal MSX store mass is concentration (mass/L) × ft³).

◆ kRxMaxStackDepth

int openswmm::kRxMaxStackDepth = 32
inlineconstexpr

Maximum operand-stack depth; the compiler rejects deeper expressions so the evaluator's fixed stack can never overflow.

◆ kStoragePi

double openswmm::kStoragePi = 3.141592653589793
inlineconstexpr

π to the precision legacy uses (src/legacy/engine/consts.h).