// 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); }
public cfgOutputs() { identifier = _identifier; id_number = 2; allows_multiple = false; binary_struct = new BinaryFormat(); configs = new List <ConfigParameter>(); SuperIO.AddPhysicalMappings(ref configs); }
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); }