|
SWMM
5.2.0
Documentation
|
Prototypes for SWMM5 API functions. More...
#include "swmm5_export.h"Go to the source code of this file.
Typedefs | |
| typedef void(* | progress_callback) (double progress) |
| Callback function for progress reporting. | |
Functions | |
| int EXPORT_SWMM_SOLVER_API | swmm_run (const char *inputFile, const char *reportFile, const char *outputFile) |
| Run a SWMM simulation with the given input file, report file, and output file. | |
| int EXPORT_SWMM_SOLVER_API | swmm_run_with_callback (const char *inputFile, const char *reportFile, const char *outputFile, progress_callback callback) |
| Run a SWMM simulation with the given input file, report file, and output file with a progress callback. | |
| int EXPORT_SWMM_SOLVER_API | swmm_open (const char *inputFile, const char *reportFile, const char *outputFile) |
| Open a SWMM simulation with the given input file, report file, and output file. | |
| int EXPORT_SWMM_SOLVER_API | swmm_start (int saveFlag) |
| Start a SWMM simulation with the given save flag. | |
| int EXPORT_SWMM_SOLVER_API | swmm_step (double *elapsedTime) |
| Perform a SWMM simulation step and return the elapsed time. | |
| int EXPORT_SWMM_SOLVER_API | swmm_stride (int strideStep, double *elapsedTime) |
| Perform a SWMM simulation step with a stride step and return the elapsed time. | |
| int EXPORT_SWMM_SOLVER_API | swmm_useHotStart (const char *hotStartFile) |
| Set hotstart file for SWMM simulation. | |
| int EXPORT_SWMM_SOLVER_API | swmm_saveHotStart (const char *hotStartFile) |
| Save hotstart file for SWMM simulation at current time. | |
| int EXPORT_SWMM_SOLVER_API | swmm_end (void) |
| End a SWMM simulation. | |
| int EXPORT_SWMM_SOLVER_API | swmm_report (void) |
| Writes simulation results to the report file. | |
| int EXPORT_SWMM_SOLVER_API | swmm_close (void) |
| Close a SWMM simulation. | |
| int EXPORT_SWMM_SOLVER_API | swmm_getMassBalErr (float *runoffErr, float *flowErr, float *qualErr) |
| Get the mass balance errors for a SWMM simulation. | |
| int EXPORT_SWMM_SOLVER_API | swmm_getVersion (void) |
| Get the version of the SWMM engine. | |
| int EXPORT_SWMM_SOLVER_API | swmm_getError (char *errMsg, int msgLen) |
| Retrieves the code number and text of the error condition that caused SWMM to abort its analysis. | |
| int EXPORT_SWMM_SOLVER_API | swmm_getErrorFromCode (int error_code, char *outErrMsg[1024]) |
| Retrieves the text of the error message that corresponds to the error code number. | |
| int EXPORT_SWMM_SOLVER_API | swmm_getWarnings (void) |
| Gets the number of warnings issued during a simulation. | |
| int EXPORT_SWMM_SOLVER_API | swmm_getCount (int objType) |
| Retrieves the number of objects of a specific type. | |
| int EXPORT_SWMM_SOLVER_API | swmm_getName (int objType, int index, char *name, int size) |
| Retrieves the ID name of an object. | |
| int EXPORT_SWMM_SOLVER_API | swmm_getIndex (int objType, const char *name) |
| Retrieves the index of a named object. | |
| double EXPORT_SWMM_SOLVER_API | swmm_getValue (int property, int index) |
| Get the value of a property for an object of a given property in the SWMM model. | |
| double EXPORT_SWMM_SOLVER_API | swmm_getValueExpanded (int objType, int property, int index, int subIndex) |
| Get the value of a property for an object given property, index, and subindex in the SWMM model. | |
| int EXPORT_SWMM_SOLVER_API | swmm_setValue (int property, int index, double value) |
| Set the value of a property for an object of a given property and index in the SWMM model. | |
| int EXPORT_SWMM_SOLVER_API | swmm_setValueExpanded (int objType, int property, int index, int subIndex, double value) |
| Set the value of a property for an object given property, index, and subindex in the SWMM model. | |
| double EXPORT_SWMM_SOLVER_API | swmm_getSavedValue (int property, int index, int period) |
| Get saved value of. | |
| void EXPORT_SWMM_SOLVER_API | swmm_writeLine (const char *line) |
| Write a line of text to the SWMM report file. | |
| void EXPORT_SWMM_SOLVER_API | swmm_decodeDate (double date, int *year, int *month, int *day, int *hour, int *minute, int *second, int *dayOfWeek) |
| Decode double date value into year, month, day, hour, minute, second, and day of week. | |
| double EXPORT_SWMM_SOLVER_API | swmm_encodeDate (int year, int month, int day, int hour, int minute, int second) |
| Encode date values into a double date value. | |
Prototypes for SWMM5 API functions.
This file contains the prototypes for SWMM5 API functions.
| progress_callback |
Callback function for progress reporting.
| [in] | progress | Progress value between 0 and 1 |
| enum swmm_API_Errors |
Enumeration of API errors used in SWMM5.
| enum swmm_GageProperty |
| enum swmm_LinkProperty |
Enumeration of link properties used in SWMM5.
| enum swmm_LinkType |
| enum swmm_NodeProperty |
Enumeration of node properties used in SWMM5.
| enum swmm_NodeType |
| enum swmm_Object |
Enumeration of object types used in SWMM5.
Enumeration of subcatchment properties used in SWMM5.
| enum swmm_SystemProperty |
Enumeration of system properties used in SWMM5.
| int EXPORT_SWMM_SOLVER_API swmm_close | ( | void | ) |
Close a SWMM simulation.
Close a SWMM simulation.
Close a SWMM simulation.
| void EXPORT_SWMM_SOLVER_API swmm_decodeDate | ( | double | date, |
| int * | year, | ||
| int * | month, | ||
| int * | day, | ||
| int * | hour, | ||
| int * | minute, | ||
| int * | second, | ||
| int * | dayOfWeek | ||
| ) |
Decode double date value into year, month, day, hour, minute, second, and day of week.
| [in] | date | Date value |
| [out] | year | Year |
| [out] | month | Month |
| [out] | day | Day |
| [out] | hour | Hour |
| [out] | minute | Minute |
| [out] | second | Second |
| [out] | dayOfWeek | Day of week (0=Sunday, 1=Monday, ..., 6=Saturday) |
Decode double date value into year, month, day, hour, minute, second, and day of week.
| [in] | date | Date value |
| [out] | year | Year |
| [out] | month | Month |
| [out] | day | Day |
| [out] | hour | Hour |
| [out] | minute | Minute |
| [out] | second | Second |
| [out] | dayOfWeek | Day of week (0=Sunday, 1=Monday, ..., 6=Saturday) |
Decode double date value into year, month, day, hour, minute, second, and day of week.
| double EXPORT_SWMM_SOLVER_API swmm_encodeDate | ( | int | year, |
| int | month, | ||
| int | day, | ||
| int | hour, | ||
| int | minute, | ||
| int | second | ||
| ) |
Encode date values into a double date value.
| [in] | year | Year |
| [in] | month | Month |
| [in] | day | Day |
| [in] | hour | Hour |
| [in] | minute | Minute |
| [in] | second | Second |
Encode date values into a double date value.
| [in] | year | Year |
| [in] | month | Month |
| [in] | day | Day |
| [in] | hour | Hour |
| [in] | minute | Minute |
| [in] | second | Second |
Encode date values into a double date value.
| int EXPORT_SWMM_SOLVER_API swmm_end | ( | void | ) |
End a SWMM simulation.
End a SWMM simulation.
End a SWMM simulation.
| int EXPORT_SWMM_SOLVER_API swmm_getCount | ( | int | objType | ) |
Retrieves the number of objects of a specific type.
| [in] | objType | Type of SWMM object |
Retrieves the number of objects of a specific type.
| [in] | objType | Type of SWMM object |
Retrieves the number of objects of a specific type.
| int EXPORT_SWMM_SOLVER_API swmm_getError | ( | char * | errMsg, |
| int | msgLen | ||
| ) |
Retrieves the code number and text of the error condition that caused SWMM to abort its analysis.
| [out] | errMsg | Error message text |
| [in] | msgLen | Maximum size of errMsg |
Retrieves the code number and text of the error condition that caused SWMM to abort its analysis.
| [out] | errMsg | Error message text |
| [in] | msgLen | Maximum size of errMsg |
Retrieves the code number and text of the error condition that caused SWMM to abort its analysis.
| int EXPORT_SWMM_SOLVER_API swmm_getErrorFromCode | ( | int | errorCode, |
| char * | outErrMsg[1024] | ||
| ) |
Retrieves the text of the error message that corresponds to the error code number.
| [in] | errorCode | Error code number |
| [out] | outErrMsg | Error message text |
Retrieves the text of the error message that corresponds to the error code number.
| [in] | errorCode | Error code number |
| [out] | outErrMsg | Error message text |
Retrieves the text of the error message that corresponds to the error code number.
| int EXPORT_SWMM_SOLVER_API swmm_getIndex | ( | int | objType, |
| const char * | name | ||
| ) |
Retrieves the index of a named object.
| [in] | objType | Type of SWMM object |
| [in] | name | Object name |
Retrieves the index of a named object.
| [in] | objType | Type of SWMM object |
| [in] | name | Object name |
Retrieves the index of a named object.
| int EXPORT_SWMM_SOLVER_API swmm_getMassBalErr | ( | float * | runoffErr, |
| float * | flowErr, | ||
| float * | qualErr | ||
| ) |
Get the mass balance errors for a SWMM simulation.
| [out] | runoffErr | Runoff error (percent) |
| [out] | flowErr | Flow error (percent) |
| [out] | qualErr | Quality error (percent) |
Get the mass balance errors for a SWMM simulation.
| [out] | runoffErr | Runoff error (percent) |
| [out] | flowErr | Flow error (percent) |
| [out] | qualErr | Quality error (percent) |
Get the mass balance errors for a SWMM simulation.
| int EXPORT_SWMM_SOLVER_API swmm_getName | ( | int | objType, |
| int | index, | ||
| char * | name, | ||
| int | size | ||
| ) |
Retrieves the ID name of an object.
| [in] | objType | Type of SWMM object |
| [in] | index | Object index |
| [out] | name | Object name |
| [in] | size | Size of the name array |
Retrieves the ID name of an object.
| [in] | objType | Type of SWMM object |
| [in] | index | Object index |
| [out] | name | Object name |
| [in] | size | Size of the name array |
Retrieves the ID name of an object.
| double EXPORT_SWMM_SOLVER_API swmm_getSavedValue | ( | int | property, |
| int | index, | ||
| int | period | ||
| ) |
Get saved value of.
| [in] | property | Property type |
| [in] | index | Object index |
| [in] | period | Time period index |
Get saved value of.
| [in] | property | Property type |
| [in] | index | Object index |
| [in] | period | Time period index |
Get saved value of.
| double EXPORT_SWMM_SOLVER_API swmm_getValue | ( | int | property, |
| int | index | ||
| ) |
Get the value of a property for an object of a given property in the SWMM model.
| [in] | property | Property type |
| [in] | index | Object index |
Get the value of a property for an object of a given property in the SWMM model.
| [in] | property | Property type |
| [in] | index | Object index |
Get the value of a property for an object of a given property in the SWMM model.
| double EXPORT_SWMM_SOLVER_API swmm_getValueExpanded | ( | int | objType, |
| int | property, | ||
| int | index, | ||
| int | subIndex | ||
| ) |
Get the value of a property for an object given property, index, and subindex in the SWMM model.
| [in] | objType | Object type |
| [in] | property | Property type |
| [in] | index | Object index |
| [in] | subIndex | Optional Subindex for the property |
Get the value of a property for an object given property, index, and subindex in the SWMM model.
| [in] | objType | Object type |
| [in] | property | Property type |
| [in] | index | Object index |
| [in] | subIndex | Optional Subindex for the property |
Get the value of a property for an object given property, index, and subindex in the SWMM model.
| int EXPORT_SWMM_SOLVER_API swmm_getVersion | ( | void | ) |
Get the version of the SWMM engine.
Get the version of the SWMM engine.
Get the version of the SWMM engine.
| int EXPORT_SWMM_SOLVER_API swmm_getWarnings | ( | void | ) |
Gets the number of warnings issued during a simulation.
Gets the number of warnings issued during a simulation.
Gets the number of warnings issued during a simulation.
| int EXPORT_SWMM_SOLVER_API swmm_open | ( | const char * | inputFile, |
| const char * | reportFile, | ||
| const char * | outputFile | ||
| ) |
Open a SWMM simulation with the given input file, report file, and output file.
| [in] | inputFile | Path to the input file |
| [in] | reportFile | Path to the report file |
| [in] | outputFile | Path to the output file |
Open a SWMM simulation with the given input file, report file, and output file.
| [in] | inputFile | Path to the input file |
| [in] | reportFile | Path to the report file |
| [in] | outputFile | Path to the output file |
Open a SWMM simulation with the given input file, report file, and output file.
| int EXPORT_SWMM_SOLVER_API swmm_report | ( | void | ) |
Writes simulation results to the report file.
Writes simulation results to the report file.
Writes simulation results to the report file.
| int EXPORT_SWMM_SOLVER_API swmm_run | ( | const char * | inputFile, |
| const char * | reportFile, | ||
| const char * | outputFile | ||
| ) |
Run a SWMM simulation with the given input file, report file, and output file.
| [in] | inputFile | Path to the input file |
| [in] | reportFile | Path to the report file |
| [in] | outputFile | Path to the output file |
Run a SWMM simulation with the given input file, report file, and output file.
| [in] | inputFile | Path to the input file |
| [in] | reportFile | Path to the report file |
| [in] | outputFile | Path to the output file |
Run a SWMM simulation with the given input file, report file, and output file.
| int EXPORT_SWMM_SOLVER_API swmm_run_with_callback | ( | const char * | inputFile, |
| const char * | reportFile, | ||
| const char * | outputFile, | ||
| progress_callback | callback | ||
| ) |
Run a SWMM simulation with the given input file, report file, and output file with a progress callback.
| [in] | inputFile | Path to the input file |
| [in] | reportFile | Path to the report file |
| [in] | outputFile | Path to the output file |
| [in] | callback | Progress callback function |
Run a SWMM simulation with the given input file, report file, and output file with a progress callback.
| [in] | inputFile | Path to the input file |
| [in] | reportFile | Path to the report file |
| [in] | outputFile | Path to the output file |
| [in] | callback | Progress callback function |
Run a SWMM simulation with the given input file, report file, and output file with a progress callback.
| int EXPORT_SWMM_SOLVER_API swmm_saveHotStart | ( | const char * | hotStartFile | ) |
Save hotstart file for SWMM simulation at current time.
| [in] | hotStartFile | Path to the hotstart file |
Save hotstart file for SWMM simulation at current time.
| [in] | hotStartFile | Path to the hotstart file |
Save hotstart file for SWMM simulation at current time.
| int EXPORT_SWMM_SOLVER_API swmm_setValue | ( | int | property, |
| int | index, | ||
| double | value | ||
| ) |
Set the value of a property for an object of a given property and index in the SWMM model.
| [in] | property | Property type |
| [in] | index | Object index |
| [in] | value | Property value |
Set the value of a property for an object of a given property and index in the SWMM model.
| [in] | property | Property type |
| [in] | index | Object index |
| [in] | value | Property value |
Set the value of a property for an object of a given property and index in the SWMM model.
| int EXPORT_SWMM_SOLVER_API swmm_setValueExpanded | ( | int | objType, |
| int | property, | ||
| int | index, | ||
| int | subIndex, | ||
| double | value | ||
| ) |
Set the value of a property for an object given property, index, and subindex in the SWMM model.
| [in] | objType | Object type |
| [in] | property | Property type |
| [in] | index | Object index |
| [in] | subIndex | Optional Subindex for the property |
| [in] | value | Property value |
Set the value of a property for an object given property, index, and subindex in the SWMM model.
| [in] | objType | Object type |
| [in] | property | Property type |
| [in] | index | Object index |
| [in] | subIndex | Optional Subindex for the property |
| [in] | value | Property value |
Set the value of a property for an object given property, index, and subindex in the SWMM model.
| int EXPORT_SWMM_SOLVER_API swmm_start | ( | int | saveFlag | ) |
Start a SWMM simulation with the given save flag.
| [in] | saveFlag | Flag to save simulation |
Start a SWMM simulation with the given save flag.
| [in] | saveFlag | Flag to save simulation |
Start a SWMM simulation with the given save flag.
| int EXPORT_SWMM_SOLVER_API swmm_step | ( | double * | elapsedTime | ) |
Perform a SWMM simulation step and return the elapsed time.
| [out] | elapsedTime | Elapsed time in decimal days |
Perform a SWMM simulation step and return the elapsed time.
End a SWMM simulation.
| int EXPORT_SWMM_SOLVER_API swmm_stride | ( | int | strideStep, |
| double * | elapsedTime | ||
| ) |
Perform a SWMM simulation step with a stride step and return the elapsed time.
| [in] | strideStep | Stride step |
| [out] | elapsedTime | Elapsed time |
Perform a SWMM simulation step with a stride step and return the elapsed time.
| [in] | strideStep | Stride step |
| [out] | elapsedTime | Elapsed time |
Perform a SWMM simulation step with a stride step and return the elapsed time.
| int EXPORT_SWMM_SOLVER_API swmm_useHotStart | ( | const char * | hotStartFile | ) |
Set hotstart file for SWMM simulation.
Sets the hotstart file to use for simulation. Errors does not terminate simulation unless there is a prior terminating error.
| [in] | hotStartFile | Path to the hotstart file |
Set hotstart file for SWMM simulation.
Sets the hotstart file to use for simulation. Errors does not terminate simulation unless there is a prior terminating error.
| [in] | hotStartFile | Path to the hotstart file |
Set hotstart file for SWMM simulation.
| void EXPORT_SWMM_SOLVER_API swmm_writeLine | ( | const char * | line | ) |
Write a line of text to the SWMM report file.
| [in] | line | Line of text |
Write a line of text to the SWMM report file.
| [in] | line | Line of text |
Write a line of text to the SWMM report file.