//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; }
private void OnReadoutUnitBuildProgressChanged(ReadoutUnit.BuildProgress unitBuildProgress) { int maxNumOfGroups = 0; if (_oneTakesAllGroupCollection != null) { maxNumOfGroups = _oneTakesAllGroupCollection.Length; } //Prepare readout layer version BuildProgress buildProgress = new BuildProgress(Math.Min(_buildReadoutUnitIdx + 1, ReadoutLayerCfg.ReadoutUnitsCfg.ReadoutUnitCfgCollection.Count), ReadoutLayerCfg.ReadoutUnitsCfg.ReadoutUnitCfgCollection.Count, unitBuildProgress, 0, maxNumOfGroups, null ); //Raise event RLBuildProgressChanged?.Invoke(buildProgress); return; }