class MissionManager(object): def __init__(self): self.missionDaoIns = MissionDao() self.mapDaoIns = MapDao() self.robotDaoIns = RobotDao() def getCurrentMissionList(self): return self.missionDaoIns.getAll() def getMission(self, key): return self.missionDaoIns.get(key) def getMap(self, mission): return self.mapDaoIns.get(mission.map_key) def getRobot(self, mission): return self.robotDaoIns.get(mission.robot_key) def start_Explore(self, path, targetPos, PathManagerIns): if interface.explore(interface(), path, self, targetPos, PathManagerIns) == 'printPath': return 'printPath' def makeNewPath(self, hazard, curPos, targetPos, PathManagerIns): # curPos - Start Point print 'Find New Path' PathManagerIns.pathGenerator(hazard, self, curPos, targetPos, PathManagerIns) def AddColorBlob(self, colorArr, PathManagerIns): PathManagerIns.addColorBlob(colorArr) def setPreviousPath(self, path, PathManagerIns): PathManagerIns.setPreviousPath(path)
class MissionManager(object): def __init__(self): self.missionDaoIns = MissionDao() self.mapDaoIns = MapDao() self.robotDaoIns = RobotDao() def getCurrentMissionList(self): return self.missionDaoIns.getAll() def getMission(self, key): return self.missionDaoIns.get(key) def getMap(self, mission): return self.mapDaoIns.get(mission.map_key) def getRobot(self, mission): return self.robotDaoIns.get(mission.robot_key) def start_Explore(self, path, targetPos, PathManagerIns): if interface.explore(interface(), path, self, targetPos, PathManagerIns) == 'printPath' : return 'printPath' def makeNewPath(self, hazard, curPos, targetPos, PathManagerIns): # curPos - Start Point print 'Find New Path' PathManagerIns.pathGenerator(hazard, self, curPos, targetPos, PathManagerIns) def AddColorBlob(self, colorArr, PathManagerIns): PathManagerIns.addColorBlob(colorArr) def setPreviousPath(self, path, PathManagerIns): PathManagerIns.setPreviousPath(path)
def __init__(self): self.missionDaoIns = MissionDao() self.mapDaoIns = MapDao() self.robotDaoIns = RobotDao()