|
SWMM
5.2.0
Documentation
|
Source code providing an API for reading SWMM binary output files. More...
#include <stdio.h>#include <stdlib.h>#include <string.h>#include "errormanager.h"#include "swmm_output.h"#include "messages.txt"Classes | |
| struct | IDentry |
| Structure for element names. More... | |
| struct | data_t |
Macros | |
| #define | F_OFF off_t |
| 8 byte / 64 bit integer for large file support on Unix-like systems | |
| #define | INT4 int |
| Must be a 4 byte / 32 bit integer type. | |
| #define | REAL4 float |
| Must be a 4 byte / 32 bit real type. | |
| #define | RECORDSIZE 4 |
| Memory alignment 4 byte word size for both int and real types. | |
| #define | DATESIZE 8 |
| #define | NELEMENTTYPES 5 |
| Number of element types. | |
| #define | MEMCHECK(x) (((x) == NULL) ? 414 : 0) |
| Check if memory allocation was successful. | |
| #define | ERR(code, string) |
| #define | FSEEK64 fseeko |
| #define | FTELL64 ftello |
Typedefs | |
| typedef struct IDentry | idEntry |
Functions | |
| void | errorLookup (int errcode, char *errmsg, int length) |
| Error lookup function. | |
| int | validateFile (data_t *p_data) |
| Validate the output file. | |
| void | initElementNames (data_t *p_data) |
| Initialize element names. | |
| double | getTimeValue (data_t *p_data, int timeIndex) |
| Get time value. | |
| float | getSubcatchValue (data_t *p_data, int timeIndex, int subcatchIndex, SMO_subcatchAttribute attr) |
| Get subcatchment value. | |
| float | getNodeValue (data_t *p_data, int timeIndex, int nodeIndex, SMO_nodeAttribute attr) |
| Get node value. | |
| float | getLinkValue (data_t *p_data, int timeIndex, int linkIndex, SMO_linkAttribute attr) |
| Get link value. | |
| float | getSystemValue (data_t *p_data, int timeIndex, SMO_systemAttribute attr) |
| Get system value. | |
| int | _fopen (FILE **f, const char *name, const char *mode) |
| Open file for reading with error handling. | |
| int | _fseek (FILE *stream, F_OFF offset, int whence) |
| Seek to position in file with error handling. | |
| F_OFF | _ftell (FILE *stream) |
| Get current position in file with error handling. | |
| float * | newFloatArray (int n) |
| Allocate memory for float array. | |
| int * | newIntArray (int n) |
| Allocate memory for integer array. | |
| char * | newCharArray (int n) |
| Allocate memory for character array. | |
| int EXPORT_SWMM_OUTPUT_API | SMO_init (SMO_Handle *p_handle) |
| Initializes the SWMM output file handle. | |
| int EXPORT_SWMM_OUTPUT_API | SMO_open (SMO_Handle p_handle, const char *path) |
| Opens a SWMM output file. | |
| int EXPORT_SWMM_OUTPUT_API | SMO_close (SMO_Handle *p_handle) |
| Closes the SWMM output file handle. | |
| int EXPORT_SWMM_OUTPUT_API | SMO_getVersion (SMO_Handle p_handle, int *version) |
| Retrieves the model version number that created the output file. | |
| int EXPORT_SWMM_OUTPUT_API | SMO_getProjectSize (SMO_Handle p_handle, int **elementCount, int *length) |
| int EXPORT_SWMM_OUTPUT_API | SMO_getUnits (SMO_Handle p_handle, int **unitFlag, int *length) |
| Retrieves the unit system used in the SWMM model. | |
| int EXPORT_SWMM_OUTPUT_API | SMO_getFlowUnits (SMO_Handle p_handle, int *unitFlag) |
| Returns unit flag for flow. | |
| int EXPORT_SWMM_OUTPUT_API | SMO_getPollutantUnits (SMO_Handle p_handle, int **unitFlag, int *length) |
| Returns unit flag for pollutant. Concentration units are located after the pollutant ID names and before the object properties start, and are stored for each pollutant. They're stored as 4-byte integers with the following codes: 0: mg/L 1: ug/L 2: count/L. | |
| int EXPORT_SWMM_OUTPUT_API | SMO_getStartDate (SMO_Handle p_handle, double *date) |
| Retrieves the start date of the simulation. | |
| int EXPORT_SWMM_OUTPUT_API | SMO_getTimes (SMO_Handle p_handle, SMO_time code, int *time) |
| Retrieves the number of reporting periods in the simulation. | |
| int EXPORT_SWMM_OUTPUT_API | SMO_getElementName (SMO_Handle p_handle, SMO_elementType type, int index, char **name, int *length) |
| Retrieves the element name by index and type from the SWMM output file. | |
| int EXPORT_SWMM_OUTPUT_API | SMO_getNumVars (SMO_Handle p_handle, SMO_elementType type, int *count) |
| Retrieves the number of variables for a given element type that are stored in the output file. | |
| int EXPORT_SWMM_OUTPUT_API | SMO_getVarCode (SMO_Handle p_handle, SMO_elementType type, int varIndex, int *varCode) |
| Retrieves the variable code for a given element type and variable index that is stored in the output file. | |
| int EXPORT_SWMM_OUTPUT_API | SMO_getVarCodes (SMO_Handle p_handle, SMO_elementType type, int **varCodes, int *size) |
| Retrieves the variable codes for a given element type that are stored in the output file. | |
| int EXPORT_SWMM_OUTPUT_API | SMO_getNumProperties (SMO_Handle p_handle, SMO_elementType type, int *count) |
| Retrieves the number of properties for a given element type that are stored in the output file. | |
| int EXPORT_SWMM_OUTPUT_API | SMO_getPropertyCode (SMO_Handle p_handle, SMO_elementType type, int propertyIndex, int *propertyCode) |
| Retrieves the property code for a given element type and property index that is stored in the output file. | |
| int EXPORT_SWMM_OUTPUT_API | SMO_getPropertyCodes (SMO_Handle p_handle, SMO_elementType type, int **propertyCodes, int *size) |
| Retrieves the property codes for a given element type that are stored in the output file. | |
| int EXPORT_SWMM_OUTPUT_API | SMO_getSubcatchSeries (SMO_Handle p_handle, int subcatchIndex, SMO_subcatchAttribute attr, int startPeriod, int endPeriod, float **outValueArray, int *length) |
| Retrieves subcatchment attribute values for a given time period and attribute type. | |
| int EXPORT_SWMM_OUTPUT_API | SMO_getPropertyValue (SMO_Handle p_handle, SMO_elementType type, int propertyIndex, int elementIndex, float *value) |
| Retrieves the value of a property for a given element type, property index, and element index. | |
| int EXPORT_SWMM_OUTPUT_API | SMO_getPropertyValues (SMO_Handle p_handle, SMO_elementType type, int elementIndex, float **outValueArray, int *length) |
| Retrieves the value of a property for a given element type, property index, and element index. | |
| int EXPORT_SWMM_OUTPUT_API | SMO_getNodeSeries (SMO_Handle p_handle, int nodeIndex, SMO_nodeAttribute attr, int startPeriod, int endPeriod, float **outValueArray, int *length) |
| Retrieves node attribute values for a given time period and attribute type. | |
| int EXPORT_SWMM_OUTPUT_API | SMO_getLinkSeries (SMO_Handle p_handle, int linkIndex, SMO_linkAttribute attr, int startPeriod, int endPeriod, float **outValueArray, int *length) |
| Retrieves link attribute values for a given time period and attribute type. | |
| int EXPORT_SWMM_OUTPUT_API | SMO_getSystemSeries (SMO_Handle p_handle, SMO_systemAttribute attr, int startPeriod, int endPeriod, float **outValueArray, int *length) |
| Retrieves system attribute values for a given time period and attribute type. | |
| int EXPORT_SWMM_OUTPUT_API | SMO_getSubcatchAttribute (SMO_Handle p_handle, int periodIndex, SMO_subcatchAttribute attr, float **outValueArray, int *length) |
| Retrieves subcatchment attribute values for a given time period and attribute type. | |
| int EXPORT_SWMM_OUTPUT_API | SMO_getNodeAttribute (SMO_Handle p_handle, int periodIndex, SMO_nodeAttribute attr, float **outValueArray, int *length) |
| Retrieves node attribute values for a given time period and attribute type. | |
| int EXPORT_SWMM_OUTPUT_API | SMO_getLinkAttribute (SMO_Handle p_handle, int periodIndex, SMO_linkAttribute attr, float **outValueArray, int *length) |
| Retrieves link attribute values for a given time period and attribute type. | |
| int EXPORT_SWMM_OUTPUT_API | SMO_getSystemAttribute (SMO_Handle p_handle, int periodIndex, SMO_systemAttribute attr, float **outValueArray, int *length) |
| Retrieves system attribute values for a given time period and attribute type. | |
| int EXPORT_SWMM_OUTPUT_API | SMO_getSubcatchResult (SMO_Handle p_handle, int periodIndex, int subcatchIndex, float **outValueArray, int *arrayLength) |
| Retrieves subcatchment result values for a given time period. | |
| int EXPORT_SWMM_OUTPUT_API | SMO_getNodeResult (SMO_Handle p_handle, int periodIndex, int nodeIndex, float **outValueArray, int *arrayLength) |
| Retrieves node result values for a given time period. | |
| int EXPORT_SWMM_OUTPUT_API | SMO_getLinkResult (SMO_Handle p_handle, int periodIndex, int linkIndex, float **outValueArray, int *arrayLength) |
| Retrieves link result values for a given time period. | |
| int EXPORT_SWMM_OUTPUT_API | SMO_getSystemResult (SMO_Handle p_handle, int periodIndex, int dummyIndex, float **outValueArray, int *arrayLength) |
| Retrieves system result values for a given time period. | |
| void EXPORT_SWMM_OUTPUT_API | SMO_free (void **array) |
| void EXPORT_SWMM_OUTPUT_API | SMO_clearError (SMO_Handle p_handle) |
| Clears the error status of the SMO_Handle. | |
| int EXPORT_SWMM_OUTPUT_API | SMO_checkError (SMO_Handle p_handle, char **msg_buffer) |
| Checks for error in the error handle and copies the error message to the message buffer. | |
Source code providing an API for reading SWMM binary output files.
| #define DATESIZE 8 |
| #define ERR | ( | code, | |
| string | |||
| ) |
| #define F_OFF off_t |
8 byte / 64 bit integer for large file support on Unix-like systems
| #define FSEEK64 fseeko |
| #define FTELL64 ftello |
| #define INT4 int |
Must be a 4 byte / 32 bit integer type.
| #define MEMCHECK | ( | x | ) | (((x) == NULL) ? 414 : 0) |
Check if memory allocation was successful.
| #define NELEMENTTYPES 5 |
Number of element types.
| #define REAL4 float |
Must be a 4 byte / 32 bit real type.
| #define RECORDSIZE 4 |
Memory alignment 4 byte word size for both int and real types.
| void errorLookup | ( | int | errcode, |
| char * | dest_msg, | ||
| int | dest_len | ||
| ) |
Error lookup function.
Takes error code and returns error message.
| [in] | errcode | Error code |
| [out] | errmsg | Error message |
| [in] | length | Length of error message |
| [in] | errcode | Error code |
| [out] | dest_msg | Destination message buffer |
| [in] | dest_len | Length of destination message buffer |
| int EXPORT_SWMM_OUTPUT_API SMO_checkError | ( | SMO_Handle | p_handle, |
| char ** | msg_buffer | ||
| ) |
Checks for error in the error handle and copies the error message to the message buffer.
Checks for error in the error handle and copies the error message to the message buffer.
| [in] | p_handle | Pointer to opaque SMO_Handle |
| [out] | msg_buffer | Error message buffer |
Checks for error in the error handle and copies the error message to the message buffer.
| void EXPORT_SWMM_OUTPUT_API SMO_clearError | ( | SMO_Handle | p_handle | ) |
Clears the error status of the SMO_Handle.
Clears the error status of the SMO_Handle.
| [in] | p_handle | Opaque pointer to SWMM output file handle |
Clears the error status of the SMO_Handle.
| int EXPORT_SWMM_OUTPUT_API SMO_close | ( | SMO_Handle * | p_handle | ) |
Closes the SWMM output file handle.
Closes the SWMM output file handle.
| [in] | p_handle | Opaque pointer to SWMM output file handle |
Closes the SWMM output file handle.
| void EXPORT_SWMM_OUTPUT_API SMO_free | ( | void ** | array | ) |
Frees memory allocated by the API for the outValueArray.
| int EXPORT_SWMM_OUTPUT_API SMO_getElementName | ( | SMO_Handle | p_handle, |
| SMO_elementType | type, | ||
| int | index, | ||
| char ** | name, | ||
| int * | length | ||
| ) |
Retrieves the element name by index and type from the SWMM output file.
Retrieves the element name by index and type from the SWMM output file.
| [in] | p_handle | Opaque pointer to SWMM output file handle |
| [in] | type | The type of element |
| [in] | elementIndex | The index of the element |
| [out] | elementName | Pointer to the element name |
| [out] | length | Pointer to the size of the elementName array |
Retrieves the element name by index and type from the SWMM output file.
| int EXPORT_SWMM_OUTPUT_API SMO_getFlowUnits | ( | SMO_Handle | p_handle, |
| int * | unitFlag | ||
| ) |
Returns unit flag for flow.
Returns unit flag for flow.
| [in] | p_handle | Opaque pointer to SWMM output file handle |
| [out] | unitFlag | Flow unit flag 0: CFS (cubic feet per second), 1: GPM (gallons per minute), 2: MGD (million gallons per day), 3: CMS (cubic meters per second), 4: LPS (liters per second), 5: MLD (million liters per day) |
Returns unit flag for flow.
| int EXPORT_SWMM_OUTPUT_API SMO_getLinkAttribute | ( | SMO_Handle | p_handle, |
| int | periodIndex, | ||
| SMO_linkAttribute | attr, | ||
| float ** | outValueArray, | ||
| int * | length | ||
| ) |
Retrieves link attribute values for a given time period and attribute type.
Retrieves link attribute values for a given time period and attribute type.
| [in] | p_handle | Opaque pointer to SWMM output file handle |
| [in] | timeIndex | The index of the time period |
| [in] | attr | The link attribute type to retrieve |
| [out] | outValueArray | Pointer to the link attribute values |
| [out] | length | Pointer to the length of the outValueArray array |
Retrieves link attribute values for a given time period and attribute type.
| int EXPORT_SWMM_OUTPUT_API SMO_getLinkResult | ( | SMO_Handle | p_handle, |
| int | periodIndex, | ||
| int | linkIndex, | ||
| float ** | outValueArray, | ||
| int * | arrayLength | ||
| ) |
Retrieves link result values for a given time period.
Retrieves link result values for a given time period.
| [in] | p_handle | Opaque pointer to SWMM output file handle |
| [in] | timeIndex | The index of the time period |
| [in] | linkIndex | The index of the link |
| [out] | outValueArray | Pointer to the link result values |
| [out] | length | Pointer to the length of the outValueArray array |
Retrieves link result values for a given time period.
| int EXPORT_SWMM_OUTPUT_API SMO_getLinkSeries | ( | SMO_Handle | p_handle, |
| int | linkIndex, | ||
| SMO_linkAttribute | attr, | ||
| int | startPeriod, | ||
| int | endPeriod, | ||
| float ** | outValueArray, | ||
| int * | length | ||
| ) |
Retrieves link attribute values for a given time period and attribute type.
Retrieves link attribute values for a given time period and attribute type.
| [in] | p_handle | Opaque pointer to SWMM output file handle |
| [in] | linkIndex | The index of the link |
| [in] | attr | The link attribute type to retrieve |
| [in] | startPeriod | The starting time period to retrieve data from |
| [in] | endPeriod | The ending time period to retrieve data from |
| [out] | outValueArray | Pointer to the link attribute values |
| [out] | length | Pointer to the length of the outValueArray array |
Retrieves link attribute values for a given time period and attribute type.
| int EXPORT_SWMM_OUTPUT_API SMO_getNodeAttribute | ( | SMO_Handle | p_handle, |
| int | periodIndex, | ||
| SMO_nodeAttribute | attr, | ||
| float ** | outValueArray, | ||
| int * | length | ||
| ) |
Retrieves node attribute values for a given time period and attribute type.
Retrieves node attribute values for a given time period and attribute type.
| [in] | p_handle | Opaque pointer to SWMM output file handle |
| [in] | timeIndex | The index of the time period |
| [in] | attr | The node attribute type to retrieve |
| [out] | outValueArray | Pointer to the node attribute values |
| [out] | length | Pointer to the length of the outValueArray array |
Retrieves node attribute values for a given time period and attribute type.
| int EXPORT_SWMM_OUTPUT_API SMO_getNodeResult | ( | SMO_Handle | p_handle, |
| int | periodIndex, | ||
| int | nodeIndex, | ||
| float ** | outValueArray, | ||
| int * | arrayLength | ||
| ) |
Retrieves node result values for a given time period.
Retrieves node result values for a given time period.
| [in] | p_handle | Opaque pointer to SWMM output file handle |
| [in] | timeIndex | The index of the time period |
| [in] | nodeIndex | The index of the node |
| [out] | outValueArray | Pointer to the node result values |
| [out] | length | Pointer to the length of the outValueArray array |
Retrieves node result values for a given time period.
| int EXPORT_SWMM_OUTPUT_API SMO_getNodeSeries | ( | SMO_Handle | p_handle, |
| int | nodeIndex, | ||
| SMO_nodeAttribute | attr, | ||
| int | startPeriod, | ||
| int | endPeriod, | ||
| float ** | outValueArray, | ||
| int * | length | ||
| ) |
Retrieves node attribute values for a given time period and attribute type.
Retrieves node attribute values for a given time period and attribute type.
| [in] | p_handle | Opaque pointer to SWMM output file handle |
| [in] | nodeIndex | The index of the node |
| [in] | attr | The node attribute type to retrieve |
| [in] | startPeriod | The starting time period to retrieve data from |
| [in] | endPeriod | The ending time period to retrieve data from |
| [out] | outValueArray | Pointer to the node attribute values |
| [out] | length | Pointer to the length of the outValueArray array |
Retrieves node attribute values for a given time period and attribute type.
| int EXPORT_SWMM_OUTPUT_API SMO_getNumProperties | ( | SMO_Handle | p_handle, |
| SMO_elementType | type, | ||
| int * | count | ||
| ) |
Retrieves the number of properties for a given element type that are stored in the output file.
Retrieves the number of properties for a given element type that are stored in the output file.
| [in] | p_handle | Opaque pointer to SWMM output file handle |
| [in] | type | The type of element |
| [out] | count | Pointer to the number of properties |
Retrieves the number of properties for a given element type that are stored in the output file.
| int EXPORT_SWMM_OUTPUT_API SMO_getNumVars | ( | SMO_Handle | p_handle, |
| SMO_elementType | type, | ||
| int * | count | ||
| ) |
Retrieves the number of variables for a given element type that are stored in the output file.
Retrieves the number of variables for a given element type that are stored in the output file.
| [in] | p_handle | Opaque pointer to SWMM output file handle |
| [in] | type | The type of element |
| [out] | count | Pointer to the number of variables |
Retrieves the number of variables for a given element type that are stored in the output file.
| int EXPORT_SWMM_OUTPUT_API SMO_getPollutantUnits | ( | SMO_Handle | p_handle, |
| int ** | unitFlag, | ||
| int * | length | ||
| ) |
Returns unit flag for pollutant. Concentration units are located after the pollutant ID names and before the object properties start, and are stored for each pollutant. They're stored as 4-byte integers with the following codes: 0: mg/L 1: ug/L 2: count/L.
Returns unit flag for pollutant. Concentration units are located after the pollutant ID names and before the object properties start, and are stored for each pollutant. They're stored as 4-byte integers with the following codes: 0: mg/L 1: ug/L 2: count/L.
| [in] | p_handle | Opaque pointer to SWMM output file handle |
| [out] | unitFlag | Array of unit flags |
| [out] | length | Length of unitFlag array |
Returns unit flag for pollutant. Concentration units are located after the pollutant ID names and before the object properties start, and are stored for each pollutant. They're stored as 4-byte integers with the following codes: 0: mg/L 1: ug/L 2: count/L.
| int EXPORT_SWMM_OUTPUT_API SMO_getProjectSize | ( | SMO_Handle | p_handle, |
| int ** | elementCount, | ||
| int * | length | ||
| ) |
Get project size.
| int EXPORT_SWMM_OUTPUT_API SMO_getPropertyCode | ( | SMO_Handle | p_handle, |
| SMO_elementType | type, | ||
| int | propertyIndex, | ||
| int * | propertyCode | ||
| ) |
Retrieves the property code for a given element type and property index that is stored in the output file.
Retrieves the property code for a given element type and property index that is stored in the output file.
| [in] | p_handle | Opaque pointer to SWMM output file handle |
| [in] | type | The type of element |
| [in] | propertyIndex | The index of the property |
| [out] | propertyCode | Pointer to the property code |
Retrieves the property code for a given element type and property index that is stored in the output file.
| int EXPORT_SWMM_OUTPUT_API SMO_getPropertyCodes | ( | SMO_Handle | p_handle, |
| SMO_elementType | type, | ||
| int ** | propertyCodes, | ||
| int * | size | ||
| ) |
Retrieves the property codes for a given element type that are stored in the output file.
Retrieves the property codes for a given element type that are stored in the output file.
| [in] | p_handle | Opaque pointer to SWMM output file handle |
| [in] | type | The type of element |
| [out] | propertyCodes | Pointer to the property codes |
| [out] | size | Pointer to the size of the propertyCodes array |
Retrieves the property codes for a given element type that are stored in the output file.
| int EXPORT_SWMM_OUTPUT_API SMO_getPropertyValue | ( | SMO_Handle | p_handle, |
| SMO_elementType | type, | ||
| int | propertyIndex, | ||
| int | elementIndex, | ||
| float * | value | ||
| ) |
Retrieves the value of a property for a given element type, property index, and element index.
Retrieves the value of a property for a given element type, property index, and element index.
| [in] | p_handle | Opaque pointer to SWMM output file handle |
| [in] | type | The type of element |
| [in] | propertyIndex | The index of the property |
| [in] | elementIndex | The index of the element |
| [out] | value | Pointer to the property value |
Retrieves the value of a property for a given element type, property index, and element index.
| int EXPORT_SWMM_OUTPUT_API SMO_getPropertyValues | ( | SMO_Handle | p_handle, |
| SMO_elementType | type, | ||
| int | elementIndex, | ||
| float ** | outValueArray, | ||
| int * | length | ||
| ) |
Retrieves the value of a property for a given element type, property index, and element index.
Retrieves all property values for a given element type and element index.
| [in] | p_handle | Opaque pointer to SWMM output file handle |
| [in] | type | The type of element |
| [in] | propertyIndex | The index of the property |
| [in] | elementIndex | The index of the element |
| [out] | value | Pointer to the property value |
Retrieves the value of a property for a given element type, property index, and element index.
| int EXPORT_SWMM_OUTPUT_API SMO_getStartDate | ( | SMO_Handle | p_handle, |
| double * | date | ||
| ) |
Retrieves the start date of the simulation.
Retrieves the start date of the simulation.
| [in] | p_handle | Opaque pointer to SWMM output file handle |
| [out] | date | Pointer to the start date |
Retrieves the start date of the simulation.
| int EXPORT_SWMM_OUTPUT_API SMO_getSubcatchAttribute | ( | SMO_Handle | p_handle, |
| int | periodIndex, | ||
| SMO_subcatchAttribute | attr, | ||
| float ** | outValueArray, | ||
| int * | length | ||
| ) |
Retrieves subcatchment attribute values for a given time period and attribute type.
Retrieves subcatchment attribute values for a given time period and attribute type.
| [in] | p_handle | Opaque pointer to SWMM output file handle |
| [in] | timeIndex | The index of the time period |
| [in] | attr | The subcatchment attribute type to retrieve |
| [out] | outValueArray | Pointer to the subcatchment attribute values |
| [out] | length | Pointer to the length of the outValueArray array |
Retrieves subcatchment attribute values for a given time period and attribute type.
| int EXPORT_SWMM_OUTPUT_API SMO_getSubcatchResult | ( | SMO_Handle | p_handle, |
| int | periodIndex, | ||
| int | subcatchIndex, | ||
| float ** | outValueArray, | ||
| int * | arrayLength | ||
| ) |
Retrieves subcatchment result values for a given time period.
Retrieves subcatchment result values for a given time period.
| [in] | p_handle | Opaque pointer to SWMM output file handle |
| [in] | timeIndex | The index of the time period |
| [in] | subcatchIndex | The index of the subcatchment |
| [out] | outValueArray | Pointer to the subcatchment result values |
| [out] | length | Pointer to the length of the outValueArray array |
Retrieves subcatchment result values for a given time period.
| int EXPORT_SWMM_OUTPUT_API SMO_getSubcatchSeries | ( | SMO_Handle | p_handle, |
| int | subcatchIndex, | ||
| SMO_subcatchAttribute | attr, | ||
| int | startPeriod, | ||
| int | endPeriod, | ||
| float ** | outValueArray, | ||
| int * | length | ||
| ) |
Retrieves subcatchment attribute values for a given time period and attribute type.
Retrieves subcatchment attribute values for a given time period and attribute type.
| [in] | p_handle | Opaque pointer to SWMM output file handle |
| [in] | subcatchIndex | The index of the subcatchment |
| [in] | attr | The subcatchment attribute type to retrieve |
| [in] | startPeriod | The starting time period to retrieve data from |
| [in] | endPeriod | The ending time period to retrieve data from |
| [out] | outValueArray | Pointer to the subcatchment attribute values |
| [out] | length | Pointer to the length of the outValueArray array |
Retrieves subcatchment attribute values for a given time period and attribute type.
| int EXPORT_SWMM_OUTPUT_API SMO_getSystemAttribute | ( | SMO_Handle | p_handle, |
| int | periodIndex, | ||
| SMO_systemAttribute | attr, | ||
| float ** | outValueArray, | ||
| int * | length | ||
| ) |
Retrieves system attribute values for a given time period and attribute type.
Retrieves system attribute values for a given time period and attribute type.
| [in] | p_handle | Opaque pointer to SWMM output file handle |
| [in] | timeIndex | The index of the time period |
| [in] | attr | The system attribute type to retrieve |
| [out] | outValueArray | Pointer to the system attribute values |
| [out] | length | Pointer to the length of the outValueArray array |
Retrieves system attribute values for a given time period and attribute type.
| int EXPORT_SWMM_OUTPUT_API SMO_getSystemResult | ( | SMO_Handle | p_handle, |
| int | periodIndex, | ||
| int | dummyIndex, | ||
| float ** | outValueArray, | ||
| int * | arrayLength | ||
| ) |
Retrieves system result values for a given time period.
Retrieves system result values for a given time period.
| [in] | p_handle | Opaque pointer to SWMM output file handle |
| [in] | timeIndex | The index of the time period |
| [in] | dummyIndex | The index of the system |
| [out] | outValueArray | Pointer to the system result values |
| [out] | length | Pointer to the length of the outValueArray array |
Retrieves system result values for a given time period.
| int EXPORT_SWMM_OUTPUT_API SMO_getSystemSeries | ( | SMO_Handle | p_handle, |
| SMO_systemAttribute | attr, | ||
| int | startPeriod, | ||
| int | endPeriod, | ||
| float ** | outValueArray, | ||
| int * | length | ||
| ) |
Retrieves system attribute values for a given time period and attribute type.
\Copydoc SMO_getSystemSeries
| int EXPORT_SWMM_OUTPUT_API SMO_getTimes | ( | SMO_Handle | p_handle, |
| SMO_time | code, | ||
| int * | time | ||
| ) |
Retrieves the number of reporting periods in the simulation.
Retrieves the number of reporting periods in the simulation.
| [in] | p_handle | Opaque pointer to SWMM output file handle |
| [in] | code | The type of reporting attribute to retrieve |
| [out] | time | Pointer to the reporting attribute value |
Retrieves the number of reporting periods in the simulation.
| int EXPORT_SWMM_OUTPUT_API SMO_getUnits | ( | SMO_Handle | p_handle, |
| int ** | unitFlag, | ||
| int * | length | ||
| ) |
Retrieves the unit system used in the SWMM model.
Retrieves the unit system used in the SWMM model.
| [in] | p_handle | Opaque pointer to SWMM output file handle |
| [out] | unitSystem | Pointer to the unit system |
| [out] | length | Length of unitFlag array |
Retrieves the unit system used in the SWMM model.
| int EXPORT_SWMM_OUTPUT_API SMO_getVarCode | ( | SMO_Handle | p_handle, |
| SMO_elementType | type, | ||
| int | varIndex, | ||
| int * | varCode | ||
| ) |
Retrieves the variable code for a given element type and variable index that is stored in the output file.
Retrieves the variable code for a given element type and variable index that is stored in the output file.
| [in] | p_handle | Opaque pointer to SWMM output file handle |
| [in] | type | The type of element |
| [in] | varIndex | The index of the variable |
| [out] | varCode | Pointer to the variable code |
Retrieves the variable code for a given element type and variable index that is stored in the output file.
| int EXPORT_SWMM_OUTPUT_API SMO_getVarCodes | ( | SMO_Handle | p_handle, |
| SMO_elementType | type, | ||
| int ** | varCodes, | ||
| int * | size | ||
| ) |
Retrieves the variable codes for a given element type that are stored in the output file.
Retrieves the variable codes for a given element type that are stored in the output file.
| [in] | p_handle | Opaque pointer to SWMM output file handle |
| [in] | type | The type of element |
| [out] | varCodes | Pointer to the variable codes |
| [out] | size | Pointer to the size of the varCodes array |
Retrieves the variable codes for a given element type that are stored in the output file.
| int EXPORT_SWMM_OUTPUT_API SMO_getVersion | ( | SMO_Handle | p_handle, |
| int * | version | ||
| ) |
Retrieves the model version number that created the output file.
Retrieves the model version number that created the output file.
| [in] | p_handle | Opaque pointer to SWMM output file handle |
| [out] | version | Pointer to the version number |
Retrieves the model version number that created the output file.
| int EXPORT_SWMM_OUTPUT_API SMO_init | ( | SMO_Handle * | p_handle | ) |
Initializes the SWMM output file handle.
Initializes the SWMM output file handle.
| [out] | p_handle | Opaque pointer to SWMM output file handle |
Initializes the SWMM output file handle.
| int EXPORT_SWMM_OUTPUT_API SMO_open | ( | SMO_Handle | p_handle, |
| const char * | path | ||
| ) |
Opens a SWMM output file.
Opens a SWMM output file.
| [in] | p_handle | Opaque pointer to SWMM output file handle |
| [in] | path | Path to the SWMM output file |
Opens a SWMM output file.