OpenSWMM Engine  6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
Loading...
Searching...
No Matches
openswmm_output.h File Reference

Header file for SWMM output API. More...

#include "openswmm_output_export.h"
#include "openswmm_output_enums.h"
Include dependency graph for openswmm_output.h:

Go to the source code of this file.

Macros

#define MAXFILENAME   259
 Maximum number of characters in a file path.
 
#define MAXELENAME   31
 Maximum number of characters in a element name.
 

Typedefs

typedef void * SMO_Handle
 Opaque pointer to struct. Do not access variables.
 

Functions

int EXPORT_OPENSWMMCORE_OUTPUT_API SMO_init (SMO_Handle *p_handle)
 Initializes the SWMM output file handle.
 
int EXPORT_OPENSWMMCORE_OUTPUT_API SMO_close (SMO_Handle *p_handle)
 Closes the SWMM output file handle.
 
int EXPORT_OPENSWMMCORE_OUTPUT_API SMO_open (SMO_Handle p_handle, const char *path)
 Opens a SWMM output file.
 
int EXPORT_OPENSWMMCORE_OUTPUT_API SMO_getVersion (SMO_Handle p_handle, int *version)
 Retrieves the model version number that created the output file.
 
int EXPORT_OPENSWMMCORE_OUTPUT_API SMO_getProjectSize (SMO_Handle p_handle, int **elementCount, int *length)
 Get project size.
 
int EXPORT_OPENSWMMCORE_OUTPUT_API SMO_getUnits (SMO_Handle p_handle, int **unitFlag, int *length)
 Retrieves the unit system used in the SWMM model.
 
int EXPORT_OPENSWMMCORE_OUTPUT_API SMO_getFlowUnits (SMO_Handle p_handle, int *unitFlag)
 Returns unit flag for flow.
 
int EXPORT_OPENSWMMCORE_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_OPENSWMMCORE_OUTPUT_API SMO_getStartDate (SMO_Handle p_handle, double *date)
 Retrieves the start date of the simulation.
 
int EXPORT_OPENSWMMCORE_OUTPUT_API SMO_getTimes (SMO_Handle p_handle, SMO_time code, int *time)
 Retrieves the number of reporting periods in the simulation.
 
int EXPORT_OPENSWMMCORE_OUTPUT_API SMO_getElementName (SMO_Handle p_handle, SMO_elementType type, int elementIndex, char **elementName, int *size)
 Retrieves the element name by index and type from the SWMM output file.
 
int EXPORT_OPENSWMMCORE_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_OPENSWMMCORE_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_OPENSWMMCORE_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_OPENSWMMCORE_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_OPENSWMMCORE_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_OPENSWMMCORE_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_OPENSWMMCORE_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_OPENSWMMCORE_OUTPUT_API SMO_getPropertyValues (SMO_Handle p_handle, SMO_elementType type, int elementIndex, float **outValueArray, int *length)
 Retrieves all property values for a given element type and element index.
 
int EXPORT_OPENSWMMCORE_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_OPENSWMMCORE_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_OPENSWMMCORE_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_OPENSWMMCORE_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_OPENSWMMCORE_OUTPUT_API SMO_getSubcatchAttribute (SMO_Handle p_handle, int timeIndex, SMO_subcatchAttribute attr, float **outValueArray, int *length)
 Retrieves subcatchment attribute values for a given time period and attribute type.
 
int EXPORT_OPENSWMMCORE_OUTPUT_API SMO_getNodeAttribute (SMO_Handle p_handle, int timeIndex, SMO_nodeAttribute attr, float **outValueArray, int *length)
 Retrieves node attribute values for a given time period and attribute type.
 
int EXPORT_OPENSWMMCORE_OUTPUT_API SMO_getLinkAttribute (SMO_Handle p_handle, int timeIndex, SMO_linkAttribute attr, float **outValueArray, int *length)
 Retrieves link attribute values for a given time period and attribute type.
 
int EXPORT_OPENSWMMCORE_OUTPUT_API SMO_getSystemAttribute (SMO_Handle p_handle, int timeIndex, SMO_systemAttribute attr, float **outValueArray, int *length)
 Retrieves system attribute values for a given time period and attribute type.
 
