Properly selecting the metadata device assigned to a camera

Hello,

I am implementing a Smart Client plugin for displaying metadata information on overlays.

I can get the current camera item based on the FQID, so the metadata devices related to this camera are also available:

var cameraItem = Configuration.Instance.GetItem(imageViewerAddOn.CameraFQID);
var relatedMetadata = cameraItem.GetRelated().Where(i => i.FQID.Kind == Kind.Metadata);

The problem is there can be several metadata devices assigned to a single camera and I need to select a specific one for processing, but there are hardly any information of them available. So far I have used the device name but this is not a robust solution: the name can be changed by the user in the Management Client thus it is not safe to use.

Is there a recommended way to select a device?

When the metadata device properties are opened, a Channel=0 property is visible. Is it possible to add and set an other property like this?

Thank you,

Andras

If you use the Config Access via SDK sample you can explore the configuration information, for metadata devices it does include a channel property, if this is useful for you it is OK to use.

Please note that if there are multiple related metadata devices on one camera I will not be able to tell you which to use, hopefully you will with deeper knowledge of the use scenario be able to implement something that works correctly for you.

Dear Rie,

Thank you for your answer.

I have seen the channel property. But is it possible to define a new property for a metadata device which will be visible at the configuration information?

Also is it possible to set the above mentioned channel property to a custom value? I have tried to do that but without success.

Andras

The channel property is read only and gets created when the device is first added to the system.

You can make your own items or properties.

If you want to create your own properties that fit into the configuration setup in the Management Client for the Metadata device you can use a TabPlugin. The Admin Tab Plugin sample shows this used. You can modify the sample to work with metadata instead of camera, and any device instead of only Axis. https://doc.developer.milestonesys.com/html/index.html?base=samples/admintabplugin.html&tree=tree_2.html