/** * <summary> * Returns the number of edges detected per preiod. * <para> * For a clean PWM signal, this should be exactly two, * but in cas the signal is created by a mechanical contact with bounces, it can get higher. * </para> * <para> * </para> * </summary> * <returns> * an integer corresponding to the number of edges detected per preiod * </returns> * <para> * On failure, throws an exception or returns <c>YPwmInput.EDGESPERPERIOD_INVALID</c>. * </para> */ public int get_edgesPerPeriod() { int res; if (_func == null) { throw new YoctoApiProxyException("No PwmInput connected"); } res = _func.get_edgesPerPeriod(); if (res == YAPI.INVALID_INT) { res = _EdgesPerPeriod_INVALID; } return(res); }