Esempio n. 1
0
        /**
         * <summary>
         *   Changes the logical name of the function.
         * <para>
         *   You can use <c>yCheckLogicalName()</c>
         *   prior to this call to make sure that your parameter is valid.
         *   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 string corresponding to the logical name of the function
         * </param>
         * <para>
         * </para>
         * <returns>
         *   <c>YAPI.SUCCESS</c> if the call succeeds.
         * </returns>
         * <para>
         *   On failure, throws an exception or returns a negative error code.
         * </para>
         */
        public async Task <int> set_logicalName(string newval)
        {
            string rest_val;

            if (!YAPI.CheckLogicalName(newval))
            {
                _throw(YAPI.INVALID_ARGUMENT, "Invalid name :" + newval);
            }
            rest_val = newval;
            await _setAttr("logicalName", rest_val);

            return(YAPI.SUCCESS);
        }
 /**
  *
  */
 public bool CheckLogicalName(string name)
 {
     return(YAPI.CheckLogicalName(name));
 }