31#ifndef OPENSWMM_GAGES_H
32#define OPENSWMM_GAGES_H
192 const char* station_id);
580 double* values,
int count);
#define SWMM_ENGINE_API
Definition openswmm_2d.h:62
void * SWMM_Engine
Opaque handle to an OpenSWMM Engine instance.
Definition openswmm_callbacks.h:55
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:67
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:439
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:302
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:311
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:475
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:320
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:217
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:241
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:138
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:42
SWMM_ENGINE_API int swmm_gage_get_rainfall(SWMM_Engine engine, int idx, double *rainfall)
Read the current gage rainfall intensity.
Definition openswmm_gages_impl.cpp:378
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:123
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:105
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:346
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:273
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:94
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:255
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:48
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:114
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:356
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:165
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:54
SWMM_ENGINE_API int swmm_gage_set_rainfall(SWMM_Engine engine, int idx, double rainfall)
Prescribe nonnegative gage rainfall for the next physical step.
Definition openswmm_gages_impl.cpp:387
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:403
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:427
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:178
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:336
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:193
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:230
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:365
SWMM_ENGINE_API int swmm_gage_rename(SWMM_Engine engine, int idx, const char *newId)
Rename an editable gage in the model name index.
Definition openswmm_gages_impl.cpp:413
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:264