Environment - SDK 2023R2 on 2023R2 XProtect Corporate
Architecture - Non-Federated Site with 2 Recording servers
When we try to add a camera (same camera/model) and copy all the settings from the primary recording server to the second recording server using SDK, the below block of code shows that the settings are saved on the secondary server, but the settings are never copied.
DeviceDriverSettings primdds = primarycamera.DeviceDriverSettingsFolder.DeviceDriverSettings;
DeviceDriverSettings secdds = secondarycamera.DeviceDriverSettingsFolder.DeviceDriverSettings;
if (primdds != null)
{
if (primdds.PTZChildItem != null)
{
if (secdds.PTZChildItem != null)
{
secdds.PTZChildItem.Name = primdds.PTZChildItem.Name;
secdds.PTZChildItem.Description = primdds.PTZChildItem.Description;
ConfigurationApiProperties cap1 = primdds.PTZChildItem.Properties;
foreach (string prop in cap1.KeysFullName)
{
secdds.PTZChildItem.SetProperty(prop, primdds.PTZChildItem.GetProperty(prop));
}
}
secdds.Save();
}
}
When the PTZProtocol is Absolute, all the settings get copied.
But when the PTZProtocol is Relative, the settings are never copied, and there are no errors.
The settings are below and are not getting saved.
CHECK deviceptz:0.0/pan/a7c77dac-a453-49b9-8b5b-f62032f68889
PRIMARY–
<control>
<absolutesupport>false</absolutesupport>
<relativesupport>true</relativesupport>
<stopsupport>true</stopsupport>
<startsupport>true</startsupport>
<automaticsupport>false</automaticsupport>
<speedsupport>true</speedsupport>
</control>
SECONDARY–
<control>
<absolutesupport>true</absolutesupport>
<relativesupport>true</relativesupport>
<stopsupport>true</stopsupport>
<startsupport>true</startsupport>
<automaticsupport>false</automaticsupport>
<speedsupport>true</speedsupport>
</control>