Esempio n. 1
0
        // parse a value, either as a number, SuperIO mapping or reflection
        private bool ParseValue(string value, out int i)
        {
            i     = 0;
            value = value.ToLower();
            if (TextUtils.IsCNumeric(value))                    // parse as number
            {
                if (TextUtils.ParseInt(value, out i))
                {
                    return(true);
                }
                return(false);
            }

            if (value.StartsWith("@"))                                  // copy another setting
            {
                ConfigParameter item = FindParameterByIdentifier(value.Substring(1));
                if (item != null)
                {
                    i = item.value;
                    return(true);
                }
            }

            // parse as identifier
            i = SuperIO.IdentifierToIndex(value);
            if (i == -1)
            {
                return(false);
            }
            return(true);
        }
Esempio n. 2
0
        public cfgOutputs()
        {
            identifier      = _identifier;
            id_number       = 2;
            allows_multiple = false;
            binary_struct   = new BinaryFormat();
            configs         = new List <ConfigParameter>();

            SuperIO.AddPhysicalMappings(ref configs);
        }
Esempio n. 3
0
        public cfgMapping()
        {
            identifier      = _identifier;
            id_number       = 4;
            allows_multiple = true;
            binary_struct   = new BinaryFormat();
            configs         = new List <ConfigParameter>();

            SuperIO.AddLogicalMappings(ref configs);
            //SuperIO.AddPhysicalMappings(ref configs);
        }