Exemple #1
0
        private void parseSmartInformation(byte[] SMARTinfo, ref List <string[]> rowCollection)
        {
            SMARTLog smartLog = new SMARTLog();

            separatSmartValue(SMARTinfo, ref smartLog);
            organizeSmartValue(smartLog, ref rowCollection);
        }
Exemple #2
0
 private void organizeSmartValue(SMARTLog smartLog, ref List <string[]> rowCollection)
 {
     rowCollection.Add(new string[4] {
         "01", "Raw Read Error Rate", smartLog.raw_read_err.content, smartLog.raw_read_err.raw
     });
     rowCollection.Add(new string[4] {
         "05", "Reallocated Sectors Count", smartLog.reallocate_sector_cnt.content, smartLog.reallocate_sector_cnt.raw
     });
     rowCollection.Add(new string[4] {
         "09", "Power-On Hours", smartLog.pwr_on_hrs.content, smartLog.pwr_on_hrs.raw
     });
     rowCollection.Add(new string[4] {
         "0C", "Power Cycle Count", smartLog.pwr_cycle_cnt.content, smartLog.pwr_cycle_cnt.raw
     });
     rowCollection.Add(new string[4] {
         "A0", "Uncorrectable Sector Count", smartLog.uncorrect_sector_cnt.content, smartLog.uncorrect_sector_cnt.raw
     });
     rowCollection.Add(new string[4] {
         "A1", "Valid Spare Blocks", smartLog.vaild_spare.content, smartLog.vaild_spare.raw
     });
     rowCollection.Add(new string[4] {
         "A3", "Initial Invalid Blocks", smartLog.init_invalid_blks.content, smartLog.init_invalid_blks.raw
     });
     rowCollection.Add(new string[4] {
         "A4", "Total TLC Erase Count", smartLog.total_tlc_erase_cnt.content, smartLog.total_tlc_erase_cnt.raw
     });
     rowCollection.Add(new string[4] {
         "A5", "Maximum TLC Erase Count", smartLog.max_tlc_erase_cnt.content, smartLog.max_tlc_erase_cnt.raw
     });
     rowCollection.Add(new string[4] {
         "A6", "Minimum TLC Erase Count", smartLog.min_tlc_erase_cnt.content, smartLog.min_tlc_erase_cnt.raw
     });
     rowCollection.Add(new string[4] {
         "A7", "Average TLC Erase Count", smartLog.avg_tlc_erase_cnt.content, smartLog.avg_tlc_erase_cnt.raw
     });
     rowCollection.Add(new string[4] {
         "A8", "Vendor Specific", smartLog.rsvd_a8.content, smartLog.rsvd_a8.raw
     });
     rowCollection.Add(new string[4] {
         "A9", "Percentage Lifetime Remaning", smartLog.percent_life_remaning.content, smartLog.percent_life_remaning.raw
     });
     rowCollection.Add(new string[4] {
         "AF", "Vendor Specific", smartLog.rsvd_af.content, smartLog.rsvd_af.raw
     });
     rowCollection.Add(new string[4] {
         "B0", "Vendor Specific", smartLog.rsvd_b0.content, smartLog.rsvd_b0.raw
     });
     rowCollection.Add(new string[4] {
         "B1", "Vendor Specific", smartLog.rsvd_b1.content, smartLog.rsvd_b1.raw
     });
     rowCollection.Add(new string[4] {
         "B2", "Vendor Specific", smartLog.rsvd_b2.content, smartLog.rsvd_b2.raw
     });
     rowCollection.Add(new string[4] {
         "B5", "Program Fail Count", smartLog.prog_fail_cnt.content, smartLog.prog_fail_cnt.raw
     });
     rowCollection.Add(new string[4] {
         "B6", "Erase Fail Count", smartLog.erase_fail_cnt.content, smartLog.erase_fail_cnt.raw
     });
     rowCollection.Add(new string[4] {
         "C0", "Power-off Retract Count", smartLog.pwr_off_retract_cnt.content, smartLog.pwr_off_retract_cnt.raw
     });
     rowCollection.Add(new string[4] {
         "C2", "Temperature", smartLog.temperature.content, smartLog.temperature.raw
     });
     rowCollection.Add(new string[4] {
         "C3", "Cumulative ECC Bit Correction Count", smartLog.cumulat_ecc_bit_correct_cnt.content, smartLog.cumulat_ecc_bit_correct_cnt.raw
     });
     rowCollection.Add(new string[4] {
         "C4", "Reallocation Event Count", smartLog.reallocation_event_cnt.content, smartLog.reallocation_event_cnt.raw
     });
     rowCollection.Add(new string[4] {
         "C5", "Current Pending Sector Count", smartLog.current_pending_sector_cnt.content, smartLog.current_pending_sector_cnt.raw
     });
     rowCollection.Add(new string[4] {
         "C6", "Smart Off-line Scan Uncorrectable Error Count", smartLog.off_line_scan_uncorrect_cnt.content, smartLog.off_line_scan_uncorrect_cnt.raw
     });
     rowCollection.Add(new string[4] {
         "C7", "Ultra DMA CRC Error Rate", smartLog.ultra_dma_crc_err_rate.content, smartLog.ultra_dma_crc_err_rate.raw
     });
     rowCollection.Add(new string[4] {
         "E8", "Available Reserved Space", smartLog.avail_rsv_space.content, smartLog.avail_rsv_space.raw
     });
     rowCollection.Add(new string[4] {
         "F1", "Total LBA Write", smartLog.total_lba_write.content, smartLog.total_lba_write.raw
     });
     rowCollection.Add(new string[4] {
         "F2", "Total LBA Read", smartLog.total_lba_read.content, smartLog.total_lba_read.raw
     });
     rowCollection.Add(new string[4] {
         "F5", "Cumulative Program NAND Page", smartLog.cumulat_prog_nand_pg.content, smartLog.cumulat_prog_nand_pg.raw
     });
 }
