def autoGenerateCameraCollection(self, base_address, nstart, n, port, tail, username, password):
self.camera_collection.clear()<EOL>self.camera_collection.save()<EOL>cc = nstart<EOL>for i in range(<NUM_LIT:1>, min((n + <NUM_LIT:1>, constant.max_devices + <NUM_LIT:1>))):<EOL><INDENT>print(i)<EOL>self.camera_collection.new(<EOL>self.RTSPCameraRow, <EOL>{<EOL>"<STR_LIT>":         i, <EOL>"<STR_LIT:address>":      base_address+"<STR_LIT:.>"+str(cc),<EOL>"<STR_LIT:username>":     username,<EOL>"<STR_LIT:password>":     password,<EOL>"<STR_LIT:port>":         port,<EOL>"<STR_LIT>":         tail,<EOL>"<STR_LIT>" : "<STR_LIT>",<EOL>"<STR_LIT>"       : True,<EOL>"<STR_LIT>"        : False,<EOL>"<STR_LIT>"  : "<STR_LIT>",<EOL>"<STR_LIT>"        : False,<EOL>"<STR_LIT>"         : False<EOL>})<EOL>cc +=<NUM_LIT:1><EOL><DEDENT>print("<STR_LIT>")<EOL>for c, device in enumerate(self.camera_collection.get()):<EOL><INDENT>print(c+<NUM_LIT:1>, self.RTSPCameraRow.getMainAddressFromDict(device))<EOL><DEDENT>for i in range(n+<NUM_LIT:1>, constant.max_devices + <NUM_LIT:1>):<EOL><INDENT>self.camera_collection.new(self.EmptyRow, {"<STR_LIT>": i})<EOL><DEDENT>self.camera_collection.save()<EOL>print("<STR_LIT>")<EOL>for c, device in enumerate(self.camera_collection.get()):<EOL><INDENT>print(c+<NUM_LIT:1>, device)<EOL><DEDENT>
:param:  base_address    str, e.g. "192.168.1"
:param:  nstart          int, e.g. 24
:param:  n               int, how many ips generated