def autoGenerateCameraCollection(self, base_address, nstart, n, port, tail, username, password):
        """
        :param:  base_address    str, e.g. "192.168.1"
        :param:  nstart          int, e.g. 24
        :param:  n               int, how many ips generated 
        """
        self.camera_collection.clear()
        self.camera_collection.save()
        cc = nstart
        for i in range(1, min((n + 1, constant.max_devices + 1))):
            print(i)
            self.camera_collection.new(
                self.RTSPCameraRow, 
                {
                    "slot":         i, 
                    "address":      base_address+"."+str(cc),
                    "username":     username,
                    "password":     password,
                    "port":         port,
                    "tail":         tail,
                    
                    "subaddress_main" : "",
                    "live_main"       : True,
                    "rec_main"        : False,
                    
                    "subaddress_sub"  : "",
                    "live_sub"        : False,
                    "rec_sub"         : False
                })
            cc +=1
        
        print("Camera addesses now:")
        for c, device in enumerate(self.camera_collection.get()):
            print(c+1, self.RTSPCameraRow.getMainAddressFromDict(device))
        
        for i in range(n+1, constant.max_devices + 1):
            self.camera_collection.new(self.EmptyRow, {"slot": i})

        self.camera_collection.save()
        
        print("Camera collection now:")
        for c, device in enumerate(self.camera_collection.get()):
            print(c+1, device)