# Model Code Dictionary
ModelInfo = {
    0x30003064: "DG3064B",
    0x30003096: "DG3096B",
    0x30003128: "DG3128B",
    0x20003008: "TD3008E",
    0x20003116: "TD3116B",
    0x20003216: "TD3216B",
    0x30003048: "DG3048B",
    0x30003080: "DG3080B",
    0x30003112: "DG3112B",
}

# Error Code Definition

ERR_DERR_DG_FILE_NOT_FOUND = 0x0001
ERR_DG_FILE_OPEN           = 0x0002
ERR_DG_FILE_TYPE           = 0x0003
ERR_DG_FILE_FORMAT         = 0x0004
ERR_DG_FILE_VERSION        = 0x0005
ERR_DG_MEMORY_NOT_ENOUGH   = 0x0006
ERR_DG_SIGNAL_INPUT_NAME   = 0x0007
ERR_DG_CHANNEL_NUMBER      = 0x0008
ERR_DG_TIME_STAMP          = 0x0009
ERR_DG_FREQ_COLLISION      = 0x000A
ERR_DG_NO_INPUT_NAME       = 0x000B
ERR_DG_DATA_LENGTH         = 0x000C
ERR_DG_NO_TIME_MARK        = 0x000D
ERR_DG_NO_CHANNEL_NUMBER   = 0x000E
ERR_DG_MEMORY              = 0x000F
ERR_DG_FILE_READ           = 0x0010
ERR_DG_NO_HARDWARE         = 0x0063
ERR_DG_FREQ_NOT_MATCH      = 0x8001
WARN_DG_DEV_MEMORY_LIMIT   = 0x8100
WARN_DG_PC_MEMORY_LIMIT    = 0x8101


# DG current status

DG_SLOT_A_PLUGED = 0x0001
DG_SLOT_B_PLUGED = 0x0002
DG_SLOT_C_PLUGED = 0x0004
DG_SLOT_D_PLUGED = 0x0008

DG_SLOT_A_I2CCTRL_OK = 0x0010
DG_SLOT_B_I2CCTRL_OK = 0x0020
DG_SLOT_C_I2CCTRL_OK = 0x0040
DG_SLOT_D_I2CCTRL_OK = 0x0080

DG_SLOT_A_POWER_OK = 0x0100
DG_SLOT_B_POWER_OK = 0x0200
DG_SLOT_C_POWER_OK = 0x0400
DG_SLOT_D_POWER_OK = 0x0800


DG_WFM_END_DETECT = 0x2000
DG_WAITING_EXT_EVENT = 0x40000000
DG_WAVEFORM_SENDING = 0x80000000