# Path: pydatacoll/utils/read_config.py



from construct import *
from enum import IntEnum
from pydatacoll.utils.read_config import config
import datetime
)

# 8 带时标的32比特串
ASDU_M_BO_TA_1 = Struct(
    "ASDU_M_BO_TA_1",
    EmbeddedBitStruct(BitField("address", 24, swapped=True)),  # 信息对象地址
    ULInt32("value"),
    Embed(QDS),
    cp24time2a,
)

# 9 测量值，归一化值
ASDU_M_ME_NA_1 = Struct(
    "ASDU_M_ME_NA_1",
    EmbeddedBitStruct(If(lambda ctx: ctx._.sq == 0, BitField("address", 24, swapped=True))),
    ULInt16("value"),
    Embed(QDS),
)

# 10 测量值，带时标的归一化值
ASDU_M_ME_TA_1 = Struct(
    "ASDU_M_ME_TA_1",
    EmbeddedBitStruct(BitField("address", 24, swapped=True)),  # 信息对象地址
    ULInt16("value"),
    Embed(QDS),
    cp24time2a,
)

# 11 测量值，标度化值
ASDU_M_ME_NB_1 = Struct(

# Path: pydatacoll/utils/read_config.py



# Path: pydatacoll/protocols/iec104/frame.py
from construct import *
from enum import IntEnum
from pydatacoll.utils.read_config import config
import datetime

)

# 8 带时标的32比特串
ASDU_M_BO_TA_1 = Struct(
    "ASDU_M_BO_TA_1",
    EmbeddedBitStruct(BitField("address", 24, swapped=True)),  # 信息对象地址
    ULInt32("value"),
    Embed(QDS),
    cp24time2a,
)

# 9 测量值，归一化值
ASDU_M_ME_NA_1 = Struct(
    "ASDU_M_ME_NA_1",
    EmbeddedBitStruct(If(lambda ctx: ctx._.sq == 0, BitField("address", 24, swapped=True))),
    ULInt16("value"),
    Embed(QDS),
)

# 10 测量值，带时标的归一化值
ASDU_M_ME_TA_1 = Struct(
    "ASDU_M_ME_TA_1",
    EmbeddedBitStruct(BitField("address", 24, swapped=True)),  # 信息对象地址
    ULInt16("value"),
    Embed(QDS),
    cp24time2a,
)

# 11 测量值，标度化值
ASDU_M_ME_NB_1 = Struct(

    "ASDU_M_SP_NB_1",