def METHOD_NAME(self, thermal_num):
    if thermal_num < self.THERMAL_NUM_1_IDX or thermal_num > self.THERMAL_NUM_MAX:
        logging.debug('GET. Parameter error. thermal_num, %d', thermal_num)
        return None
    if thermal_num < self.THERMAL_NUM_6_IDX:
        device_path = self.get_thermal_to_device_path(thermal_num)
        for filename in glob.glob(device_path):
            try:
                val_file = open(filename, 'r')
            except IOError as e:
                logging.error('GET. unable to open file: %s', str(e))
                return None
            content = val_file.readline().rstrip()
            if content == '':
                logging.debug('GET. content is NULL. device_path:%s', device_path)
                return None
            try:
                val_file.close()
            except:
                logging.debug('GET. unable to close file. device_path:%s', device_path)
                return None
            return int(content)
    else:
        log_os_system(self.BCM_thermal_cmd,0)
        file_path = self.BCM_thermal_path
        check_file = open(file_path)
        try:
            check_file = open(file_path)
        except IOError as e:
            print("Error: unable to open file: %s" % str(e)) 
            return 0  
        file_str = check_file.read()
        search_str="average current temperature is"
        str_len = len(search_str)
        idx=file_str.find(search_str)
        if idx==-1:
            logging.debug('bcm sdk is not ready ,retrun 0')
            return 0
        else:
            temp_str=file_str[idx+str_len+1] + file_str[idx+str_len+2] + file_str[idx+str_len+3]+file_str[idx+str_len+4] +file_str[idx+str_len+5]
            check_file.close()                 
            return float(temp_str)*1000