Exemple #1
0
    def __init__(self, rNumber=None):
        """
        Constructor 
        
        :parameter: bot
        :pType: ldvbot.robot
        """
        self._rNumber = None
        self._port = None
        self._connectionStatus = False
        self._communication = lCommunication.communication(self)

        if rNumber == None:
            logging.exception('Parameter rNumber for LDVbot is missing')
            raise ValueError('Parameter rNumber for LDVbot is missing')
        else:
            self._rNumber = rNumber

        self._movement = lMovement.movement(self)
        self._proximity = lProximitysensor.proximitysensor(self)
        self._floor = lFloorsensor.floorsensor(self)
        self._led1 = lLed.led(self, 1)
        self._led2 = lLed.led(self, 2)
        self._led3 = lLed.led(self, 3)
        self._battery = lBattery.battery(self)
        self._botID = lBotID.robotID(self)
        self._infrared = lInfrared.infrared(self)
        self._analog = lAnalog.analog(self)
 def __init__(self, bot):
     """
     Constructor 
     
     :parameter: bot
     :pType: ldvbot.robot
     """
     if isinstance(bot, ldvbot.robot):
         self._robot = bot
         self._communication = lCommunication.communication(self._robot)
     else:
         logging.error('Parameter has to be of type robot')
         raise ValueError("Parameter has to be of type robot")