package com.bocloud.cmp.model;

import java.util.List;

/**
 * cpu模型
 *
 * @author lkx007
 */
public class CpuInfo {
    /**
     * cpu下标
     * <p>
     * 0
     */
    private Integer coreId;
    /**
     * 物理cpu的下标
     * 一个物理cpu有多个core的
     * <p>
     * 0
     */
    private Integer physicalId;
    /**
     * cpu的家族编号
     * <p>
     * ”1"表示为8086和80186级芯片；
     * ”2"表示为286级芯片；
     * ”3"表示为386级芯片； 
     * ”4"表示为486级芯片(SX、DX、：DX2、DX4)； 
     * ”5"表示为P5级芯片(Pentium处理器和含MMX技术的Pentium处理器)；
     * ”6"表示为P6级芯片(包括Celeron、Pentium II、PenfiumIII系列)； 
     * ”F"代表Xeon处理器、Pentium 4处理器。 
     * <p>
     * 6
     */
    private Integer family;
    /**
     * Intel处理器的vendor字符串为“GenuineIntel”。
     * <p>
     * 下面是其它的x86的vendor字符串(来自coreboot源码)：
     * <p>
     * CYRIX：CyrixInstead
     * AMD：AuthenticAMD
     * UMC：UMC UMC UMC
     * NEXGEN：NexGenDriven
     * CENTAUR：CentaurHauls
     * RISE：RiseRiseRise
     * TRANSMETA：GenuineTMx86
     * TRANSMETA：TransmetaCPU
     * NSC：Geode by NSC
     * SiS：SiS SiS SiS
     * <p>
     * <p>
     * GenuineIntel
     */
    private String vendorId;
    /**
     * CPU属于其系列中的哪一代的代号。
     * “型号”编号可以让英特尔识别微处理器的制造技术以及属于第几代设计(例如型号4)。
     * 型号与系列通常是相互配合使用的，用以确定您的计算机中所安装的处理器是属于处理器系列中的哪一种特定类型。
     * 在与英特尔联系时，此信息通常用以识别特定的处理器。
     * <p>
     * 45
     */
    private Integer model;
    /**
     * CPU属于的名字及其编号、标称主频
     * <p>
     * Intel(R) Xeon(R) CPU E5-2609 0 @ 2.40GHz
     */
    private String modelName;
    /**
     * cpu 主频
     * 1199.906
     */
    private Double MHz;
    /**
     * cpu缓存大小
     * <p>
     * 10240 KB
     */
    private String cacheSize;
    /**
     * cpu支持的flag信息
     * [
     * "fpu",
     * "vme",
     * "de",
     * "pse",
     * "tsc",
     * "msr",
     * "pae",
     * "mce",
     * "cx8",
     * "apic",
     * "sep",
     * "mtrr",
     * "pge",
     * "mca",
     * "cmov",
     * "pat",
     * "pse36",
     * "clflush",
     * "dts",
     * "acpi",
     * "mmx",
     * "fxsr",
     * "sse",
     * "sse2",
     * "ss",
     * "ht",
     * "tm",
     * "pbe",
     * "syscall",
     * "nx",
     * "pdpe1gb",
     * "rdtscp",
     * "lm",
     * "constant_tsc",
     * "arch_perfmon",
     * "pebs",
     * "bts",
     * "rep_good",
     * "nopl",
     * "xtopology",
     * "nonstop_tsc",
     * "aperfmperf",
     * "eagerfpu",
     * "pni",
     * "pclmulqdq",
     * "dtes64",
     * "monitor",
     * "ds_cpl",
     * "vmx",
     * "smx",
     * "est",
     * "tm2",
     * "ssse3",
     * "cx16",
     * "xtpr",
     * "pdcm",
     * "pcid",
     * "dca",
     * "sse4_1",
     * "sse4_2",
     * "x2apic",
     * "popcnt",
     * "tsc_deadline_timer",
     * "aes",
     * "xsave",
     * "avx",
     * "lahf_lm",
     * "retpoline",
     * "kaiser",
     * "tpr_shadow",
     * "vnmi",
     * "flexpriority",
     * "ept",
     * "vpid",
     * "xsaveopt",
     * "dtherm",
     * "arat",
     * "pln",
     * "pts"
     * ]
     */
    private List<String> flags;
    /**
     * cpu的核数
     * <p>
     * 4
     */
    private Integer cores;
    /**
     * cpu自带的字段里面没有
     * <p>
     * 通过flags里面有没有vmx或者smx来判断是否支持虚拟化
     */
    private Boolean virtualized;

    public Integer getCoreId() {
        return coreId;
    }

    public void setCoreId(Integer coreId) {
        this.coreId = coreId;
    }

    public Integer getPhysicalId() {
        return physicalId;
    }

    public void setPhysicalId(Integer physicalId) {
        this.physicalId = physicalId;
    }

    public Integer getFamily() {
        return family;
    }

    public void setFamily(Integer family) {
        this.family = family;
    }

    public String getVendorId() {
        return vendorId;
    }

    public void setVendorId(String vendorId) {
        this.vendorId = vendorId;
    }

    public Integer getModel() {
        return model;
    }

    public void setModel(Integer model) {
        this.model = model;
    }

    public String getModelName() {
        return modelName;
    }

    public void setModelName(String modelName) {
        this.modelName = modelName;
    }

    public Double getMHz() {
        return MHz;
    }

    public void setMHz(Double MHz) {
        this.MHz = MHz;
    }

    public String getCacheSize() {
        return cacheSize;
    }

    public void setCacheSize(String cacheSize) {
        this.cacheSize = cacheSize;
    }

    public List<String> getFlags() {
        return flags;
    }

    public void setFlags(List<String> flags) {
        this.flags = flags;
    }

    public Integer getCores() {
        return cores;
    }

    public void setCores(Integer cores) {
        this.cores = cores;
    }

    public Boolean getVirtualized() {
        return virtualized;
    }

    public void setVirtualized(Boolean virtualized) {
        this.virtualized = virtualized;
    }
}
