Esempio n. 1
0
 //Constructor
 /// <summary>
 /// Creates an initialized instance.
 /// </summary>
 /// <param name="unitNum">The current readout unit number.</param>
 /// <param name="maxNumOfUnits">The maximum number of readout units.</param>
 /// <param name="unitBuildProgress">The holder of the readout unit build progress information.</param>
 /// <param name="groupNum">The current One Takes All group number.</param>
 /// <param name="maxNumOfGroups">The maximum number of One Takes All groups.</param>
 /// <param name="groupBuildProgress">The holder of the One Takes All group build progress information.</param>
 public BuildProgress(int unitNum,
                      int maxNumOfUnits,
                      ReadoutUnit.BuildProgress unitBuildProgress,
                      int groupNum,
                      int maxNumOfGroups,
                      OneTakesAllGroup.BuildProgress groupBuildProgress
                      )
 {
     UnitsTracker       = new ProgressTracker((uint)maxNumOfUnits, (uint)unitNum);
     UnitBuildProgress  = unitBuildProgress;
     GroupsTracker      = new ProgressTracker((uint)maxNumOfGroups, (uint)groupNum);
     GroupBuildProgress = groupBuildProgress;
     return;
 }
Esempio n. 2
0
        private void OnOTAGBuildProgressChanged(OneTakesAllGroup.BuildProgress groupBuildProgress)
        {
            //Prepare readout layer version
            BuildProgress buildProgress = new BuildProgress(Math.Min(_buildReadoutUnitIdx + 1, ReadoutLayerCfg.ReadoutUnitsCfg.ReadoutUnitCfgCollection.Count),
                                                            ReadoutLayerCfg.ReadoutUnitsCfg.ReadoutUnitCfgCollection.Count,
                                                            null,
                                                            Math.Min(_buildOTAGroupIdx + 1, _oneTakesAllGroupCollection.Length),
                                                            _oneTakesAllGroupCollection.Length,
                                                            groupBuildProgress
                                                            );

            //Raise event
            RLBuildProgressChanged?.Invoke(buildProgress);
            return;
        }