コード例 #1
0
 /**
  * <summary>
  *   Returns the output state of the relays, when used as a simple switch (single throw).
  * <para>
  * </para>
  * <para>
  * </para>
  * </summary>
  * <returns>
  *   either <c>YRelay.OUTPUT_OFF</c> or <c>YRelay.OUTPUT_ON</c>, according to the output state of the
  *   relays, when used as a simple switch (single throw)
  * </returns>
  * <para>
  *   On failure, throws an exception or returns <c>YRelay.OUTPUT_INVALID</c>.
  * </para>
  */
 public int get_output()
 {
     if (_func == null)
     {
         throw new YoctoApiProxyException("No Relay connected");
     }
     // our enums start at 0 instead of the 'usual' -1 for invalid
     return(_func.get_output() + 1);
 }