adds api support for enabling/disabling controls and rules
This commit is contained in:
@@ -1640,6 +1640,23 @@ typedef struct Project *EN_Project;
|
||||
int DLLEXPORT EN_setcontrol(EN_Project ph, int index, int type, int linkIndex,
|
||||
double setting, int nodeIndex, double level);
|
||||
|
||||
/**
|
||||
@brief Gets the enabled status of a simple control.
|
||||
@param ph an EPANET project handle.
|
||||
@param index the control's index (starting from 1).
|
||||
@param out_enabled the control will be either enabled or disabled.
|
||||
@return an error code.
|
||||
*/
|
||||
int DLLEXPORT EN_getcontrolenabled(EN_Project ph, int index, int *out_enabled);
|
||||
|
||||
/**
|
||||
@brief Sets the enabled status of a simple control.
|
||||
@param ph an EPANET project handle.
|
||||
@param index the control's index (starting from 1).
|
||||
@param enabled set the control to either enabled or disabled.
|
||||
@return an error code.
|
||||
*/
|
||||
int DLLEXPORT EN_setcontrolenabled(EN_Project ph, int index, int enabled);
|
||||
|
||||
/********************************************************************
|
||||
|
||||
@@ -1824,6 +1841,24 @@ typedef struct Project *EN_Project;
|
||||
*/
|
||||
int DLLEXPORT EN_setrulepriority(EN_Project ph, int index, double priority);
|
||||
|
||||
/**
|
||||
@brief Gets the enabled status of a rule-based control.
|
||||
@param ph an EPANET project handle.
|
||||
@param index the rule's index (starting from 1).
|
||||
@param out_enabled the rule will be either enabled or disabled.
|
||||
@return an error code.
|
||||
*/
|
||||
int DLLEXPORT EN_getruleenabled(EN_Project ph, int index, int *out_enabled);
|
||||
|
||||
/**
|
||||
@brief Sets the enabled status of a rule-based control.
|
||||
@param ph an EPANET project handle.
|
||||
@param index the rule's index (starting from 1).
|
||||
@param enabled set the rule to either enabled or disabled.
|
||||
@return an error code.
|
||||
*/
|
||||
int DLLEXPORT EN_setruleenabled(EN_Project ph, int index, int enabled);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user