Esempio n. 1
0
 /**
  * <summary>
  *   Changes the  parameter  type (sensor value, presence or pulse count) returned by the get_currentValue function and callbacks.
  * <para>
  *   The edge count value is limited to the 6 lowest digits. For values greater than one million, use
  *   get_pulseCounter().
  *   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>YProximity.PROXIMITYREPORTMODE_NUMERIC</c>,
  *   <c>YProximity.PROXIMITYREPORTMODE_PRESENCE</c> and <c>YProximity.PROXIMITYREPORTMODE_PULSECOUNT</c>
  *   corresponding to the  parameter  type (sensor value, presence or pulse count) returned by the
  *   get_currentValue function and callbacks
  * </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_proximityReportMode(int newval)
 {
     if (_func == null)
     {
         throw new YoctoApiProxyException("No Proximity connected");
     }
     if (newval == _ProximityReportMode_INVALID)
     {
         return(YAPI.SUCCESS);
     }
     // our enums start at 0 instead of the 'usual' -1 for invalid
     return(_func.set_proximityReportMode(newval - 1));
 }