/** * <summary> * Changes the current load cell bridge excitation method. * <para> * Remember to call the <c>saveToFlash()</c> method of the module if the * modification must be kept. * </para> * <para> * </para> * </summary> * <param name="newval"> * a value among <c>YMultiCellWeighScale.EXCITATION_OFF</c>, <c>YMultiCellWeighScale.EXCITATION_DC</c> * and <c>YMultiCellWeighScale.EXCITATION_AC</c> corresponding to the current load cell bridge excitation method * </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_excitation(int newval) { if (_func == null) { throw new YoctoApiProxyException("No MultiCellWeighScale connected"); } if (newval == _Excitation_INVALID) { return(YAPI.SUCCESS); } // our enums start at 0 instead of the 'usual' -1 for invalid return(_func.set_excitation(newval - 1)); }