def new_message(self, message):
        """
        :return: None
        """
        self.logger.info("New message: " + str(message))
        if isinstance(message, velbus.BusActiveMessage):
            self.logger.info("Velbus active message received")
        if isinstance(message, velbus.ReceiveReadyMessage):
            self.logger.info("Velbus receive ready message received")
        if isinstance(message, velbus.BusOffMessage):
            self.logger.error("Velbus bus off message received")
        if isinstance(message, velbus.ReceiveBufferFullMessage):
            self.logger.error("Velbus receive buffer full message received")
        if isinstance(message, velbus.ModuleTypeMessage):
            self.logger.debug("Module type response received")
            name = message.module_name()
            address = message.address
            m_type = message.module_type
            if name == "Unknown":
                self.logger.warning("Unknown module (code: " + str(message.module_type) + ')')
                return
            if name in velbus.ModuleRegistry:
                module = velbus.ModuleRegistry[name](m_type, name, address, self)
                self._modules[address] = module
            else:
                self.logger.warning("Module " + name + " is not yet supported.")
        for subscriber in self.__subscribers:
            subscriber(message)
def new_message ( self , message ) : self . logger . info ( "New message: " + str ( message ) ) if isinstance ( message , velbus . BusActiveMessage ) : self . logger . info ( "Velbus active message received" ) if isinstance ( message , velbus . ReceiveReadyMessage ) : self . logger . info ( "Velbus receive ready message received" ) if isinstance ( message , velbus . BusOffMessage ) : self . logger . error ( "Velbus bus off message received" ) if isinstance ( message , velbus . ReceiveBufferFullMessage ) : self . logger . error ( "Velbus receive buffer full message received" ) if isinstance ( message , velbus . ModuleTypeMessage ) : self . logger . debug ( "Module type response received" ) name = message . module_name ( ) address = message . address m_type = message . module_type if name == "Unknown" : self . logger . warning ( "Unknown module (code: " + str ( message . module_type ) + ')' ) return if name in velbus . ModuleRegistry : module = velbus . ModuleRegistry [ name ] ( m_type , name , address , self ) self . _modules [ address ] = module else : self . logger . warning ( "Module " + name + " is not yet supported." ) for subscriber in self . __subscribers : subscriber ( message )
:return: None