/** * <summary> * Changes the watchdog running state at module power on. * <para> * Remember to call the * <c>saveToFlash()</c> method and then to reboot the module to apply this setting. * </para> * <para> * </para> * </summary> * <param name="newval"> * either <c>YWatchdog.AUTOSTART_OFF</c> or <c>YWatchdog.AUTOSTART_ON</c>, according to the watchdog * running state at module power on * </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_autoStart(int newval) { if (_func == null) { throw new YoctoApiProxyException("No Watchdog connected"); } if (newval == _AutoStart_INVALID) { return(YAPI.SUCCESS); } // our enums start at 0 instead of the 'usual' -1 for invalid return(_func.set_autoStart(newval - 1)); }