Updated header files following #751

Updated header files following #751
This commit is contained in:
Elad Salomons
2023-09-14 13:35:05 +03:00
parent c84c6baee2
commit 8a84668f63
5 changed files with 56 additions and 16 deletions

View File

@@ -3,7 +3,7 @@ using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
//epanet2.cs[By Oscar Vegas]
//Last updated on 07/18/2023
//Last updated on 09/14/2023
//Declarations of functions in the EPANET PROGRAMMERs TOOLKIT
//(EPANET2.DLL) for use with C#
@@ -269,7 +269,9 @@ namespace EpanetCSharpLibrary
public const double EN_MISSING = -1.0E10;
public const double EN_SET_CLOSED = -1.0E10
public const double EN_SET_OPEN = 1.0E10
public const int EN_FALSE = 0 // boolean false
public const int EN_TRUE = 1 // boolean true
#region Epanet Imports
@@ -629,6 +631,12 @@ namespace EpanetCSharpLibrary
[DllImport(EPANETDLL, EntryPoint = "ENsetcontrol")]
public static extern int ENsetcontrol(int index, int type, int linkIndex, float setting, int nodeIndex, float level);
[DllImport(EPANETDLL, EntryPoint = "ENgetcontrolenabled")]
public static extern int ENgetcontrolenabled(int index, int out_enabled);
[DllImport(EPANETDLL, EntryPoint = "ENsetcontrolenabled")]
public static extern int ENsetcontrolenabled(int index, int enabled);
//Rule-Based Control Functions
[DllImport(EPANETDLL, EntryPoint = "ENaddrule")]
@@ -673,6 +681,11 @@ namespace EpanetCSharpLibrary
[DllImport(EPANETDLL, EntryPoint = "ENsetelseaction")]
public static extern int ENsetelseaction(int ruleIndex, int actionIndex, int linkIndex, int status, float setting);
[DllImport(EPANETDLL, EntryPoint = "ENgetruleenabled")]
public static extern int ENgetruleenabled(int index, int out_enabled);
[DllImport(EPANETDLL, EntryPoint = "ENsetruleenabled")]
public static extern int ENsetruleenabled(int index, int enabled);
#endregion
}