예제 #1
0
 public RegisterDescription(string name, RegisterGroup group, int i)
 {
     Name  = name;
     Group = group;
     Index = i;
     Group.Count++;
 }
예제 #2
0
 public RegisterDescription(string name, RegisterGroup group, int i)
 {
     Name = name;
     Group = group;
     Index = i;
     Group.Count++;
 }
예제 #3
0
        private void InitializeRegisters()
        {
            WorkerThread.RunOperation(async() =>
            {
                if (_registers != null)
                {
                    return; // already initialized
                }
                string[] names = await MICommandFactory.DataListRegisterNames();

                if (_registers != null)
                {
                    return; // already initialized
                }
                EngineUtils.RegisterNameMap nameMap = EngineUtils.RegisterNameMap.Create(names);
                List <RegisterDescription> desc     = new List <RegisterDescription>();
                var registerGroups = new List <RegisterGroup>();
                for (int i = 0; i < names.Length; ++i)
                {
                    if (String.IsNullOrEmpty(names[i]))
                    {
                        continue;  // ignore the empty names
                    }
                    RegisterGroup grp = GetGroupForRegister(registerGroups, names[i], nameMap);
                    desc.Add(new RegisterDescription(names[i], grp, i));
                }
                _registerGroups = registerGroups.AsReadOnly();
                _registers      = desc.AsReadOnly();
            });
        }
예제 #4
0
 public AD7RegGroupProperty(AD7Engine engine, enum_DEBUGPROP_INFO_FLAGS dwFields, RegisterGroup grp, Tuple <int, string>[] values)
 {
     _engine      = engine;
     _group       = grp;
     _values      = values;
     PropertyInfo = CreateInfo(dwFields);
 }
예제 #5
0
 public AD7RegGroupProperty(AD7Engine engine, enum_DEBUGPROP_INFO_FLAGS dwFields, RegisterGroup grp, Tuple<int, string>[] values)
 {
     _engine = engine;
     _group = grp;
     _values = values;
     PropertyInfo = CreateInfo(dwFields);
 }
예제 #6
0
        private static RegisterGroup GetGroupForRegister(List <RegisterGroup> registerGroups, string name, EngineUtils.RegisterNameMap nameMap)
        {
            string        grpName = nameMap.GetGroupName(name);
            RegisterGroup grp     = registerGroups.FirstOrDefault((g) => { return(g.Name == grpName); });

            if (grp == null)
            {
                grp = new RegisterGroup(grpName);
                registerGroups.Add(grp);
            }
            return(grp);
        }
예제 #7
0
 private static RegisterGroup GetGroupForRegister(List<RegisterGroup> registerGroups, string name, EngineUtils.RegisterNameMap nameMap)
 {
     string grpName = nameMap.GetGroupName(name);
     RegisterGroup grp = registerGroups.FirstOrDefault((g) => { return g.Name == grpName; });
     if (grp == null)
     {
         grp = new RegisterGroup(grpName);
         registerGroups.Add(grp);
     }
     return grp;
 }