Hello,
I am writing my own metadata driver to read from kafka streams.
Unique deviceId is set at the ConfigurationManager/BuildDevices() method and this Id is received at the StreamManager when the stream session is created.
However in the Management Client a different ID is displayed when I click on the device holding the CTRL key and this different ID is received via the Server SOAP Protocol.
Is the former deviceId (set at the BuildDevices) available via the Server SOAP Protocol?
Additionally, is the latter deviceID (visible in the Management Client and received via the API) available from the code (especially from the StreamManager) ?
e.g.:
A metadata device is added with the “b83e101b-de07-4520-9225-2436acbf0368” GUID and the CreateSession function is invoked with this deviceId.
But via the Server SOAP Protocol the following ID is received:
9afe20b1-893c-4774-925e-2499fe832941
Thank you,
Andras
The IDs defined within the device driver are only for identifying the configuration supported by a driver. This is used internally in the Recording Server, but otherwise not used nor are available in the VMS.
When a new hardware is added each part of it (e.g. the streams) will be assigned new unique IDs in order to be able to refer to each one of them uniquely throughout the VMS. These IDs are available through the SDK, but as each session in the device driver are only supposed to handle one piece of hardware/device it is not relevant for the driver to know these IDs and thus they are not available inside the driver.
So generally the answer to your questions are no. If you need to provide information between driver instances and plugins/integrations in the VMS you might be able to utilize properties on the device instead. Those can be accessed from both sides, but need to be defined by the driver.
Thank you, Peter,
Is there a sample or example how the driver properties can be accessed by a plugin/integration?
Additionally, is it possible to get the name of a device (which appears on the Management Client) from the StreamManager?
E.g:
A device is created by the ConfigurationManager:
devices.Add(new MetadataDeviceDefinition()
{
DisplayName = "Bounding box & GPS",
DeviceId = Constants.Metadata1.ToString(),
Streams = BuildMetadataStreams(),
});
Is this "Bounding box & GPS"value accessible from the StreamManager?
You can access the properties through the Configuration API. The easiest is to use the strongly typed Config API classes in the ConfigurationItems namespace - e.g. Camera. However, I don’t think we have a sample directly showcasing how to get the properties through these classes, but it should be pretty straightforward. Otherwise have a look at the Configuration API Client sample which does it through the raw API (not a very good sample to investigate the code in, though).
As to accessing the name from inside the driver this is unfortunately not possible. Even the names you apply in the ConfigurationManager are only the names to be used initially - the administrator can change them subsequently and thus you cannot count on them.