Developing driver in MIP framework based on demo driver sample, the GetSetting method returns null all the time.

We need more info from you. Please tell us what you have in XxxConfigurationManager.BuildDevices() and XxxConfigurationManager.BuildFields() and the code you use to ask.

BuildDevice is the default Auto generated code.

in BuildFields I have few BoolSetupField like:

  fields.Add(new BoolSetupField()

  {

    Key = Constants.DrawingJoints,

    DisplayName = "Joints",

    DisplayNameReferenceId = Guid.Empty,

    IsReadOnly = false,

    ReferenceId = Constants.DrawingJointsRefId,

    DefaultValue = false,

  });

When I add setting to the BuildHardwareSettings I use the following code to retrieve it

HardwareSetting md = _settingsManager.GetSetting(new HardwareSetting(Constants.DrawingJoints, “” ));

if I move the settings to BuildCameraStreams I tried to get it :

StreamSetting sd = _settingsManager.GetSetting(new StreamSetting(Constants.DrawingJoints, _deviceId, _streamId, “”);

What you need to do is have BuildSettings create all the settings that you need, and then reference those same settings in the BuildHardwareSettings (for hardware settings) and the BuildDevices (for device and stream settings) methods. Please explore the DemoDriver sample, because it is exactly done there.

Could you please point me where “BandwidthLimit” value in DemoDriver retrieved? My issue is not creating the setting which is done. Problem is how can I access to setting value.

The only one I find in DemoDriver to get the value is “BoundingBoxColor” in meta date where it returns null all the time

You are right that the sample never reads "BandwidthLimit”.

You should be able to see the value of MetadataSetting.

Please verify that you are using the latest MIP SDK (2020 R2 currently)? (We always recommend using the newest version of MIP SDK, please verify that this is what you use.)

Can you please provide your ConfigurationManager source code for further investigation?

Yes the SDK is 2020 R2. For now we decided to move all of the settings to Metadata stream settings as for Hardware and Video Stream Settings GetSetting API is returning NULL.

I appreciate you can guide me on how I can modified my local copy of DemoDriver to be able to read “BandWidthLimit”. This should be very helpful for others in the forum as well.

The following examples are all based on the DemoDriver, and assume you’re requesting the setting from the corresponding stream session.

To retrieve a video stream setting the following code should work:

var setting = _settingsManager.GetSetting(new StreamSetting(Constants.Codec, _deviceId, _streamId, “”));

To retrieve a hardware setting (for instance BandwidthLimit) the code should look like this:

var setting2 = _settingsManager.GetSetting(new HardwareSetting(Constants.BandwidthLimit, “”));

And for a device setting, the code should look like this:

var setting3 = _settingsManager.GetSetting(new DeviceSetting(Constants.SomeField, _deviceId, “”));

Hope this helps.

unfortunately anything except meta stream return null

When I test with the above code, it works. We will need to see your ConfigurationManager code to understand why this isn’t working as expected.