Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change ENgetcontol #37

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Change ENgetcontol #37

wants to merge 1 commit into from

Conversation

BlomTbl
Copy link

@BlomTbl BlomTbl commented Sep 26, 2022

In the following function (line 378)

def ENgetcontrol(self, cindex, ctype, lindex, setting, nindex, level ): <------------- solved: change to ENgetcontrol(self, index)
"""Retrieves the parameters of a simple control statement.
Arguments:
cindex: control statement index
ctype: control type code EN_LOWLEVEL (Low Level Control)
EN_HILEVEL (High Level Control)
EN_TIMER (Timer Control)
EN_TIMEOFDAY (Time-of-Day Control)
lindex: index of link being controlled
setting: value of the control setting
nindex: index of controlling node
level: value of controlling water level or pressure for level controls
or of time of control action (in seconds) for time-based controls"""
#int ENgetcontrol(int cindex, int* ctype, int* lindex, float* setting, int* nindex, float* level )
ierr= self._lib.EN_getcontrol(self.ph, ctypes.c_int(cindex), ctypes.c_int(ctype),
ctypes.c_int(lindex), ctypes.c_float(setting),
ctypes.c_int(nindex), ctypes.c_float(level) )
if ierr!=0: raise ENtoolkitError(self, ierr)

In the following function (line 378)
   
def ENgetcontrol(self, cindex, ctype, lindex, setting, nindex, level ):   <------------- solved: change to ENgetcontrol(self, index)
        """Retrieves the parameters of a simple control statement.
        Arguments:
           cindex:  control statement index
           ctype:   control type code EN_LOWLEVEL   (Low Level Control)
                                      EN_HILEVEL    (High Level Control)
                                      EN_TIMER      (Timer Control)       
                                      EN_TIMEOFDAY  (Time-of-Day Control)
           lindex:  index of link being controlled
           setting: value of the control setting
           nindex:  index of controlling node
           level:   value of controlling water level or pressure for level controls 
                    or of time of control action (in seconds) for time-based controls"""
        #int ENgetcontrol(int cindex, int* ctype, int* lindex, float* setting, int* nindex, float* level )
        ierr= self._lib.EN_getcontrol(self.ph, ctypes.c_int(cindex), ctypes.c_int(ctype), 
                                ctypes.c_int(lindex), ctypes.c_float(setting), 
                                ctypes.c_int(nindex), ctypes.c_float(level) )
        if ierr!=0: raise ENtoolkitError(self, ierr)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant