private bool CheckAddr(byte[] addr) {
Topic ta;
if(addr==null) {
return false;
}
if(this.Addr!=null && this.Addr.Length-1==addr.Length && this.Addr.Skip(1).SequenceEqual(addr)) {
return true;
}
if(Owner!=null) {
for(int i=0; i<3; i++) {
if(Owner.Exist(string.Format(".cfg/_a_phy{0}", i), out ta) && ta.valueType==typeof(PLC.ByteArray)) {
var act=(ta as DVar<PLC.ByteArray>).value;
if(act!=null && act.GetBytes().Length==addr.Length && act.GetBytes().SequenceEqual(addr)) {
return true;
}
}
}
}
return false;
}