int EXPORT_OPENSWMMCORE_OUTPUT_API SMO_getSubcatchResult (SMO_Handle p_handle, int timeIndex, int subcatchIndex, float **outValueArray, int *length)
 Retrieves subcatchment result values for a given time period.
 
int EXPORT_OPENSWMMCORE_OUTPUT_API SMO_getNodeResult (SMO_Handle p_handle, int timeIndex, int nodeIndex, float **outValueArray, int *length)
 Retrieves node result values for a given time period.
 
int EXPORT_OPENSWMMCORE_OUTPUT_API SMO_getLinkResult (SMO_Handle p_handle, int timeIndex, int linkIndex, float **outValueArray, int *length)
 Retrieves link result values for a given time period.
 
int EXPORT_OPENSWMMCORE_OUTPUT_API SMO_getSystemResult (SMO_Handle p_handle, int timeIndex, int dummyIndex, float **outValueArray, int *length)
 Retrieves system result values for a given time period.
 
void EXPORT_OPENSWMMCORE_OUTPUT_API SMO_free (void **array)
 Frees memory allocated by the API for the outValueArray.
 
void EXPORT_OPENSWMMCORE_OUTPUT_API SMO_clearError (SMO_Handle p_handle_in)
 Clears the error status of the SMO_Handle.
 
int EXPORT_OPENSWMMCORE_OUTPUT_API SMO_checkError (SMO_Handle p_handle_in, char **msg_buffer)
 Checks for error in the error handle and copies the error message to the message buffer.
 

Detailed Description

Header file for SWMM output API.

Date
Created: 2017-08-25
Last edited: 2024-10-17

Macro Definition Documentation

◆ MAXELENAME

#define MAXELENAME   31

Maximum number of characters in a element name.

◆ MAXFILENAME

#define MAXFILENAME   259

Maximum number of characters in a file path.

Typedef Documentation

◆ SMO_Handle

Opaque pointer to struct. Do not access variables.

Function Documentation

◆ SMO_checkError()

int EXPORT_OPENSWMMCORE_OUTPUT_API SMO_checkError ( SMO_Handle  p_handle_in,
char **  msg_buffer 
)

Checks for error in the error handle and copies the error message to the message buffer.

Parameters
[in]p_handlePointer to opaque SMO_Handle
[out]msg_bufferError message buffer
Returns
Error code

◆ SMO_clearError()

void EXPORT_OPENSWMMCORE_OUTPUT_API SMO_clearError ( SMO_Handle  p_handle_in)

Clears the error status of the SMO_Handle.

Parameters
[in]p_handleOpaque pointer to SWMM output file handle

◆ SMO_close()

int EXPORT_OPENSWMMCORE_OUTPUT_API SMO_close ( SMO_Handle p_handle)

Closes the SWMM output file handle.

Parameters
[in]p_handleOpaque pointer to SWMM output file handle
Returns
Error code 0 if successful or -1 if an error occurs

◆ SMO_free()

void EXPORT_OPENSWMMCORE_OUTPUT_API SMO_free ( void **  array)

Frees memory allocated by the API for the outValueArray.

Parameters
[in]arrayPointer to the outValueArray

◆ SMO_getElementName()

int EXPORT_OPENSWMMCORE_OUTPUT_API SMO_getElementName ( SMO_Handle  p_handle,
SMO_elementType  type,
int  elementIndex,
char **  elementName,
int *  size 
)

Retrieves the element name by index and type from the SWMM output file.

Parameters
[in]p_handleOpaque pointer to SWMM output file handle
[in]typeThe type of element
[in]elementIndexThe index of the element
[out]elementNamePointer to the element name
[out]lengthPointer to the size of the elementName array
Returns
Error code

◆ SMO_getFlowUnits()

int EXPORT_OPENSWMMCORE_OUTPUT_API SMO_getFlowUnits ( SMO_Handle  p_handle,
int *  unitFlag 
)

Returns unit flag for flow.

Parameters
[in]p_handleOpaque pointer to SWMM output file handle
[out]unitFlagFlow 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
Error code

◆ SMO_getLinkAttribute()

int EXPORT_OPENSWMMCORE_OUTPUT_API SMO_getLinkAttribute ( SMO_Handle  p_handle,
int  timeIndex,
SMO_linkAttribute  attr,
float **  outValueArray,
int *  length 
)

