Initialization( ) changed, is abstract in ComponentBase, builds OK.
This commit is contained in:
@@ -21,15 +21,15 @@ namespace TBF.Rig.Various.CoverTest
|
||||
readonly CoverTestCfg coverTestCfg;
|
||||
|
||||
readonly CBoard controlBoard;
|
||||
readonly int bitPosition; /// 0 .. 127
|
||||
readonly UInt128 mask; /// derived from bitPosition in the constructor
|
||||
readonly UInt128 target;
|
||||
readonly string message;
|
||||
readonly Users.Entities.GID[] bypassLevel;
|
||||
|
||||
int bitPosition; /// 0 .. 127
|
||||
UInt128 mask; /// derived from bitPosition in the constructor
|
||||
UInt128 target;
|
||||
string message;
|
||||
Users.Entities.GID[] bypassLevel;
|
||||
|
||||
public CoverTest()
|
||||
{
|
||||
}
|
||||
|
||||
public CoverTest() { }
|
||||
|
||||
public CoverTest(Generic.IComponentCfg cfg, IList<Generic.IComponent> components)
|
||||
: base(cfg)
|
||||
@@ -39,9 +39,14 @@ namespace TBF.Rig.Various.CoverTest
|
||||
controlBoard = (CBoard)TbfComponents.FindComponent(cfg.ParentName, components);
|
||||
if (controlBoard == null) throw new Exception("Cannot find " + Name + " parent");
|
||||
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
bitPosition = coverTestCfg.BitNr;
|
||||
mask = (((UInt128)1) << coverTestCfg.BitNr);
|
||||
target = coverTestCfg.Inverted ? 0 : mask;
|
||||
target = coverTestCfg.Inverted ? 0 : mask;
|
||||
message = coverTestCfg.Message;
|
||||
var groups = new List<Users.Entities.GID>();
|
||||
if (coverTestCfg.BypassGroup1 != Users.Entities.GID.None) groups.Add(coverTestCfg.BypassGroup1);
|
||||
@@ -49,9 +54,7 @@ namespace TBF.Rig.Various.CoverTest
|
||||
if (coverTestCfg.BypassGroup3 != Users.Entities.GID.None) groups.Add(coverTestCfg.BypassGroup3);
|
||||
if (coverTestCfg.BypassGroup4 != Users.Entities.GID.None) groups.Add(coverTestCfg.BypassGroup4);
|
||||
bypassLevel = groups.ToArray();
|
||||
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public int ConditionsCount { get { return 1; } }
|
||||
|
||||
Reference in New Issue
Block a user