# -*- coding: cp936 -*-


from ctypes import *



class verTNewElement(LittleEndianStructure):
    _pack_ = 1
    _fields_ = [("value", c_uint),("validflag", c_uint)]


class ver4TMidDevData(LittleEndianStructure):
    _pack_ = 1
    _fields_ = [("ddVersion", c_ushort), ("ddBtsSoftVersion", c_ushort),
                ("ddClientType", c_ubyte), ("ddCopyRight", c_ubyte * 9),
                ("ddMeasureType", c_ubyte), ("ddMidDevId", c_uint),
                ("ddMidDevNo", c_ubyte), ("ddParVersion", c_ubyte * 30),
                ("ddProduceData", c_uint), ("ddProtocolVersion", c_ushort),
                ("ddSn", c_ubyte * 32), ("ddMSampRate", c_uint),
                ("ddASampRate", c_uint), ("ddTimerSampRate", c_uint),
                ("ddLcdType", c_ubyte), ("ddRtcSource", c_ubyte),
                ("ddUpdateSucc", c_ubyte), ("ddPowerOffP", c_ubyte),
                ("ddSaveEngieStatRate", verTNewElement),
                ("ddSendDFStatRate", verTNewElement)]

#ver5Ïà±Èver4¶àÁË ddBackupTimeInteral

class ver5TMidDevData(LittleEndianStructure):
    _pack_ = 1
    _fields_ = [("ddVersion", c_ushort), ("ddBtsSoftVersion", c_ushort),
                ("ddClientType", c_ubyte), ("ddCopyRight", c_ubyte * 9),
                ("ddMeasureType", c_ubyte), ("ddMidDevId", c_uint),
                ("ddMidDevNo", c_ubyte), ("ddParVersion", c_ubyte * 30),
                ("ddProduceData", c_uint), ("ddProtocolVersion", c_ushort),
                ("ddSn", c_ubyte * 32), ("ddMSampRate", c_uint),
                ("ddASampRate", c_uint), ("ddTimerSampRate", c_uint),
                ("ddLcdType", c_ubyte), ("ddRtcSource", c_ubyte),
                ("ddUpdateSucc", c_ubyte), ("ddPowerOffP", c_ubyte),
                ("ddBackupTimeInteral", c_uint), ("ddSaveEngieStatRate", verTNewElement),
                ("ddSendDFStatRate", verTNewElement)]






class ver7TMidDevData(LittleEndianStructure):
    _pack_ = 1
    _fields_ = [("ddVersion", c_ushort), ("ddBtsSoftVersion", c_ushort),
                ("ddClientType", c_ubyte), ("ddCopyRight", c_ubyte * 9),
                ("ddMeasureType", c_ubyte), ("ddMidDevId", c_uint),
                ("ddMidDevNo", c_ubyte), ("ddParVersion", c_ubyte * 30),
                ("ddProduceData", c_uint), ("ddProtocolVersion", c_ushort),
                ("ddSn", c_ubyte * 32), ("ddMSampRate", c_uint),
                ("ddASampRate", c_uint), ("ddTimerSampRate", c_uint),
                ("ddLcdType", c_ubyte), ("ddRtcSource", c_ubyte),
                ("ddUpdateSucc", c_ubyte), ("ddPowerOffP", c_ubyte),
                ("ddBackupTimeInteral", c_uint), ("ddSaveEngieStatRate", verTNewElement),
                ("ddSendDFStatRate", verTNewElement), ("ddAlarmLightConfig", verTNewElement),
                ("ddChannelCountConfig", verTNewElement), ("ddFloorConfig", verTNewElement),
                ("ddTechnologyConfig", verTNewElement), ("ddPLCTypeConfig", verTNewElement)]

class ver8TMidDevData(LittleEndianStructure):
    _pack_ = 1
    _fields_ = [("ddVersion", c_ushort), ("ddBtsSoftVersion", c_ushort),
                ("ddClientType", c_ubyte), ("ddCopyRight", c_ubyte * 9),
                ("ddMeasureType", c_ubyte), ("ddMidDevId", c_uint),
                ("ddMidDevNo", c_ubyte), ("ddParVersion", c_ubyte * 30),
                ("ddProduceData", c_uint), ("ddProtocolVersion", c_ushort),
                ("ddSn", c_ubyte * 32), ("ddMSampRate", c_uint),
                ("ddASampRate", c_uint), ("ddTimerSampRate", c_uint),
                ("ddLcdType", c_ubyte), ("ddRtcSource", c_ubyte),
                ("ddUpdateSucc", c_ubyte), ("ddPowerOffP", c_ubyte),
                ("ddBackupTimeInteral", c_uint), ("ddSaveEngieStatRate", verTNewElement),
                ("ddSendDFStatRate", verTNewElement), ("ddAlarmLightConfig", verTNewElement),
                ("ddChannelCountConfig", verTNewElement), ("ddFloorConfig", verTNewElement),
                ("ddTechnologyConfig", verTNewElement), ("ddPLCTypeConfig", verTNewElement),
                ("ddSlaveSignalStartIndex", verTNewElement), ("ddSlaveSignalCtrlNum", verTNewElement)]

