How to use the construct.BFloat32 function in construct

To help you get started, we’ve selected a few construct examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github PIC-IRIS / PH5 / ph5 / core / sac_h.py View on Github external
construct.BFloat32("gcarc"),
                           construct.BFloat32("sb"),
                           construct.BFloat32("sdelta"),
                           construct.BFloat32("depmen"),
                           construct.BFloat32("cmpaz"),
                           construct.BFloat32("cmpinc"),
                           construct.BFloat32("xminimum"),
                           construct.BFloat32("xmaximum"),
                           construct.BFloat32("yminimum"),
                           construct.BFloat32("ymaximum"),
                           construct.BFloat32("unused6"),
                           construct.BFloat32("unused7"),
                           construct.BFloat32("unused8"),
                           construct.BFloat32("unused9"),
                           construct.BFloat32("unused10"),
                           construct.BFloat32("unused11"),
                           construct.BFloat32("unused12"))
    return BIN
# SAC Big Endian binary header, int part
github PIC-IRIS / PH5 / ph5 / core / sac_h.py View on Github external
construct.BFloat32("t3"),
                           construct.BFloat32("t4"),
                           construct.BFloat32("t5"),
                           construct.BFloat32("t6"),
                           construct.BFloat32("t7"),
                           construct.BFloat32("t8"),
                           construct.BFloat32("t9"),
                           construct.BFloat32("f"),
                           construct.BFloat32("resp0"),
                           construct.BFloat32("resp1"),
                           construct.BFloat32("resp2"),
                           construct.BFloat32("resp3"),
                           construct.BFloat32("resp4"),
                           construct.BFloat32("resp5"),
                           construct.BFloat32("resp6"),
                           construct.BFloat32("resp7"),
                           construct.BFloat32("resp8"),
                           construct.BFloat32("resp9"),
                           construct.BFloat32("stla"),
                           construct.BFloat32("stlo"),
                           construct.BFloat32("stel"),
                           construct.BFloat32("stdp"),
                           construct.BFloat32("evla"),
                           construct.BFloat32("evlo"),
                           construct.BFloat32("evel"),
                           construct.BFloat32("evdp"),
                           construct.BFloat32("mag"),
                           construct.BFloat32("user0"),
                           construct.BFloat32("user1"),
                           construct.BFloat32("user2"),
                           construct.BFloat32("user3"),
                           construct.BFloat32("user4"),
github PIC-IRIS / PH5 / ph5 / core / sac_h.py View on Github external
construct.BFloat32("resp4"),
                           construct.BFloat32("resp5"),
                           construct.BFloat32("resp6"),
                           construct.BFloat32("resp7"),
                           construct.BFloat32("resp8"),
                           construct.BFloat32("resp9"),
                           construct.BFloat32("stla"),
                           construct.BFloat32("stlo"),
                           construct.BFloat32("stel"),
                           construct.BFloat32("stdp"),
                           construct.BFloat32("evla"),
                           construct.BFloat32("evlo"),
                           construct.BFloat32("evel"),
                           construct.BFloat32("evdp"),
                           construct.BFloat32("mag"),
                           construct.BFloat32("user0"),
                           construct.BFloat32("user1"),
                           construct.BFloat32("user2"),
                           construct.BFloat32("user3"),
                           construct.BFloat32("user4"),
                           construct.BFloat32("user5"),
                           construct.BFloat32("user6"),
                           construct.BFloat32("user7"),
                           construct.BFloat32("user8"),
                           construct.BFloat32("user9"),
                           construct.BFloat32("dist"),
                           construct.BFloat32("az"),
                           construct.BFloat32("baz"),
                           construct.BFloat32("gcarc"),
                           construct.BFloat32("sb"),
                           construct.BFloat32("sdelta"),
                           construct.BFloat32("depmen"),
