Greetings,
we are trying to fetch camera related data from the ConfigAPI, what we need is to get all the recording server → hardware → camera, how can we achieve getting these details and saving them in a list or database using the configAPI?
Greetings,
we are trying to fetch camera related data from the ConfigAPI, what we need is to get all the recording server → hardware → camera, how can we achieve getting these details and saving them in a list or database using the configAPI?
The Config API Sample would give the answer as you can inspect the code. I offer an easier way. The Configuration API has a strongly typed counterpart in the classes in the ConfigurationItems class. Using this to find every camera is done like this..
// using VideoOS.Platform.ConfigurationItems;
private void LoopEveryCamera()
{
ManagementServer managementServer = new ManagementServer(Configuration.Instance.ServerFQID);
foreach (var recordingServer in managementServer.RecordingServerFolder.RecordingServers)
{
foreach (var hardware in recordingServer.HardwareFolder.Hardwares)
{
foreach (var camera in hardware.CameraFolder.Cameras)
{
//build a list
}
}
}
}