/**
  * <summary>
  *   Changes the activation of the YoctoHub port.
  * <para>
  *   If the port is enabled, the
  *   connected module is powered. Otherwise, port power is shut down.
  * </para>
  * <para>
  * </para>
  * </summary>
  * <param name="newval">
  *   either <c>YHubPort.ENABLED_FALSE</c> or <c>YHubPort.ENABLED_TRUE</c>, according to the activation
  *   of the YoctoHub port
  * </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_enabled(int newval)
 {
     if (_func == null)
     {
         throw new YoctoApiProxyException("No HubPort connected");
     }
     if (newval == _Enabled_INVALID)
     {
         return(YAPI.SUCCESS);
     }
     // our enums start at 0 instead of the 'usual' -1 for invalid
     return(_func.set_enabled(newval - 1));
 }