/** * <summary> * Returns the state of the watchdog (A for the idle position, B for the active position). * <para> * </para> * <para> * </para> * </summary> * <returns> * either <c>YWatchdog.STATE_A</c> or <c>YWatchdog.STATE_B</c>, according to the state of the watchdog * (A for the idle position, B for the active position) * </returns> * <para> * On failure, throws an exception or returns <c>YWatchdog.STATE_INVALID</c>. * </para> */ public int get_state() { if (_func == null) { throw new YoctoApiProxyException("No Watchdog connected"); } // our enums start at 0 instead of the 'usual' -1 for invalid return(_func.get_state() + 1); }