These functions are used for working with simple conditional controls.
More...
|
int | 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. More...
|
|
int | EN_deletecontrol (EN_Project ph, int index) |
| Deletes an existing simple control. More...
|
|
int | 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. More...
|
|
int | 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. More...
|
|
These functions are used for working with simple conditional controls.
◆ EN_addcontrol()
int 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] | index | index of the new control. |
- Returns
- an error code.
◆ EN_deletecontrol()
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 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] | type | the type of control (see EN_ControlType). |
[out] | linkIndex | the index of the link being controlled. |
[out] | setting | the control setting applied to the link. |
[out] | nodeIndex | the index of the node used to trigger the control (0 for EN_TIMER and EN_TIMEOFDAY controls). |
[out] | level | the action level (tank level, junction pressure, or time in seconds) that triggers the control. |
- Returns
- an error code.
◆ EN_setcontrol()
int 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.