Is it possible for an SDK based client application to be notified when presets / cameras are added and removed on the server using the Management Client ?
Yes, this is certainly possible thru the VideoOS.Platform.Messaging.MessageId.Server Class
member below, but please note that this does not tell what has changed, and you will have to parse thru the entire configuration, if you need to act on a specific change.
ConfigurationChangedIndication = “Server.ConfigurationChangedIndication”
This message is being sent by the Environment to indicate that some part of a plug-in configuration has changed.
The Message.RelatedFQID defines the top most Item that has changed. If the specific Item is not known only the Kind is filled with relevant content.
You may use this information to reload from this Item and all it’s children.
The EventServer will use this information to reload a plug-ins Items and refresh relevant Maps.
Please note that video management server configuration changes are being notified by the similar message under the System namespace (System.SystemConfigurationChangedIndication).
This feature requires the EnvironmentManager.Instance.EnableConfigurationChangedService = true;.
This method seems to work for presets added at the server side. Is there any way of detecting when a preset has been added by another operator at a different workstation ? At present it seems I don’t get a notification in this case and as a result don’t get the new presets added at different client workstations until I disconnect and reconnect to the server.
I would like to understand the scenario. When presets or cameras are modified you sometimes get notification and sometimes not? Do you see any pattern in this? Is it two different Mangement Client doing the modifications and you see only notification when it is one of them? Is it when doing the modification in Smart Client you do not see notification? Please elaborate on what you have done and what you have observed.
PS. I think this one had fallen out of peoples attention. I am sorry to see no replies for this long..
Thanks for the reply.
I am currently testing against
XProtect Corporate 2017 R2 and
XProtect Professional+ 2017
if I use the XProtect Management Client 2017 to add / delete presets then these are reflected through the SDK to all clients more or less immediately using the technique described above.
If I use the ComponentSamples\PTZandPresets sample application (or our SDK integrated application) the preset is added and is visible locally but not on other clients. Nor in the XProtect Management Client application running on the server,
until you disconnect from and reconnect to the server. (This is true even if I force a refresh of the milestone item periodically).
It is also not visible on any XProtect Smart Client until you select the camera and select Manage PTZ Presets. At this point any presets added by the sample app or our sdk integration appear in the list.
If I use the Smart Client application to add and remove presets the behavior is similar.
What extra operations are performed when you select ‘Manage PTZ Presets’ ?
Is there a message that can be subscribed by the sdk client in order to detect that a preset has been added / deleted by another SDK client, such that these extra operations can be executed in order to maintain an accurate list of presets on all clients ?
Best regards,
Damien.
The PTZandPresets sample includes a create presets button. This is in the sample documented not to work in XProtect Corporate (this will also pertain to XProtect Expert and the Plus versions.)
I realize with the new XProtect Plus versions, the message is getting less clear. From a development point of view there is two code bases: One is Corporate, Expert and plus versions, second is Enterprise, Proffesional and Express (without plus).
If you do not use the PTZandPresets sample to manage presets do you see any irregularities?