Retrieves link attribute values for a given time period and attribute type.

Parameters
[in]p_handleOpaque pointer to SWMM output file handle
[in]timeIndexThe index of the time period
[in]attrThe link attribute type to retrieve
[out]outValueArrayPointer to the link attribute values
[out]lengthPointer to the length of the outValueArray array
Returns
Error code 0 on success, -1 on failure or error code

◆ SMO_getLinkResult()

int EXPORT_OPENSWMMCORE_OUTPUT_API SMO_getLinkResult ( SMO_Handle  p_handle,
int  timeIndex,
int  linkIndex,
float **  outValueArray,
int *  length 
)

Retrieves link result values for a given time period.

Parameters
[in]p_handleOpaque pointer to SWMM output file handle
[in]timeIndexThe index of the time period
[in]linkIndexThe index of the link
[out]outValueArrayPointer to the link result values
[out]lengthPointer to the length of the outValueArray array
Returns
Error code 0 on success, -1 on failure or error code

◆ SMO_getLinkSeries()

int EXPORT_OPENSWMMCORE_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.

Parameters
[in]p_handleOpaque pointer to SWMM output file handle
[in]linkIndexThe index of the link
[in]attrThe link attribute type to retrieve
[in]startPeriodThe starting time period to retrieve data from
[in]endPeriodThe ending time period to retrieve data from
[out]outValueArrayPointer to the link attribute values
[out]lengthPointer to the length of the outValueArray array
Returns
Error code 0 on success, -1 on failure or error code

◆ SMO_getNodeAttribute()

int EXPORT_OPENSWMMCORE_OUTPUT_API SMO_getNodeAttribute ( SMO_Handle  p_handle,
int  timeIndex,
SMO_nodeAttribute  attr,
float **  outValueArray,
int *  length 
)

Retrieves node attribute values for a given time period and attribute type.

Parameters
[in]p_handleOpaque pointer to SWMM output file handle
[in]timeIndexThe index of the time period
[in]attrThe node attribute type to retrieve
[out]outValueArrayPointer to the node attribute values
[out]lengthPointer to the length of the outValueArray array
Returns
Error code 0 on success, -1 on failure or error code

◆ SMO_getNodeResult()

int EXPORT_OPENSWMMCORE_OUTPUT_API SMO_getNodeResult ( SMO_Handle  p_handle,
int  timeIndex,
int  nodeIndex,
float **  outValueArray,
int *  length 
)

Retrieves node result values for a given time period.

Parameters
[in]p_handleOpaque pointer to SWMM output file handle
[in]timeIndexThe index of the time period
[in]nodeIndexThe index of the node
[out]outValueArrayPointer to the node result values
[out]lengthPointer to the length of the outValueArray array
Returns
Error code 0 on success, -1 on failure or error code

◆ SMO_getNodeSeries()

int EXPORT_OPENSWMMCORE_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.

Parameters
[in]p_handleOpaque pointer to SWMM output file handle
[in]nodeIndexThe index of the node
[in]attrThe node attribute type to retrieve
[in]startPeriodThe starting time period to retrieve data from
[in]endPeriodThe ending time period to retrieve data from
[out]outValueArrayPointer to the node attribute values
[out]lengthPointer to the length of the outValueArray array
Returns
Error code 0 on success, -1 on failure or error code

◆ SMO_getNumProperties()

int EXPORT_OPENSWMMCORE_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.

Parameters
[in]p_handleOpaque pointer to SWMM output file handle
[in]typeThe type of element
[out]countPointer to the number of properties
Returns
Error code

◆ SMO_getNumVars()

int EXPORT_OPENSWMMCORE_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.

Parameters
[in]p_handleOpaque pointer to SWMM output file handle
[in]typeThe type of element
[out]countPointer to the number of variables
Returns
Error code

◆ SMO_getPollutantUnits()

int EXPORT_OPENSWMMCORE_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.

Parameters
[in]p_handleOpaque pointer to SWMM output file handle
[out]unitFlagArray of unit flags
[out]lengthLength of unitFlag array
Returns
Error code
Note
Valid values are 0 to Npolluts-1

◆ SMO_getProjectSize()