Exemple #3
0
        private void separatSmartValue(byte[] buf_smart, ref SMARTLog smartLog)
        {
            smartLog.raw_read_err.content          = getTableData(buf_smart, "01", false);
            smartLog.reallocate_sector_cnt.content = getTableData(buf_smart, "05", false);
            smartLog.pwr_on_hrs.content            = getTableData(buf_smart, "09", false);
            smartLog.pwr_cycle_cnt.content         = getTableData(buf_smart, "0C", false);
            smartLog.uncorrect_sector_cnt.content  = getTableData(buf_smart, "A0", false);
            smartLog.vaild_spare.content           = getTableData(buf_smart, "A1", false);
            smartLog.init_invalid_blks.content     = getTableData(buf_smart, "A3", false);
            smartLog.total_tlc_erase_cnt.content   = getTableData(buf_smart, "A4", false);
            smartLog.max_tlc_erase_cnt.content     = getTableData(buf_smart, "A5", false);
            smartLog.min_tlc_erase_cnt.content     = getTableData(buf_smart, "A6", false);
            smartLog.avg_tlc_erase_cnt.content     = getTableData(buf_smart, "A7", false);
            smartLog.rsvd_a8.content = getTableData(buf_smart, "A8", false);
            smartLog.percent_life_remaning.content = getTableData(buf_smart, "A9", false);
            smartLog.rsvd_af.content                     = getTableData(buf_smart, "AF", false);
            smartLog.rsvd_b0.content                     = getTableData(buf_smart, "B0", false);
            smartLog.rsvd_b1.content                     = getTableData(buf_smart, "B1", false);
            smartLog.rsvd_b2.content                     = getTableData(buf_smart, "B2", false);
            smartLog.prog_fail_cnt.content               = getTableData(buf_smart, "B5", false);
            smartLog.erase_fail_cnt.content              = getTableData(buf_smart, "B6", false);
            smartLog.pwr_off_retract_cnt.content         = getTableData(buf_smart, "C0", false);
            smartLog.temperature.content                 = getTableData(buf_smart, "C2", false);
            smartLog.cumulat_ecc_bit_correct_cnt.content = getTableData(buf_smart, "C3", false);
            smartLog.reallocation_event_cnt.content      = getTableData(buf_smart, "C4", false);
            smartLog.current_pending_sector_cnt.content  = getTableData(buf_smart, "C5", false);
            smartLog.off_line_scan_uncorrect_cnt.content = getTableData(buf_smart, "C6", false);
            smartLog.ultra_dma_crc_err_rate.content      = getTableData(buf_smart, "C7", false);
            smartLog.avail_rsv_space.content             = getTableData(buf_smart, "E8", false);
            smartLog.total_lba_write.content             = getTableData(buf_smart, "F1", false);
            smartLog.total_lba_read.content              = getTableData(buf_smart, "F2", false);
            smartLog.cumulat_prog_nand_pg.content        = getTableData(buf_smart, "F5", false);



            smartLog.raw_read_err.raw          = getTableData(buf_smart, "01", true);
            smartLog.reallocate_sector_cnt.raw = getTableData(buf_smart, "05", true);
            smartLog.pwr_on_hrs.raw            = getTableData(buf_smart, "09", true);
            smartLog.pwr_cycle_cnt.raw         = getTableData(buf_smart, "0C", true);
            smartLog.uncorrect_sector_cnt.raw  = getTableData(buf_smart, "A0", true);
            smartLog.vaild_spare.raw           = getTableData(buf_smart, "A1", true);
            smartLog.init_invalid_blks.raw     = getTableData(buf_smart, "A3", true);
            smartLog.total_tlc_erase_cnt.raw   = getTableData(buf_smart, "A4", true);
            smartLog.max_tlc_erase_cnt.raw     = getTableData(buf_smart, "A5", true);
            smartLog.min_tlc_erase_cnt.raw     = getTableData(buf_smart, "A6", true);
            smartLog.avg_tlc_erase_cnt.raw     = getTableData(buf_smart, "A7", true);
            smartLog.rsvd_a8.raw = getTableData(buf_smart, "A8", true);
            smartLog.percent_life_remaning.raw = getTableData(buf_smart, "A9", true);
            smartLog.rsvd_af.raw                     = getTableData(buf_smart, "AF", true);
            smartLog.rsvd_b0.raw                     = getTableData(buf_smart, "B0", true);
            smartLog.rsvd_b1.raw                     = getTableData(buf_smart, "B1", true);
            smartLog.rsvd_b2.raw                     = getTableData(buf_smart, "B2", true);
            smartLog.prog_fail_cnt.raw               = getTableData(buf_smart, "B5", true);
            smartLog.erase_fail_cnt.raw              = getTableData(buf_smart, "B6", true);
            smartLog.pwr_off_retract_cnt.raw         = getTableData(buf_smart, "C0", true);
            smartLog.temperature.raw                 = getTableData(buf_smart, "C2", true);
            smartLog.cumulat_ecc_bit_correct_cnt.raw = getTableData(buf_smart, "C3", true);
            smartLog.reallocation_event_cnt.raw      = getTableData(buf_smart, "C4", true);
            smartLog.current_pending_sector_cnt.raw  = getTableData(buf_smart, "C5", true);
            smartLog.off_line_scan_uncorrect_cnt.raw = getTableData(buf_smart, "C6", true);
            smartLog.ultra_dma_crc_err_rate.raw      = getTableData(buf_smart, "C7", true);
            smartLog.avail_rsv_space.raw             = getTableData(buf_smart, "E8", true);
            smartLog.total_lba_write.raw             = getTableData(buf_smart, "F1", true);
            smartLog.total_lba_read.raw              = getTableData(buf_smart, "F2", true);
            smartLog.cumulat_prog_nand_pg.raw        = getTableData(buf_smart, "F5", true);
        }