github PIC-IRIS / PH5 / ph5 / core / sac_h.py View on Github external
BIN = construct.Struct("BIN",
                           construct.BFloat32("delta"),
                           construct.BFloat32("depmin"),
                           construct.BFloat32("depmax"),
                           construct.BFloat32("scale"),
                           construct.BFloat32("odelta"),
                           construct.BFloat32("b"),
                           construct.BFloat32("e"),
                           construct.BFloat32("o"),
                           construct.BFloat32("a"),
                           construct.BFloat32("fmt"),
                           construct.BFloat32("t0"),
                           construct.BFloat32("t1"),
                           construct.BFloat32("t2"),
                           construct.BFloat32("t3"),
                           construct.BFloat32("t4"),
                           construct.BFloat32("t5"),
                           construct.BFloat32("t6"),
                           construct.BFloat32("t7"),
                           construct.BFloat32("t8"),
                           construct.BFloat32("t9"),
                           construct.BFloat32("f"),
                           construct.BFloat32("resp0"),
                           construct.BFloat32("resp1"),
                           construct.BFloat32("resp2"),
                           construct.BFloat32("resp3"),
                           construct.BFloat32("resp4"),
                           construct.BFloat32("resp5"),
                           construct.BFloat32("resp6"),
                           construct.BFloat32("resp7"),
                           construct.BFloat32("resp8"),
                           construct.BFloat32("resp9"),
github PIC-IRIS / PH5 / ph5 / core / sac_h.py View on Github external
def bin_header_be_float():
    BIN = construct.Struct("BIN",
                           construct.BFloat32("delta"),
                           construct.BFloat32("depmin"),
                           construct.BFloat32("depmax"),
                           construct.BFloat32("scale"),
                           construct.BFloat32("odelta"),
                           construct.BFloat32("b"),
                           construct.BFloat32("e"),
                           construct.BFloat32("o"),
                           construct.BFloat32("a"),
                           construct.BFloat32("fmt"),
                           construct.BFloat32("t0"),
                           construct.BFloat32("t1"),
                           construct.BFloat32("t2"),
                           construct.BFloat32("t3"),
                           construct.BFloat32("t4"),
                           construct.BFloat32("t5"),
                           construct.BFloat32("t6"),
                           construct.BFloat32("t7"),
                           construct.BFloat32("t8"),
                           construct.BFloat32("t9"),
                           construct.BFloat32("f"),
github PIC-IRIS / PH5 / ph5 / core / sac_h.py View on Github external
construct.BFloat32("resp5"),
                           construct.BFloat32("resp6"),
                           construct.BFloat32("resp7"),
                           construct.BFloat32("resp8"),
                           construct.BFloat32("resp9"),
                           construct.BFloat32("stla"),
                           construct.BFloat32("stlo"),
                           construct.BFloat32("stel"),
                           construct.BFloat32("stdp"),
                           construct.BFloat32("evla"),
                           construct.BFloat32("evlo"),
                           construct.BFloat32("evel"),
                           construct.BFloat32("evdp"),
                           construct.BFloat32("mag"),
                           construct.BFloat32("user0"),
                           construct.BFloat32("user1"),
                           construct.BFloat32("user2"),
                           construct.BFloat32("user3"),
                           construct.BFloat32("user4"),
                           construct.BFloat32("user5"),
                           construct.BFloat32("user6"),
                           construct.BFloat32("user7"),
                           construct.BFloat32("user8"),
                           construct.BFloat32("user9"),
                           construct.BFloat32("dist"),
                           construct.BFloat32("az"),
                           construct.BFloat32("baz"),
                           construct.BFloat32("gcarc"),
                           construct.BFloat32("sb"),
                           construct.BFloat32("sdelta"),
                           construct.BFloat32("depmen"),
                           construct.BFloat32("cmpaz"),
github bravoserver / bravo / beta / packets.py View on Github external
# Our tricky Java string decoder.
# Note that Java has a weird encoding for the NULL byte which we do not
# respect or honor since no client will generate it. Instead, we will get two
# NULL bytes in a row.
AlphaString = functools.partial(PascalString,
    length_field=UBInt16("length"),
    encoding="utf8")

flying = Struct("flying", UBInt8("flying"))
position = Struct("position",
    BFloat64("x"),
    BFloat64("y"),
    BFloat64("stance"),
    BFloat64("z")
)
look = Struct("look", BFloat32("rotation"), BFloat32("pitch"))

entity = Struct("entity", UBInt32("id"))
entity_position = Struct("entity_position",
    entity,
    UBInt8("x"),
    UBInt8("y"),
    UBInt8("z")
)
entity_look = Struct("entity_look",
    entity,
    UBInt8("rotation"),
    UBInt8("pitch")
)
entity_position_look = Struct("entity_position_look",
    entity,
    UBInt8("x"),
github PIC-IRIS / PH5 / ph5 / core / sac_h.py View on Github external
construct.BFloat32("user7"),
                           construct.BFloat32("user8"),
                           construct.BFloat32("user9"),
                           construct.BFloat32("dist"),
                           construct.BFloat32("az"),
                           construct.BFloat32("baz"),
                           construct.BFloat32("gcarc"),
                           construct.BFloat32("sb"),
                           construct.BFloat32("sdelta"),
                           construct.BFloat32("depmen"),
                           construct.BFloat32("cmpaz"),
                           construct.BFloat32("cmpinc"),
                           construct.BFloat32("xminimum"),
                           construct.BFloat32("xmaximum"),
                           construct.BFloat32("yminimum"),
                           construct.BFloat32("ymaximum"),
                           construct.BFloat32("unused6"),
                           construct.BFloat32("unused7"),
                           construct.BFloat32("unused8"),
                           construct.BFloat32("unused9"),
                           construct.BFloat32("unused10"),
                           construct.BFloat32("unused11"),
                           construct.BFloat32("unused12"))
    return BIN
# SAC Big Endian binary header, int part
github PIC-IRIS / PH5 / ph5 / core / sac_h.py View on Github external
construct.BFloat32("baz"),
                           construct.BFloat32("gcarc"),
                           construct.BFloat32("sb"),
                           construct.BFloat32("sdelta"),
                           construct.BFloat32("depmen"),
                           construct.BFloat32("cmpaz"),
                           construct.BFloat32("cmpinc"),
                           construct.BFloat32("xminimum"),
                           construct.BFloat32("xmaximum"),
                           construct.BFloat32("yminimum"),
                           construct.BFloat32("ymaximum"),
                           construct.BFloat32("unused6"),
                           construct.BFloat32("unused7"),
                           construct.BFloat32("unused8"),
                           construct.BFloat32("unused9"),
                           construct.BFloat32("unused10"),
                           construct.BFloat32("unused11"),
                           construct.BFloat32("unused12"))
    return BIN
# SAC Big Endian binary header, int part
github PIC-IRIS / PH5 / ph5 / core / sac_h.py View on Github external
construct.BFloat32("t9"),
                           construct.BFloat32("f"),
                           construct.BFloat32("resp0"),
                           construct.BFloat32("resp1"),
                           construct.BFloat32("resp2"),
                           construct.BFloat32("resp3"),
                           construct.BFloat32("resp4"),
                           construct.BFloat32("resp5"),
                           construct.BFloat32("resp6"),
                           construct.BFloat32("resp7"),
                           construct.BFloat32("resp8"),
                           construct.BFloat32("resp9"),
                           construct.BFloat32("stla"),
                           construct.BFloat32("stlo"),
                           construct.BFloat32("stel"),
                           construct.BFloat32("stdp"),
                           construct.BFloat32("evla"),
                           construct.BFloat32("evlo"),
                           construct.BFloat32("evel"),
                           construct.BFloat32("evdp"),
                           construct.BFloat32("mag"),
                           construct.BFloat32("user0"),
                           construct.BFloat32("user1"),
                           construct.BFloat32("user2"),
                           construct.BFloat32("user3"),
                           construct.BFloat32("user4"),
                           construct.BFloat32("user5"),
                           construct.BFloat32("user6"),
                           construct.BFloat32("user7"),
                           construct.BFloat32("user8"),
                           construct.BFloat32("user9"),
                           construct.BFloat32("dist"),