int EXPORT_OPENSWMMCORE_OUTPUT_API SMO_getProjectSize ( SMO_Handle  p_handle,
int **  elementCount,
int *  length 
)

Get project size.

Parameters
[in]p_handleOpaque pointer to SWMM output file handle
[out]elementCountArray of element counts
[out]lengthLength of elementCount array
Returns
Error code 0 on success, -1 on failure or error code

◆ SMO_getPropertyCode()

int EXPORT_OPENSWMMCORE_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.

Parameters
[in]p_handleOpaque pointer to SWMM output file handle
[in]typeThe type of element
[in]propertyIndexThe index of the property
[out]propertyCodePointer to the property code
Returns
Property code or error code

◆ SMO_getPropertyCodes()

int EXPORT_OPENSWMMCORE_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.

Parameters
[in]p_handleOpaque pointer to SWMM output file handle
[in]typeThe type of element
[out]propertyCodesPointer to the property codes
[out]sizePointer to the size of the propertyCodes array
Returns
Error code

◆ SMO_getPropertyValue()

int EXPORT_OPENSWMMCORE_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.

Parameters
[in]p_handleOpaque pointer to SWMM output file handle
[in]typeThe type of element
[in]propertyIndexThe index of the property
[in]elementIndexThe index of the element
[out]valuePointer to the property value
Returns
Error code

◆ SMO_getPropertyValues()

int EXPORT_OPENSWMMCORE_OUTPUT_API SMO_getPropertyValues ( SMO_Handle  p_handle,
SMO_elementType  type,
int  elementIndex,
float **  outValueArray,
int *  length 
)

Retrieves all property values for a given element type and element index.

Parameters
[in]p_handleOpaque pointer to SWMM output file handle
[in]typeThe type of element
[in]elementIndexThe index of the element
[out]outValueArrayPointer to the property values
[out]lengthPointer to the length of the outValueArray array
Returns
Error code

◆ SMO_getStartDate()

int EXPORT_OPENSWMMCORE_OUTPUT_API SMO_getStartDate ( SMO_Handle  p_handle,
double *  date 
)

Retrieves the start date of the simulation.

Parameters
[in]p_handleOpaque pointer to SWMM output file handle
[out]datePointer to the start date
Returns
Error code 0 on success, -1 on failure

◆ SMO_getSubcatchAttribute()

int EXPORT_OPENSWMMCORE_OUTPUT_API SMO_getSubcatchAttribute ( SMO_Handle  p_handle,
int  timeIndex,
SMO_subcatchAttribute  attr,
float **  outValueArray,
int *  length 
)

Retrieves subcatchment attribute values for a given time period and attribute type.

Parameters
[in]p_handleOpaque pointer to SWMM output file handle
[in]timeIndexThe index of the time period
[in]attrThe subcatchment attribute type to retrieve
[out]outValueArrayPointer to the subcatchment attribute values
[out]lengthPointer to the length of the outValueArray array
Returns
Error code 0 on success, -1 on failure or error code

◆ SMO_getSubcatchResult()

int EXPORT_OPENSWMMCORE_OUTPUT_API SMO_getSubcatchResult ( SMO_Handle  p_handle,
int  timeIndex,
int  subcatchIndex,
float **  outValueArray,
int *  length 
)

Retrieves subcatchment result values for a given time period.

Parameters
[in]p_handleOpaque pointer to SWMM output file handle
[in]timeIndexThe index of the time period
[in]subcatchIndexThe index of the subcatchment
[out]outValueArrayPointer to the subcatchment result values
[out]lengthPointer to the length of the outValueArray array
Returns
Error code 0 on success, -1 on failure or error code

◆ SMO_getSubcatchSeries()

int EXPORT_OPENSWMMCORE_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.

Parameters
[in]p_handleOpaque pointer to SWMM output file handle
[in]subcatchIndexThe index of the subcatchment
[in]attrThe subcatchment attribute type to retrieve
[in]startPeriodThe starting time period to retrieve data from
[in]endPeriodThe ending time period to retrieve data from
[out]outValueArrayPointer to the subcatchment attribute values
[out]lengthPointer to the length of the outValueArray array
Returns
Error code 0 on success, -1 on failure or error code

◆ SMO_getSystemAttribute()

