|
int DLLEXPORT | EN_addcontrol (EN_Project ph, int type, int linkIndex, double setting, int nodeIndex, double level, int *out_index) |
| Adds a new simple control to a project.
|
|
int DLLEXPORT | EN_deletecontrol (EN_Project ph, int index) |
| Deletes an existing simple control.
|
|
int DLLEXPORT | EN_getcontrol (EN_Project ph, int index, int *out_type, int *out_linkIndex, double *out_setting, int *out_nodeIndex, double *out_level) |
| Retrieves the properties of a simple control.
|
|
int DLLEXPORT | EN_setcontrol (EN_Project ph, int index, int type, int linkIndex, double setting, int nodeIndex, double level) |
| Sets the properties of an existing simple control.
|
|
int DLLEXPORT | EN_getcontrolenabled (EN_Project ph, int index, int *out_enabled) |
| Gets the enabled status of a simple control.
|
|
int DLLEXPORT | EN_setcontrolenabled (EN_Project ph, int index, int enabled) |
| Sets the enabled status of a simple control.
|
|
These functions are used for working with simple conditional controls.
◆ EN_addcontrol()
int DLLEXPORT EN_addcontrol |
( |
EN_Project | ph, |
|
|
int | type, |
|
|
int | linkIndex, |
|
|
double | setting, |
|
|
int | nodeIndex, |
|
|
double | level, |
|
|
int * | out_index ) |
Adds a new simple control to a project.
- Parameters
-
| ph | an EPANET project handle. |
| type | the type of control to add (see EN_ControlType). |
| linkIndex | the index of a link to control (starting from 1). |
| setting | control setting applied to the link. |
| nodeIndex | index of the node used to control the link (0 for EN_TIMER and EN_TIMEOFDAY controls). |
| level | action level (tank level, junction pressure, or time in seconds) that triggers the control. |
[out] | out_index | index of the new control. |
- Returns
- an error code.
◆ EN_deletecontrol()
int DLLEXPORT EN_deletecontrol |
( |
EN_Project | ph, |
|
|
int | index ) |
Deletes an existing simple control.
- Parameters
-
ph | an EPANET project handle. |
index | the index of the control to delete (starting from 1). |
- Returns
- an error code.
◆ EN_getcontrol()
int DLLEXPORT EN_getcontrol |
( |
EN_Project | ph, |
|
|
int | index, |
|
|
int * | out_type, |
|
|
int * | out_linkIndex, |
|
|
double * | out_setting, |
|
|
int * | out_nodeIndex, |
|
|
double * | out_level ) |
Retrieves the properties of a simple control.
- Parameters
-
| ph | an EPANET project handle. |
| index | the control's index (starting from 1). |
[out] | out_type | the type of control (see EN_ControlType). |
[out] | out_linkIndex | the index of the link being controlled. |
[out] | out_setting | the control setting applied to the link. |
[out] | out_nodeIndex | the index of the node used to trigger the control (0 for EN_TIMER and EN_TIMEOFDAY controls). |
[out] | out_level | the action level (tank level, junction pressure, or time in seconds) that triggers the control. |
- Returns
- an error code.
◆ EN_getcontrolenabled()
int DLLEXPORT EN_getcontrolenabled |
( |
EN_Project | ph, |
|
|
int | index, |
|
|
int * | out_enabled ) |
Gets the enabled status of a simple control.
- Parameters
-
ph | an EPANET project handle. |
index | the control's index (starting from 1). |
out_enabled | EN_TRUE (= 1) if the control is enabled or EN_FALSE (= 0) if it is disabled. |
- Returns
- an error code.
◆ EN_setcontrol()
int DLLEXPORT EN_setcontrol |
( |
EN_Project | ph, |
|
|
int | index, |
|
|
int | type, |
|
|
int | linkIndex, |
|
|
double | setting, |
|
|
int | nodeIndex, |
|
|
double | level ) |
Sets the properties of an existing simple control.
- Parameters
-
ph | an EPANET project handle. |
index | the control's index (starting from 1). |
type | the type of control (see EN_ControlType). |
linkIndex | the index of the link being controlled. |
setting | the control setting applied to the link. |
nodeIndex | the index of the node used to trigger the control (0 for EN_TIMER and EN_TIMEOFDAY controls). |
level | the action level (tank level, junction pressure, or time in seconds) that triggers the control. |
- Returns
- an error code.
◆ EN_setcontrolenabled()
int DLLEXPORT EN_setcontrolenabled |
( |
EN_Project | ph, |
|
|
int | index, |
|
|
int | enabled ) |
Sets the enabled status of a simple control.
- Parameters
-
ph | an EPANET project handle. |
index | the control's index (starting from 1). |
enabled | EN_TRUE (= 1) sets the control to enabled, EN_FALSE (= 0) sets it to disabled. |
- Returns
- an error code.