private ParameterControllerAdapter CreateParameterControllerAdapter() { var adapter = new ParameterControllerAdapter(_agent.Identity, Url, Channel); AddChild(adapter); return(adapter); }
protected virtual void OnDeviceRegistrationStateChanged(object sender, RegistrationEventArgs e) { var device = e.Device; if (e.State == RegistrationState.Registered) { ParameterControllerAdapter.ParametersUpdated -= OnParametersUpdated; ParameterControllerAdapter.ParametersUpdated += OnParametersUpdated; ParameterControllerAdapter.RegisterDevice(device); } else if (e.State == RegistrationState.Failed) { MsgLogger.WriteError($"{GetType().Name} - OnDeviceRegistrationStateChanged", $"Device ({device.Family}) registration failed!"); } }