SWMM-Docs  5.2.0.dev5
Stormwater Management Model
Functions
Network Info

Functions

int DLLEXPORT swmm_countObjects (int type, int *count)
 Gets Object Count. More...
 
int DLLEXPORT swmm_getObjectId (int type, int index, char *id)
 Gets Object ID. More...
 
int DLLEXPORT swmm_getNodeType (int index, int *Ntype)
 Get the type of node with specified index. More...
 
int DLLEXPORT swmm_getLinkType (int index, int *Ltype)
 Get the type of link with specified index. More...
 
int DLLEXPORT swmm_getLinkConnections (int index, int *Node1, int *Node2)
 Get the link Connection Node Indeces. If the conduit has a negative slope, the dynamic wave solver will automatically reverse the nodes. To check the direction, call swmm_getLinkDirection(). More...
 
int DLLEXPORT swmm_getLinkDirection (int index, signed char *value)
 Get the link flow direction (see swmm_getLinkType() for notes. More...
 
int DLLEXPORT swmm_getSubcatchOutConnection (int index, int *type, int *out_index)
 Get the Subcatchment connection. Subcatchments can load to a node, another subcatchment, or itself. More...
 
int DLLEXPORT swmm_getNodeParam (int index, int Param, double *value)
 Get a property value for specified node. More...
 
int DLLEXPORT swmm_getLinkParam (int index, int Param, double *value)
 Get a property value for specified link. More...
 
int DLLEXPORT swmm_getSubcatchParam (int index, int Param, double *value)
 Get a property value for specified subcatchment. More...
 
int DLLEXPORT swmm_setNodeParam (int index, int Param, double value)
 Set a property value for specified node. More...
 
int DLLEXPORT swmm_setLinkParam (int index, int Param, double value)
 Set a property value for specified link. More...
 
int DLLEXPORT swmm_setSubcatchParam (int index, int Param, double value)
 Set a property value for specified subcatchment. More...
 

Detailed Description

Function Documentation

◆ swmm_countObjects()

int swmm_countObjects ( int  type,
int *  count 
)

Gets Object Count.

Parameters
typeOption code (see SM_ObjectType)
[out]countOption value
Returns
Error code

Input: type = object type (Based on SM_ObjectType enum) Output: count = pointer to integer Returns: API Error Purpose: uses Object Count table to find number of elements of an object

Definition at line 297 of file toolkitAPI.c.

◆ swmm_getLinkConnections()

int swmm_getLinkConnections ( int  index,
int *  Node1,
int *  Node2 
)

Get the link Connection Node Indeces. If the conduit has a negative slope, the dynamic wave solver will automatically reverse the nodes. To check the direction, call swmm_getLinkDirection().

Parameters
indexThe index of a link
[out]Node1The upstream node index.
[out]Node2The downstream node index.
Returns
Error code

Input: index = Index of desired ID Output: Node1 and Node2 indeces Return: API Error Purpose: Gets link Connection ID Indeces

Definition at line 447 of file toolkitAPI.c.

◆ swmm_getLinkDirection()

int swmm_getLinkDirection ( int  index,
signed char *  value 
)

Get the link flow direction (see swmm_getLinkType() for notes.

Parameters
indexThe index of a link
[out]valueThe link flow direction.
Returns
Error code

Input: index = Index of desired ID Output: Link Direction (Only changes is slope < 0) Return: API Error Purpose: Gets Link Direction

Definition at line 475 of file toolkitAPI.c.

◆ swmm_getLinkParam()

int swmm_getLinkParam ( int  index,
int  Param,
double *  value 
)

Get a property value for specified link.

Parameters
indexThe index of a link
ParamThe property type code (See SM_LinkProperty)
[out]valueThe value of the link's property
Returns
Error code

Input: index = Index of desired ID param = Parameter desired (Based on enum SM_LinkProperty) Output: value = value to be output Return: API Error Purpose: Gets Link Parameter

Definition at line 587 of file toolkitAPI.c.

◆ swmm_getLinkType()

int swmm_getLinkType ( int  index,
int *  Ltype 
)

Get the type of link with specified index.

Parameters
indexThe index of a link
[out]LtypeThe type code for the link (SM_LinkType).
Returns
Error code

Input: index = Index of desired ID Ltype = Link type (Based on enum SM_LinkType) Return: API Error Purpose: Gets Link Type

Definition at line 423 of file toolkitAPI.c.

◆ swmm_getNodeParam()

int swmm_getNodeParam ( int  index,
int  Param,
double *  value 
)

Get a property value for specified node.

Parameters
indexThe index of a node
ParamThe property type code (See SM_NodeProperty)
[out]valueThe value of the node's property
Returns
Error code

Input: index = Index of desired ID param = Parameter desired (Based on enum SM_NodeProperty) Output: value = value to be output Return: API Error Purpose: Gets Node Parameter

Definition at line 501 of file toolkitAPI.c.

◆ swmm_getNodeType()

int swmm_getNodeType ( int  index,
int *  Ntype 
)

Get the type of node with specified index.

Parameters
indexThe index of a node
[out]NtypeThe type code for the node (SM_NodeType). id must be pre-allocated by the caller.
Returns
Error code

Input: index = Index of desired ID Ntype = Node type (Based on enum SM_NodeType) Return: API Error Purpose: Gets Node Type

Definition at line 399 of file toolkitAPI.c.

◆ swmm_getObjectId()

int swmm_getObjectId ( int  type,
int  index,
char *  id 
)

Gets Object ID.

Parameters
typeOption code (see SM_ObjectType)
indexof the Object
[out]idThe string ID of object.
Returns
Error code

Input: type = object type (Based on SM_ObjectType enum) index = Index of desired ID Output: id = pointer to id pass by reference Return: API Error Purpose: Gets ID for any object

Definition at line 329 of file toolkitAPI.c.

◆ swmm_getSubcatchOutConnection()

int swmm_getSubcatchOutConnection ( int  index,
int *  type,
int *  out_index 
)

Get the Subcatchment connection. Subcatchments can load to a node, another subcatchment, or itself.

Parameters
indexThe index of a Subcatchment
[out]typeThe type of object loading (See SM_ObjectType)
[out]out_indexThe object index
Returns
Error code

Input: index = Index of desired ID (Subcatchments can load to Node or another Subcatchment) Output: Type of Object Index of Object Return: API Error Purpose: Gets Subcatchment Connection ID Indeces for either Node or Subcatchment

Definition at line 780 of file toolkitAPI.c.

◆ swmm_getSubcatchParam()

int swmm_getSubcatchParam ( int  index,
int  Param,
double *  value 
)

Get a property value for specified subcatchment.

Parameters
indexThe index of a subcatchment
ParamThe property type code (See SM_SubcProperty)
[out]valueThe value of the subcatchment's property
Returns
Error code

Input: index = Index of desired ID param = Parameter desired (Based on enum SM_SubcProperty) Output: value = value to be output Return: API Error Purpose: Gets Subcatchment Parameter

Definition at line 689 of file toolkitAPI.c.

◆ swmm_setLinkParam()

int swmm_setLinkParam ( int  index,
int  Param,
double  value 
)

Set a property value for specified link.

Parameters
indexThe index of a link
ParamThe property type code (See SM_LinkProperty)
valueThe new value of the link's property
Returns
Error code

Input: index = Index of desired ID param = Parameter desired (Based on enum SM_LinkProperty) value = value to be output Return: API Error Purpose: Sets Link Parameter

Definition at line 631 of file toolkitAPI.c.

◆ swmm_setNodeParam()

int swmm_setNodeParam ( int  index,
int  Param,
double  value 
)

Set a property value for specified node.

Parameters
indexThe index of a node
ParamThe property type code (See SM_NodeProperty)
valueThe new value of the node's property
Returns
Error code

Input: index = Index of desired ID param = Parameter desired (Based on enum SM_NodeProperty) value = value to be input Return: API Error Purpose: Sets Node Parameter

Definition at line 541 of file toolkitAPI.c.

◆ swmm_setSubcatchParam()

int swmm_setSubcatchParam ( int  index,
int  Param,
double  value 
)

Set a property value for specified subcatchment.

Parameters
indexThe index of a subcatchment
ParamThe property type code (See SM_SubcProperty)
valueThe new value of the subcatchment's property
Returns
Error code

Input: index = Index of desired ID param = Parameter desired (Based on enum SM_SubcProperty) value = value to be output Return: API Error Purpose: Sets Subcatchment Parameter

Definition at line 729 of file toolkitAPI.c.