Hello,
I am currently developing a standalone-type plugin in which our EXE file is launched by the Milestone XProtect Event Server.
I have two questions regarding the MIP SDK.
1. How can I retrieve the hardware devices currently registered on a Recording Server through the MIP SDK?
I tried the following approach:
private cameraList;
private void FindCamera()
{
cameraList = new List<item>();
// Configuration.Instance : VideoOS.Platform.SDK.Platform.SDKConfiguration
List<Item> list = Configuration.Instance.GetItemsByKind(Kind.Camera);
foreach (Item item in list)
{
var list = CheckChildren(item);
if (list.Count > 0) cameraList.AddRange(list);
}
}
private List<Item> CheckChildren(Item parent)
{
List<Item> camList = new List<Item>();
List<Item> itemsOnNextLevel = parent.GetChildren();
if (itemsOnNextLevel != null)
{
foreach (Item item in itemsOnNextLevel)
{
if (item.FQID.Kind == Kind.Camera && item.FQID.FolderType == FolderType.No)
{
camList.Add(item);
}
else if (item.HasChildren != HasChildren.No)
{
var lst = CheckChildren(item);
if (lst.Count > 0) cameraList.AddRange(lst);
}
}
}
}
In this case, Configuration.Instance is VideoOS.Platform.SDK.Platform.SDKConfiguration.
This approach appears to work correctly, but I found that devices that have already been deleted from the Recording Server are still included in the returned results.
The deleted devices are only removed from the results of Configuration.Instance.GetItemsByKind() after restarting the Milestone XProtect Event Server.
Also, since the Item.Enabled property of a deleted device is still returned as true, I could not find a reliable way to determine which devices have actually been deleted.
Therefore, I would like to know if there is a recommended way to retrieve the latest/current list of devices actually registered on the Recording Server without restarting the XProtect Event Server.
Is there another API or method that can be used to refresh or retrieve the latest device configuration?
2. Is there a way to receive an event when a new device is registered on or removed from a Recording Server?
Currently, I have tried using the following message IDs to catch configuration changes:
MessageId.System.LocalConfigurationChangedIndication
MessageId.System.SystemConfigurationChangedIndication
However, when I tested this by adding and removing devices from the Recording Server, these events did not appear to be triggered.
Is there a specific event or message ID in the MIP SDK that is triggered when a hardware device is added to or removed from a Recording Server, so that the plugin can detect these changes without restarting the XProtect Event Server?
The XProtect version I am using is 2025 R3, and the MIP SDK version is 22.3.0.
I would appreciate any guidance on the appropriate API, method, or event mechanism for handling these two scenarios.
Thank you in advance for your help.
Best regards,