public RegisterDescription(string name, RegisterGroup group, int i) { Name = name; Group = group; Index = i; Group.Count++; }
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(); }); }
public AD7RegGroupProperty(AD7Engine engine, enum_DEBUGPROP_INFO_FLAGS dwFields, RegisterGroup grp, Tuple <int, string>[] values) { _engine = engine; _group = grp; _values = values; PropertyInfo = CreateInfo(dwFields); }
public AD7RegGroupProperty(AD7Engine engine, enum_DEBUGPROP_INFO_FLAGS dwFields, RegisterGroup grp, Tuple<int, string>[] values) { _engine = engine; _group = grp; _values = values; PropertyInfo = CreateInfo(dwFields); }
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); }
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; }