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()
''' Created on 2015. 11. 11. @author: ahn ''' from Morocon.Dao import MapDao from models import Map mapDaoIns = MapDao() class MapManager(): def addMap(self, map): mapDaoIns.add(map) def deleteMap(self, key): mapDaoIns.delete(key) def getMapList(self): return mapDaoIns.getAll() def getMap(self, key): return mapDaoIns.get(key) def getMapInfo(self): return Map()