/* These are static methods, operable on all cameras without initialising them! */ //Update these static methods every time a new API implementation is added, to make the numbers correct public static int GetNOfAllCameras() { int numberOfCameras = 0; numberOfCameras += CameraXimea.getNOfXimeaCameras(); numberOfCameras += CameraIDS.getNofIDScameras(); return(numberOfCameras); }
public static CameraBase[] InitAllCameras() { CameraBase[] allCameras = new CameraBase[GetNOfAllCameras()]; int index = 0; CameraXimea[] Xcameras = CameraXimea.InitAllXimeaCameras(); Xcameras.CopyTo(allCameras, index); index = Xcameras.Length; //do the same for IDS return(allCameras); }
public static CameraXimea[] InitAllXimeaCameras() { int NofXimeaCameras = getNOfXimeaCameras(); CameraXimea[] allCameras = new CameraXimea[NofXimeaCameras]; try { for (int i = 0; i < NofXimeaCameras; i++) { allCameras[i] = new CameraXimea(i); } } catch (Exception exception) { Logging.Add(exception.ToString() + exception.Message); } return(allCameras); }