Merge branch 'dev' into 681-request-additional-api-function-for-getting-finer-grained-time-step-information
This commit is contained in:
@@ -73,6 +73,9 @@ namespace EpanetCSharpLibrary
|
||||
public const int EN_PUMP_ECURVE = 20;
|
||||
public const int EN_PUMP_ECOST = 21;
|
||||
public const int EN_PUMP_EPAT = 22;
|
||||
public const int EN_LINK_INCONTROL = 23;
|
||||
public const int EN_GPV_CURVE = 24;
|
||||
public const int EN_PCV_CURVE = 25;
|
||||
|
||||
public const int EN_DURATION = 0; //Time parameters
|
||||
public const int EN_HYDSTEP = 1;
|
||||
@@ -126,6 +129,7 @@ namespace EpanetCSharpLibrary
|
||||
public const int EN_FCV = 6;
|
||||
public const int EN_TCV = 7;
|
||||
public const int EN_GPV = 8;
|
||||
public const int EN_PCV = 9;
|
||||
|
||||
public const int EN_NONE = 0; //Quality analysis types
|
||||
public const int EN_CHEM = 1;
|
||||
@@ -209,6 +213,7 @@ namespace EpanetCSharpLibrary
|
||||
public const int EN_EFFIC_CURVE = 2; //Efficiency curve
|
||||
public const int EN_HLOSS_CURVE = 3; //Head loss curve
|
||||
public const int EN_GENERIC_CURVE = 4; //Generic curve
|
||||
public const int EN_VALVE_CURVE = 5; //Valve position curve
|
||||
|
||||
public const int EN_UNCONDITIONAL = 0; //Unconditional object deletion
|
||||
public const int EN_CONDITIONAL = 1; //Conditional object deletion
|
||||
|
||||
@@ -5,7 +5,7 @@ Attribute VB_Name = "Module1"
|
||||
'Declarations of functions in the EPANET PROGRAMMERs TOOLKIT
|
||||
'(EPANET2.DLL)
|
||||
|
||||
'Last updated on 02/01/2020
|
||||
'Last updated on 07/28/2022
|
||||
|
||||
' These are codes used by the DLL functions
|
||||
Public Const EN_ELEVATION = 0 ' Node parameters
|
||||
@@ -63,6 +63,7 @@ Public Const EN_PUMP_ECOST = 21
|
||||
Public Const EN_PUMP_EPAT = 22
|
||||
Public Const EN_LINK_INCONTROL = 23
|
||||
Public Const EN_GPV_CURVE = 24
|
||||
Public Const EN_PCV_CURVE= 25
|
||||
|
||||
Public Const EN_DURATION = 0 ' Time parameters
|
||||
Public Const EN_HYDSTEP = 1
|
||||
@@ -117,6 +118,7 @@ Public Const EN_PBV = 5
|
||||
Public Const EN_FCV = 6
|
||||
Public Const EN_TCV = 7
|
||||
Public Const EN_GPV = 8
|
||||
Public Const EN_PCV = 9
|
||||
|
||||
Public Const EN_CLOSED = 0 ' Link status types
|
||||
Public Const EN_OPEN = 1
|
||||
@@ -209,6 +211,7 @@ Public Const EN_PUMP_CURVE = 1 ' Pump curve
|
||||
Public Const EN_EFFIC_CURVE = 2 ' Efficiency curve
|
||||
Public Const EN_HLOSS_CURVE = 3 ' Head loss curve
|
||||
Public Const EN_GENERIC_CURVE = 4 ' Generic curve
|
||||
Public Const EN_VALVE_CURVE = 5 ' Valve position curve
|
||||
|
||||
Public Const EN_UNCONDITIONAL = 0 ' Unconditional object deletion
|
||||
Public Const EN_CONDITIONAL = 1 ' Conditional object deletion
|
||||
|
||||
@@ -161,6 +161,10 @@ extern "C" {
|
||||
|
||||
int DLLEXPORT ENtimetonextevent(int *eventType, long *duration, int *elementIndex);
|
||||
|
||||
int DLLEXPORT ENsetreportcallback(void (*callback)(void *userData, void *EN_projectHandle, char*));
|
||||
int DLLEXPORT ENsetreportcallbackuserdata(void *userData);
|
||||
|
||||
|
||||
/********************************************************************
|
||||
|
||||
Analysis Options Functions
|
||||
|
||||
@@ -3,7 +3,7 @@ unit epanet2;
|
||||
{ Declarations of imported procedures from the EPANET PROGRAMMERs TOOLKIT }
|
||||
{ (EPANET2.DLL) }
|
||||
|
||||
{Last updated on 02/01/2020}
|
||||
{Last updated on 07/28/2022}
|
||||
|
||||
interface
|
||||
|
||||
@@ -69,6 +69,7 @@ const
|
||||
EN_PUMP_EPAT = 22;
|
||||
EN_LINK_INCONTROL = 23;
|
||||
EN_GPV_CURVE = 24;
|
||||
EN_PCV_CURVE = 25;
|
||||
|
||||
EN_DURATION = 0; { Time parameters }
|
||||
EN_HYDSTEP = 1;
|
||||
@@ -123,6 +124,7 @@ const
|
||||
EN_FCV = 6;
|
||||
EN_TCV = 7;
|
||||
EN_GPV = 8;
|
||||
EN_PCV = 9;
|
||||
|
||||
EN_CLOSED = 0; { Link status types }
|
||||
EN_OPEN = 1;
|
||||
@@ -214,7 +216,8 @@ const
|
||||
EN_PUMP_CURVE = 1;
|
||||
EN_EFFIC_CURVE = 2;
|
||||
EN_HLOSS_CURVE = 3;
|
||||
EN_GENERIC_CURVE = 4;
|
||||
EN_GENERIC_CURVE = 4;
|
||||
EN_VALVE_CURVE = 5;
|
||||
|
||||
EN_UNCONDITIONAL = 0; { Deletion action codes }
|
||||
EN_CONDITIONAL = 1;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
'Declarations of functions in the EPANET PROGRAMMERs TOOLKIT
|
||||
'(EPANET2.DLL) for use with VB.Net.
|
||||
|
||||
'Last updated on 02/01/2020
|
||||
'Last updated on 07/28/2022
|
||||
|
||||
Imports System.Runtime.InteropServices
|
||||
Imports System.Text
|
||||
@@ -67,6 +67,7 @@ Public Const EN_PUMP_ECOST = 21
|
||||
Public Const EN_PUMP_EPAT = 22
|
||||
Public Const EN_LINK_INCONTROL = 23
|
||||
Public Const EN_GPV_CURVE = 24
|
||||
Public Const EN_PCV_CURVE = 25
|
||||
|
||||
Public Const EN_DURATION = 0 ' Time parameters
|
||||
Public Const EN_HYDSTEP = 1
|
||||
@@ -120,6 +121,7 @@ Public Const EN_PBV = 5
|
||||
Public Const EN_FCV = 6
|
||||
Public Const EN_TCV = 7
|
||||
Public Const EN_GPV = 8
|
||||
Public Const EN_PCV = 9
|
||||
|
||||
Public Const EN_NONE = 0 ' Quality analysis types
|
||||
Public Const EN_CHEM = 1
|
||||
@@ -203,6 +205,7 @@ Public Const EN_PUMP_CURVE = 1 ' Pump curve
|
||||
Public Const EN_EFFIC_CURVE = 2 ' Efficiency curve
|
||||
Public Const EN_HLOSS_CURVE = 3 ' Head loss curve
|
||||
Public Const EN_GENERIC_CURVE = 4 ' Generic curve
|
||||
Public Const EN_VALVE_CURVE = 5 ' Valve position curve
|
||||
|
||||
Public Const EN_UNCONDITIONAL = 0 ' Unconditional object deletion
|
||||
Public Const EN_CONDITIONAL = 1 ' Conditional object deletion
|
||||
|
||||
@@ -517,6 +517,18 @@ typedef struct Project *EN_Project;
|
||||
|
||||
********************************************************************/
|
||||
|
||||
/**
|
||||
@brief Set a user-supplied callback function for reporting
|
||||
@param ph an EPANET project handle.
|
||||
@param callback a function pointer with declared signature, which gets called by EPANET for reporting.
|
||||
@return an error code.
|
||||
@details The report callback function must have the signature specified - void(void* userData, EN_Project, char*) -
|
||||
use the userData parameter to pass any client context necessary (a context pointer or wrapper object perhaps).
|
||||
Leave un-set or set the report callback to NULL to revert to EPANET's default behavior.
|
||||
**/
|
||||
int DLLEXPORT EN_setreportcallback(EN_Project ph, void (*callback)(void *userData, void *EN_projectHandle, char*));
|
||||
int DLLEXPORT EN_setreportcallbackuserdata(EN_Project ph, void *userData);
|
||||
|
||||
/**
|
||||
@brief Writes a line of text to a project's report file.
|
||||
@param ph an EPANET project handle.
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
Authors: see AUTHORS
|
||||
Copyright: see AUTHORS
|
||||
License: see LICENSE
|
||||
Last Updated: 02/01/2020
|
||||
Last Updated: 08/13/2022
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
@@ -97,7 +97,8 @@ typedef enum {
|
||||
EN_PUMP_ECOST = 21, //!< Pump average energy price
|
||||
EN_PUMP_EPAT = 22, //!< Pump energy price time pattern index
|
||||
EN_LINK_INCONTROL = 23, //!< Is present in any simple or rule-based control (= 1) or not (= 0)
|
||||
EN_GPV_CURVE = 24 //!< GPV head loss v. flow curve index
|
||||
EN_GPV_CURVE = 24, //!< GPV head loss v. flow curve index
|
||||
EN_PCV_CURVE = 25 //!< PCV loss coeff. curve index
|
||||
} EN_LinkProperty;
|
||||
|
||||
/// Time parameters
|
||||
@@ -203,7 +204,8 @@ typedef enum {
|
||||
EN_PBV = 5, //!< Pressure breaker valve
|
||||
EN_FCV = 6, //!< Flow control valve
|
||||
EN_TCV = 7, //!< Throttle control valve
|
||||
EN_GPV = 8 //!< General purpose valve
|
||||
EN_GPV = 8, //!< General purpose valve
|
||||
EN_PCV = 9 //!< Positional control valve
|
||||
} EN_LinkType;
|
||||
|
||||
/// Link status
|
||||
@@ -409,7 +411,8 @@ typedef enum {
|
||||
EN_PUMP_CURVE = 1, //!< Pump head v. flow curve
|
||||
EN_EFFIC_CURVE = 2, //!< Pump efficiency v. flow curve
|
||||
EN_HLOSS_CURVE = 3, //!< Valve head loss v. flow curve
|
||||
EN_GENERIC_CURVE = 4 //!< Generic curve
|
||||
EN_GENERIC_CURVE = 4, //!< Generic curve
|
||||
EN_VALVE_CURVE = 5 //!< Valve loss coeff. v. frac. open
|
||||
} EN_CurveType;
|
||||
|
||||
/// Deletion action codes
|
||||
|
||||
Reference in New Issue
Block a user