int EXPORT_OPENSWMMCORE_OUTPUT_API SMO_getSystemAttribute ( SMO_Handle  p_handle,
int  timeIndex,
SMO_systemAttribute  attr,
float **  outValueArray,
int *  length 
)

Retrieves system attribute values for a given time period and attribute type.

Parameters
[in]p_handleOpaque pointer to SWMM output file handle
[in]timeIndexThe index of the time period
[in]attrThe system attribute type to retrieve
[out]outValueArrayPointer to the system attribute values
[out]lengthPointer to the length of the outValueArray array
Returns
Error code 0 on success, -1 on failure or error code

◆ SMO_getSystemResult()

int EXPORT_OPENSWMMCORE_OUTPUT_API SMO_getSystemResult ( SMO_Handle  p_handle,
int  timeIndex,
int  dummyIndex,
float **  outValueArray,
int *  length 
)

Retrieves system result values for a given time period.

Parameters
[in]p_handleOpaque pointer to SWMM output file handle
[in]timeIndexThe index of the time period
[in]dummyIndexThe index of the system
[out]outValueArrayPointer to the system result values
[out]lengthPointer to the length of the outValueArray array
Returns
Error code 0 on success, -1 on failure or error code

◆ SMO_getSystemSeries()

int EXPORT_OPENSWMMCORE_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.

Parameters
[in]p_handleOpaque pointer to SWMM output file handle
[in]attrThe system attribute type to retrieve
[in]startPeriodThe starting time period to retrieve data from
[in]endPeriodThe ending time period to retrieve data from
[out]outValueArrayPointer to the system attribute values
[out]lengthPointer to the length of the outValueArray array
Returns
Error code 0 on success, -1 on failure or error code

◆ SMO_getTimes()

int EXPORT_OPENSWMMCORE_OUTPUT_API SMO_getTimes ( SMO_Handle  p_handle,
SMO_time  code,
int *  time 
)

Retrieves the number of reporting periods in the simulation.

Parameters
[in]p_handleOpaque pointer to SWMM output file handle
[in]codeThe type of reporting attribute to retrieve
[out]timePointer to the reporting attribute value
Returns
Error code 0 on success, -1 on failure or error code

◆ SMO_getUnits()

int EXPORT_OPENSWMMCORE_OUTPUT_API SMO_getUnits ( SMO_Handle  p_handle,
int **  unitFlag,
int *  length 
)

Retrieves the unit system used in the SWMM model.

Parameters
[in]p_handleOpaque pointer to SWMM output file handle
[out]unitSystemPointer to the unit system
[out]lengthLength of unitFlag array
Returns
Error code

◆ SMO_getVarCode()

int EXPORT_OPENSWMMCORE_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.

Parameters
[in]p_handleOpaque pointer to SWMM output file handle
[in]typeThe type of element
[in]varIndexThe index of the variable
[out]varCodePointer to the variable code
Returns
Variable code or error code

◆ SMO_getVarCodes()

int EXPORT_OPENSWMMCORE_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.

Parameters
[in]p_handleOpaque pointer to SWMM output file handle
[in]typeThe type of element
[out]varCodesPointer to the variable codes
[out]sizePointer to the size of the varCodes array
Returns
Error code

◆ SMO_getVersion()

int EXPORT_OPENSWMMCORE_OUTPUT_API SMO_getVersion ( SMO_Handle  p_handle,
int *  version 
)

Retrieves the model version number that created the output file.

Parameters
[in]p_handleOpaque pointer to SWMM output file handle
[out]versionPointer to the version number
Returns
Error code 0 if successful or -1 if an error occurs

◆ SMO_init()

int EXPORT_OPENSWMMCORE_OUTPUT_API SMO_init ( SMO_Handle p_handle)

Initializes the SWMM output file handle.

Parameters
[out]p_handleOpaque pointer to SWMM output file handle
Returns
Error code 0 if successful or -1 if an error occurs

◆ SMO_open()

int EXPORT_OPENSWMMCORE_OUTPUT_API SMO_open ( SMO_Handle  p_handle,
const char *  path 
)

Opens a SWMM output file.

Parameters
[in]p_handleOpaque pointer to SWMM output file handle
[in]pathPath to the SWMM output file
Returns
Error code 0 if successful or -1 if an error occurs