/** * <summary> * Changes the running state of the watchdog. * <para> * </para> * <para> * </para> * </summary> * <param name="newval"> * either <c>YWatchdog.RUNNING_OFF</c> or <c>YWatchdog.RUNNING_ON</c>, according to the running state * of the watchdog * </param> * <para> * </para> * <returns> * <c>0</c> if the call succeeds. * </returns> * <para> * On failure, throws an exception or returns a negative error code. * </para> */ public int set_running(int newval) { if (_func == null) { throw new YoctoApiProxyException("No Watchdog connected"); } if (newval == _Running_INVALID) { return(YAPI.SUCCESS); } // our enums start at 0 instead of the 'usual' -1 for invalid return(_func.set_running(newval - 1)); }