Beispiel #1
0
    public Memory_info get_memory_info()
    {
        string s;
        var    memory = new Memory_info();

        switch (pSDK.GetMemoryType())
        {
        case CPUIDSDK.MEMORY_TYPE_SPM_RAM: s = "SPM"; break;

        case CPUIDSDK.MEMORY_TYPE_RDRAM: s = "RDRAM"; break;

        case CPUIDSDK.MEMORY_TYPE_EDO_RAM: s = "EDO"; break;

        case CPUIDSDK.MEMORY_TYPE_FPM_RAM: s = "FPM"; break;

        case CPUIDSDK.MEMORY_TYPE_SDRAM: s = "SDRAM"; break;

        case CPUIDSDK.MEMORY_TYPE_DDR_SDRAM: s = "DDR"; break;

        case CPUIDSDK.MEMORY_TYPE_DDR2_SDRAM: s = "DDR2"; break;

        case CPUIDSDK.MEMORY_TYPE_DDR2_SDRAM_FB: s = "FB-DDR2"; break;

        case CPUIDSDK.MEMORY_TYPE_DDR3_SDRAM: s = "DDR3"; break;

        case CPUIDSDK.MEMORY_TYPE_DDR4_SDRAM: s = "DDR4"; break;

        default: s = ""; break;
        }
        memory.type  = s;
        memory.size  = pSDK.GetMemorySize();
        memory.clock = pSDK.GetMemoryClockFrequency();
        memory.spd   = new List <SPD_module>();
        int spd_modules = pSDK.GetNumberOfSPDModules();

        for (int spd_index = 0; spd_index < spd_modules; spd_index += 1)
        {
            var spd_module = new SPD_module();
            spd_module.size = pSDK.GetSPDModuleSize(spd_index);
            string name = pSDK.GetSPDModuleManufacturer(spd_index).Trim();
            string spec = pSDK.GetSPDModuleSpecification(spd_index).Trim();
            spd_module.name = name + " " + spec;
            spd_module.part = pSDK.GetSPDModulePartNumber(spd_index).Trim();
            memory.spd.Add(spd_module);
        }
        return(memory);
    }