:return: None

def parse(self, data):
        """
        :return: None
        """
        # pylint: disable-msg=R0911,C1801
        assert isinstance(data, bytes)
        assert len(data) > 0
        assert len(data) >= velbus.MINIMUM_MESSAGE_SIZE
        assert data[0] == velbus.START_BYTE
        self.logger.debug("Processing message %s", str(data))
        if len(data) > velbus.MAXIMUM_MESSAGE_SIZE:
            self.logger.warning("Velbus message are maximum %s bytes, this one is %s", str(
                velbus.MAXIMUM_MESSAGE_SIZE), str(len(data)))
            return
        if data[-1] != velbus.END_BYTE:
            self.logger.warning("end byte not correct")
            return
        priority = data[1]
        if priority not in velbus.PRIORITY:
            self.logger.warning("unrecognized priority")
            return
        address = data[2]
        rtr = data[3] & velbus.RTR == velbus.RTR
        data_size = data[3] & 0x0F
        if data_size + velbus.MINIMUM_MESSAGE_SIZE != len(data):
            self.logger.warning(
                "length of data size does not match actual length of message")
            return
        if not velbus.checksum(data[:-2])[0] == data[-2]:
            self.logger.warning("Packet has no valid checksum")
            return
        if data_size >= 1:
            if data[4] == 0xff:
                message = velbus.ModuleTypeMessage()
                message.populate(priority, address, rtr, data[5:-2])
                return message
            elif address in self.controller._modules:
                command_value = data[4]
                module_type = self.controller.get_module(address).get_type()
                if velbus.commandRegistry.has_command(command_value, module_type):
                    command = velbus.commandRegistry.get_command(command_value, module_type)
                    message = command()
                    message.populate(priority, address, rtr, data[5:-2])
                    return message
                else:
                    self.logger.warning("received unrecognized command %s from module %s (%s)", str(data[4]), str(address), str(module_type))
            else:
                self.logger.warning("received unrecognized command %s from module %s", str(data[4]), str(address))
        else:
            if rtr:
                message = velbus.ModuleTypeRequestMessage()
                message.populate(priority, address, rtr, "")
                return message
            else:
                self.logger.warning("zero sized message received without rtr set")