Full Function collection can be found toolkitAPI.h
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
long newHour, oldHour = 0;
long theDay, theHour;
double elapsedTime = 0.0;
char *inputFile;
char *reportFile;
char *binaryFile;
inputFile = "<path2>/inputfile.inp";
reportFile = "<path2>/reportfile.rpt";
binaryFile = "<path2>/outputfile.out";
ErrorCode =
swmm_open(inputFile, reportFile, binaryFile);
if ( !ErrorCode )
{
int ndType;
double depth = 0;
printf(
"Node Type: %d", ndType); \\ Print node type (See
SM_NodeType)
if ( !ErrorCode )
{
do
{
printf(
"Node Depth %lf", depth); \\ Print node result (See
SM_NodeResult)
} while ( elapsedTime > 0.0 && !ErrorCode );
}
}
printf("Node Max Depth %lf", Node0Stats->avgDepth);