31#ifndef OPENSWMM_GAGES_H
32#define OPENSWMM_GAGES_H
155 const char* station_id);
427 double* times,
double* values,
#define SWMM_ENGINE_API
Definition openswmm_2d.h:53
void * SWMM_Engine
Opaque handle to an OpenSWMM Engine instance.
Definition openswmm_callbacks.h:51
OpenSWMM Engine — primary transparent C API (master header).
SWMM_GageRainType
Rain gage rainfall data format.
Definition openswmm_gages.h:51
@ SWMM_RAIN_VOLUME
Definition openswmm_gages.h:53
@ SWMM_RAIN_CUMULATIVE
Definition openswmm_gages.h:54
@ SWMM_RAIN_INTENSITY
Definition openswmm_gages.h:52
SWMM_ENGINE_API int swmm_gage_add(SWMM_Engine engine, const char *id)
Add a new rain gage to the model.
Definition openswmm_gages_impl.cpp:62
SWMM_ENGINE_API int swmm_gage_get_rainfall_series(SWMM_Engine engine, int idx, double *times, double *values, int count)
Copy a gage's resolved rainfall series.
Definition openswmm_gages_impl.cpp:399
SWMM_ENGINE_API int swmm_gage_get_rain_interval(SWMM_Engine engine, int idx, double *seconds)
Get the rainfall recording interval for a gage.
Definition openswmm_gages_impl.cpp:273
SWMM_ENGINE_API int swmm_gage_get_snow_factor(SWMM_Engine engine, int idx, double *factor)
Get the snow-catch deficiency correction factor (SCF) for a gage.
Definition openswmm_gages_impl.cpp:282
SWMM_ENGINE_API int swmm_gage_reload_rain_files(SWMM_Engine engine)
Re-read every FILE-source rain gage's data from disk.
Definition openswmm_gages_impl.cpp:432
SWMM_ENGINE_API int swmm_gage_get_timeseries(SWMM_Engine engine, int idx, char *buf, int buflen)
Get the assigned time series id for a TIMESERIES-source gage.
Definition openswmm_gages_impl.cpp:290
SWMM_GageDataSource
Rain gage data source type.
Definition openswmm_gages.h:43
@ SWMM_GAGE_TIMESERIES
Definition openswmm_gages.h:44
@ SWMM_GAGE_FILE
Definition openswmm_gages.h:45
SWMM_ENGINE_API int swmm_gage_set_snow_factor(SWMM_Engine engine, int idx, double factor)
Set the snow-catch deficiency correction factor (SCF) for a gage.
Definition openswmm_gages_impl.cpp:205
SWMM_ENGINE_API int swmm_gage_set_scale_factor(SWMM_Engine engine, int idx, double factor)
Set the rainfall scaling factor for a gage.
Definition openswmm_gages_impl.cpp:227
SWMM_ENGINE_API int swmm_gage_set_filename(SWMM_Engine engine, int idx, const char *path, const char *station_id)
Assign an external rainfall file as the data source for a gage.
Definition openswmm_gages_impl.cpp:127
SWMM_ENGINE_API int swmm_gage_count(SWMM_Engine engine)
Get the total number of rain gages in the model.
Definition openswmm_gages_impl.cpp:41
SWMM_ENGINE_API int swmm_gage_get_rainfall(SWMM_Engine engine, int idx, double *rainfall)
Get current rainfall rate at a gage (project rate units).
Definition openswmm_gages_impl.cpp:344
SWMM_ENGINE_API int swmm_gage_set_timeseries(SWMM_Engine engine, int idx, const char *ts_id)
Assign a time series as the data source for a gage.
Definition openswmm_gages_impl.cpp:114
SWMM_ENGINE_API int swmm_gage_set_rain_interval(SWMM_Engine engine, int idx, double seconds)
Set the rainfall recording interval for a gage.
Definition openswmm_gages_impl.cpp:96
SWMM_ENGINE_API int swmm_gage_get_file_column(SWMM_Engine engine, int idx, char *buf, int buflen)
Get the data column name for a multi-column rain-file gage.
Definition openswmm_gages_impl.cpp:314
SWMM_ENGINE_API int swmm_gage_get_scale_factor(SWMM_Engine engine, int idx, double *factor)
Get the rainfall scaling factor for a gage.
Definition openswmm_gages_impl.cpp:256
SWMM_ENGINE_API int swmm_gage_set_rain_type(SWMM_Engine engine, int idx, int type)
Set the rainfall data format for a gage.
Definition openswmm_gages_impl.cpp:86
SWMM_ENGINE_API int swmm_gage_get_rain_type(SWMM_Engine engine, int idx, int *type)
Get the rainfall data format for a gage.
Definition openswmm_gages_impl.cpp:240
SWMM_ENGINE_API int swmm_gage_index(SWMM_Engine engine, const char *id)
Look up a rain gage's zero-based index by its string identifier.
Definition openswmm_gages_impl.cpp:46
SWMM_ENGINE_API int swmm_gage_set_data_source(SWMM_Engine engine, int idx, int source)
Set the data source type for a gage.
Definition openswmm_gages_impl.cpp:105
SWMM_ENGINE_API int swmm_gage_get_file_format(SWMM_Engine engine, int idx, int *format)
Get the rain file format for a file-based gage.
Definition openswmm_gages_impl.cpp:323
SWMM_ENGINE_API int swmm_gage_set_station_id(SWMM_Engine engine, int idx, const char *station_id)
Set the station id for a file-based gage (standard SWMM rain file).
Definition openswmm_gages_impl.cpp:153
SWMM_ENGINE_API const char * swmm_gage_id(SWMM_Engine engine, int idx)
Get the string identifier of a rain gage by index.
Definition openswmm_gages_impl.cpp:51
SWMM_ENGINE_API int swmm_gage_set_rainfall(SWMM_Engine engine, int idx, double rainfall)
Override rainfall at a gage for the current timestep.
Definition openswmm_gages_impl.cpp:352
SWMM_ENGINE_API int swmm_gage_get_rainfall_bulk(SWMM_Engine engine, double *buf, int count)
Get current rainfall rates for all gages in a single call.
Definition openswmm_gages_impl.cpp:365
SWMM_ENGINE_API int swmm_gage_get_rainfall_series_count(SWMM_Engine engine, int idx, int *count)
Number of entries in a gage's resolved rainfall series.
Definition openswmm_gages_impl.cpp:387
SWMM_ENGINE_API int swmm_gage_set_file_column(SWMM_Engine engine, int idx, const char *column)
Set the data column name for a multi-column rain-file gage.
Definition openswmm_gages_impl.cpp:166
SWMM_ENGINE_API int swmm_gage_get_station_id(SWMM_Engine engine, int idx, char *buf, int buflen)
Get the station id for a file-based gage.
Definition openswmm_gages_impl.cpp:305
SWMM_ENGINE_API int swmm_gage_set_file_format(SWMM_Engine engine, int idx, int format)
Set the rain file format for a file-based gage.
Definition openswmm_gages_impl.cpp:181
SWMM_ENGINE_API int swmm_gage_set_rain_units(SWMM_Engine engine, int idx, int units)
Set the rain-depth units declared for a file-based gage.
Definition openswmm_gages_impl.cpp:217
SWMM_ENGINE_API int swmm_gage_get_rain_units(SWMM_Engine engine, int idx, int *units)
Get the rain-depth units declared for a file-based gage.
Definition openswmm_gages_impl.cpp:332
SWMM_ENGINE_API int swmm_gage_rename(SWMM_Engine engine, int idx, const char *newId)
Rename the rain gage at idx to newId. Returns SWMM_ERR_BADPARAM if newId is null, empty,...
Definition openswmm_gages_impl.cpp:374
SWMM_ENGINE_API int swmm_gage_get_data_source(SWMM_Engine engine, int idx, int *source)
Get the data source type for a gage.
Definition openswmm_gages_impl.cpp:248