Which unique identifier should we use for each camera?

We have currently implemented the following code using MIP SDK 3.6

[DllExport(“getCamera”, CallingConvention = CallingConvention.StdCall)]

public static bool getCamera(int id, ref InOutData data, int handlerID)

{

  AlarmHandler \_handler;

  if (!handler.TryGetValue(handlerID, out \_handler))

  {

    return false;

  }

  InOutData aux = new InOutData();

  int i = 0;

  foreach (KeyValuePair<string, string> entry in \_handler.listCamera)

  {

    // do something with entry.Value or entry.Key

    if (i == id)

    {

      Console.WriteLine("camera Name:" + entry.Value);

      [aux.name](https://aux.name) = entry.Key + "///" + Utf16ToUtf8(entry.Value);

      break;

    }

    i++;

  }

  data = aux;

  InOutData.Populate([aux.name](https://aux.name), "", out data);

  return true;

}

to obtain an unique id to identify each camera in our system.

The problem is that this id sometimes changes in some circumstances that we are not aware (grouping cameras in folders!? changing some parameters in milestone!?).

So since we use this as our uniqueID for our system it appears the camera was changed. Is there any other id we can use to identify the cameras and then request video? What affects this id?

The objectId for a camera will never change.

As an example of use -

abstract Item VideoOS.Platform.Configuration.GetItem (Guid objectId, Guid kind )

https://doc.developer.milestonesys.com/html/index.html?base=miphelp/class_video_o_s_1_1_platform_1_1_configuration.html&tree=tree_search.html?search=getitem

The objectId is part of the FQID, which contains more info -

https://doc.developer.milestonesys.com/html/index.html?base=miphelp/class_video_o_s_1_1_platform_1_1_f_q_i_d.html&tree=tree_search.html?search=fqid

The FQID is part of the Item -

https://doc.developer.milestonesys.com/html/index.html?base=miphelp/class_video_o_s_1_1_platform_1_1_item.html&tree=tree_search.html?search=item

The samples will use these objects. I recommend to use objectId and never the name to identify a camera. I do not recognize or see the meaning of the code snippet you have supplied.

Perhaps you can run and explore the ConfigAccessViaSDK sample, it will give a good overview and understanding of the configuration and its parameters etc.

https://doc.developer.milestonesys.com/html/index.html?base=samples/configaccess_sample.html&tree=tree_2.html