public void SetOwner(Topic owner) {
if(_owner!=null) {
if(Topic.brokerMode) {
_owner.Unsubscribe("+", STVarChanged);
}
}
if(_dev!=null) {
_dev.Pool+=_dev_Pool;
}
_owner=owner;
if(_owner!=null) {
name=owner.name;
if(Topic.brokerMode) {
if(_owner.parent!=null && _owner.parent.valueType==typeof(MsDevice)) {
_dev=(_owner.parent as DVar<MsDevice>).value;
}
_owner.Get<string>("_declarer", _owner).value="TWI";
_owner.Subscribe("+", STVarChanged);
if(_dev!=null) {
_dev.Pool+=_dev_Pool;
Reset();
}
}
}
}
private void _dev_Pool() {