cloudflight
2024-12-24 801a451429b294a435e1c69db55c70e20c45444d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/*
 *  epanet_output.h - EPANET Output API
 *
 *  Created on: Jun 4, 2014
 *
 *      Author: Michael E. Tryby
 *              US EPA - ORD/NRMRL
 */
 
#ifndef EPANET_OUTPUT_H_
#define EPANET_OUTPUT_H_
/* Epanet Results binary file API */
 
 
#define MAXFNAME     259   // Max characters in file name
#define MAXID         31   // Max characters in ID name
 
 
// This is an opaque pointer to struct. Do not access variables.
typedef void* ENR_Handle;
 
 
#include "epanet_output_enums.h"
#include "epanet_output_export.h"
 
 
#ifdef __cplusplus
extern "C" {
#endif
 
int EXPORT_OUT_API ENR_init(ENR_Handle* p_handle_out);
 
int EXPORT_OUT_API ENR_open(ENR_Handle p_handle_in, const char* path);
 
int EXPORT_OUT_API ENR_getVersion(ENR_Handle p_handle_in, int* int_out);
 
int EXPORT_OUT_API ENR_getNetSize(ENR_Handle p_handle_in, int** int_out, int* int_dim);
 
int EXPORT_OUT_API ENR_getUnits(ENR_Handle p_handle_in, ENR_Units t_enum, int* int_out);
 
int EXPORT_OUT_API ENR_getTimes(ENR_Handle p_handle_in, ENR_Time t_enum, int* int_out);
 
int EXPORT_OUT_API ENR_getElementName(ENR_Handle p_handle_in, ENR_ElementType t_enum,
        int elementIndex, char** string_out, int* slen);
 
int EXPORT_OUT_API ENR_getEnergyUsage(ENR_Handle p_handle_in, int pumpIndex,
        int* int_out, float** float_out, int* int_dim);
 
int EXPORT_OUT_API ENR_getNetReacts(ENR_Handle p_handle_in, float** float_out, int* int_dim);
 
 
int EXPORT_OUT_API ENR_getNodeSeries(ENR_Handle p_handle_in, int nodeIndex, ENR_NodeAttribute t_enum,
        int startPeriod, int endPeriod, float** outValueSeries, int* dim);
 
int EXPORT_OUT_API ENR_getLinkSeries(ENR_Handle p_handle_in, int linkIndex, ENR_LinkAttribute t_enum,
        int startPeriod, int endPeriod, float** outValueSeries, int* dim);
 
int EXPORT_OUT_API ENR_getNodeAttribute(ENR_Handle p_handle_in, int periodIndex,
        ENR_NodeAttribute t_enum, float** outValueArray, int* dim);
 
int EXPORT_OUT_API ENR_getLinkAttribute(ENR_Handle p_handle_in, int periodIndex,
        ENR_LinkAttribute t_enum, float** outValueArray, int* dim);
 
int EXPORT_OUT_API ENR_getNodeResult(ENR_Handle p_handle_in, int periodIndex, int nodeIndex,
        float** float_out, int* int_dim);
 
int EXPORT_OUT_API ENR_getLinkResult(ENR_Handle p_handle_in, int periodIndex, int linkIndex,
        float** float_out, int* int_dim);
 
int EXPORT_OUT_API ENR_close(ENR_Handle* p_handle_out);
 
void EXPORT_OUT_API ENR_free(void** array);
 
void EXPORT_OUT_API ENR_clearError(ENR_Handle p_handle_in);
 
int EXPORT_OUT_API ENR_checkError(ENR_Handle p_handle_in, char** msg_buffer);
 
#ifdef __cplusplus
}
#endif
 
#endif /* EPANET_OUTPUT_H_ */