Should I expect a change in the Hardware settings tab, when I call "SettingsManager.UpdateSettings" function?

Hello, I am develop a driver by MIP driver framework. I was wonder, should I expect a change in the Hardware settings tab when I call UpdateSettings?

When I call it, I see the “OnSettingsChanged” event is raised and the value for the specified Hardware (or Device) setting is changed in the code, but not on the settings tab of Management client (the UI is not updated with the new value).

Maybe it generally works that way. I just want to know is that the way it works or I missing something?

I am using Xprotect 2020 R2, MIP SDK 2020 R3.

If you want to see your update, you need to refresh with press F5 key on Management Client.

Hi Rie, thank you for the reply.

Actually, I didn’t mention in the question that I`ve tried to refresh, but nothing changes.

Attached are couple of captures from my log, I am using one Hardware setting and one Device setting (these are dummy settings, so ignore names :slight_smile: ).

You can see OnSettinsChanged is raised and the new values are valid, but UI doesn’t change even if I do refresh (see CaptureHardwareUpdateSettings.png, CaptureDeviceUpdSettings.png).

If I restart my device (emulator in this case), the connection is restarted and the old values became valid (see CaptureAfterReconnect).

Maybe I missed something, but I have no idea what, below is the way I am changing the settings:

var settings = new List();

settings.Add(new HardwareSetting(Constants.DeviceIpField, “127.1.1.55”));

DeviceSetting ds = _settingsManager.GetSetting(new DeviceSetting(Constants.OutputGain, Constants.Output1.ToString(), “”));

ds.Value = “55”;

settings.Add(ds);

_settingsManager.UpdateSettings(settings, true);

Hi Nikolai,

When you call the UpdateSettings method from the driver, you’re actually only changing the settings locally in the driver process, not in the XProtect system. This also means that they will be overwritten the next time the driver updates settings from the recording server, which it does periodically. I was actually a bit surprised to see you doing it this way, but I realise that this capability might be confusing. What exactly is your reason for wanting to change the settings from the driver?

If you absolutely need to change hardware or device settings, the only way I know of to do that is through the ConfigurationAPI.

Hi Simon,

Thank you for the explanation. I was confused with this “UpdataSettings” method and the way settings can be changed from the driver process.