How to use the construct.SBInt32 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.SBInt32("ievtyp"),
                           construct.SBInt32("iqual"),
                           construct.SBInt32("isynth"),
                           construct.SBInt32("imagtyp"),
                           construct.SBInt32("imagsrc"),
                           construct.SBInt32("unused19"),
                           construct.SBInt32("unused20"),
                           construct.SBInt32("unused21"),
                           construct.SBInt32("unused22"),
                           construct.SBInt32("unused23"),
                           construct.SBInt32("unused24"),
                           construct.SBInt32("unused25"),
                           construct.SBInt32("unused26"),
                           construct.SBInt32("leven"),
                           construct.SBInt32("lpspol"),
                           construct.SBInt32("lovrok"),
                           construct.SBInt32("lcalda"),
                           construct.SBInt32("unused27"))
    return BIN
# SAC Big Endian binary header, string part
github PIC-IRIS / PH5 / ph5 / core / sac_h.py View on Github external
construct.SBInt32("isynth"),
                           construct.SBInt32("imagtyp"),
                           construct.SBInt32("imagsrc"),
                           construct.SBInt32("unused19"),
                           construct.SBInt32("unused20"),
                           construct.SBInt32("unused21"),
                           construct.SBInt32("unused22"),
                           construct.SBInt32("unused23"),
                           construct.SBInt32("unused24"),
                           construct.SBInt32("unused25"),
                           construct.SBInt32("unused26"),
                           construct.SBInt32("leven"),
                           construct.SBInt32("lpspol"),
                           construct.SBInt32("lovrok"),
                           construct.SBInt32("lcalda"),
                           construct.SBInt32("unused27"))
    return BIN
# SAC Big Endian binary header, string part
github PIC-IRIS / PH5 / ph5 / core / segy_h.py View on Github external
construct.SBInt16("dataUse"),  # Data use
                             # Offset (distance)
                             construct.SBInt32("sourceToRecDist"),
                             # Receiver group elevation
                             construct.SBInt32("recElevation"),
                             # Source elevation
                             construct.SBInt32("sourceSurfaceElevation"),
                             construct.SBInt32("sourceDepth"),  # Source depth
                             # Elevation at receiver group
                             construct.SBInt32("datumElevRec"),
                             # Source elevation
                             construct.SBInt32("datumElevSource"),
                             # Water depth at source
                             construct.SBInt32("sourceWaterDepth"),
                             # Water depth at group
                             construct.SBInt32("recWaterDepth"),
                             # Elevation and depth scalar
                             construct.SBInt16("elevationScale"),
                             # Coordinate scalar
                             construct.SBInt16("coordScale"),
                             # X coordinate of source
                             construct.SBInt32("sourceLongOrX"),
                             # Y coordinate of source
                             construct.SBInt32("sourceLatOrY"),
                             # X coordinate of receiver group
                             construct.SBInt32("recLongOrX"),
                             # Y coordinate of receiver group
                             construct.SBInt32("recLatOrY"),
                             # Coordinate system
                             construct.SBInt16("coordUnits"),
                             # Weathering velocity
                             construct.SBInt16("weatheringVelocity"),
github PIC-IRIS / PH5 / ph5 / core / sac_h.py View on Github external
def bin_header_be_int():
    BIN = construct.Struct("BIN",
                           construct.SBInt32("nzyear"),
                           construct.SBInt32("nzjday"),
                           construct.SBInt32("nzhour"),
                           construct.SBInt32("nzmin"),
                           construct.SBInt32("nzsec"),
                           construct.SBInt32("nzmsec"),
                           construct.SBInt32("nvhdr"),
                           construct.SBInt32("norid"),
                           construct.SBInt32("nevid"),
                           construct.SBInt32("npts"),
                           construct.SBInt32("nsnpts"),
                           construct.SBInt32("nwfid"),
                           construct.SBInt32("nxsize"),
                           construct.SBInt32("nysize"),
                           construct.SBInt32("unused15"),
                           construct.SBInt32("iftype"),
                           construct.SBInt32("idep"),
                           construct.SBInt32("iztype"),
                           construct.SBInt32("unused16"),
                           construct.SBInt32("iinst"),
                           construct.SBInt32("istreg"),
                           construct.SBInt32("ievreg"),
                           construct.SBInt32("ievtyp"),
                           construct.SBInt32("iqual"),
                           construct.SBInt32("isynth"),
github lukleh / TwistedBot / twistedbot / packets.py View on Github external
SBInt32("x"),
               UBInt8("y"),
               SBInt32("z"),
               UBInt16("type"),
               UBInt8("meta"),
               ),
    54: Struct("block action",
               SBInt32("x"),
               SBInt16("y"),
               SBInt32("z"),
               UBInt8("byte1"),
               UBInt8("byte2"),
               UBInt16("block_id"),
               ),
    55: Struct("block break animation",
               SBInt32("eid"),
               SBInt32("x"),
               SBInt32("y"),
               SBInt32("z"),
               UBInt8("distance"),
               ),
    56: Struct("map chunk bulk",
               SBInt16("count"),
               SBInt32("size"),
               Bool("light_data"),
               MetaField("data", lambda ctx: ctx["size"]),
               MetaArray(lambda ctx: ctx.count,
                         Struct("meta",
                                SBInt32("x"),
                                SBInt32("z"),
                                SBInt16("primary_bitmap"),
                                SBInt16("add_bitmap"),
github lukleh / TwistedBot / twistedbot / packets.py View on Github external
UBInt16("y"),
                SBInt32("z"),
                AlphaString("line1"),
                AlphaString("line2"),
                AlphaString("line3"),
                AlphaString("line4"),
                ),
    131: Struct("item data",
                SBInt16("primary"),
                SBInt16("secondary"),
                PascalString("data", length_field=UBInt16("length")),
                ),
    132: Struct("update tile entity",
                SBInt32("x"),
                UBInt16("y"),
                SBInt32("z"),
                SBInt8("action"),
                SBInt16("size"),
                If(lambda context: context["size"] > 0,
                   NBTdata("nbt", "size")
                   ),
                ),
    200: Struct("increment statistics",
                UBInt32("sid"),
                UBInt8("count"),
                ),
    201: Struct("player list item",
                AlphaString("name"),
                Bool("online"),
                UBInt16("ping"),
                ),
    202: Struct("player abilities",
github PIC-IRIS / PH5 / ph5 / core / segy_h.py View on Github external
def trace_header():
    TRACE = construct.Struct("TRACE",
                             # *** Line trace sequence number ***
                             construct.SBInt32("lineSeq"),
                             # Reel trace sequence number
                             construct.SBInt32("reelSeq"),
                             # *** Field record number ***
                             construct.SBInt32("event_number"),
                             # *** Field trace number ***
                             construct.SBInt32("channel_number"),
                             # Energy source point number
                             construct.SBInt32("energySourcePt"),
                             construct.SBInt32("cdpEns"),  # Ensemble number
                             construct.SBInt32(
                                 "traceInEnsemble"),  # Trace number
                             construct.SBInt16("traceID"),  # Trace ID code
                             # Number of vertically summed traces
                             construct.SBInt16("vertSum"),
                             # Number of horizontally summed traces
                             construct.SBInt16("horSum"),
github PIC-IRIS / PH5 / ph5 / core / sac_h.py View on Github external
construct.SBInt32("iztype"),
                           construct.SBInt32("unused16"),
                           construct.SBInt32("iinst"),
                           construct.SBInt32("istreg"),
                           construct.SBInt32("ievreg"),
                           construct.SBInt32("ievtyp"),
                           construct.SBInt32("iqual"),
                           construct.SBInt32("isynth"),
                           construct.SBInt32("imagtyp"),
                           construct.SBInt32("imagsrc"),
                           construct.SBInt32("unused19"),
                           construct.SBInt32("unused20"),
                           construct.SBInt32("unused21"),
                           construct.SBInt32("unused22"),
                           construct.SBInt32("unused23"),
                           construct.SBInt32("unused24"),
                           construct.SBInt32("unused25"),
                           construct.SBInt32("unused26"),
                           construct.SBInt32("leven"),
                           construct.SBInt32("lpspol"),
                           construct.SBInt32("lovrok"),
                           construct.SBInt32("lcalda"),
                           construct.SBInt32("unused27"))
    return BIN
# SAC Big Endian binary header, string part
github PIC-IRIS / PH5 / ph5 / core / sac_h.py View on Github external
construct.SBInt32("ievreg"),
                           construct.SBInt32("ievtyp"),
                           construct.SBInt32("iqual"),
                           construct.SBInt32("isynth"),
                           construct.SBInt32("imagtyp"),
                           construct.SBInt32("imagsrc"),
                           construct.SBInt32("unused19"),
                           construct.SBInt32("unused20"),
                           construct.SBInt32("unused21"),
                           construct.SBInt32("unused22"),
                           construct.SBInt32("unused23"),
                           construct.SBInt32("unused24"),
                           construct.SBInt32("unused25"),
                           construct.SBInt32("unused26"),
                           construct.SBInt32("leven"),
                           construct.SBInt32("lpspol"),
                           construct.SBInt32("lovrok"),
                           construct.SBInt32("lcalda"),
                           construct.SBInt32("unused27"))
    return BIN
# SAC Big Endian binary header, string part
github PIC-IRIS / PH5 / ph5 / core / segy_h.py View on Github external
def trace_header():
    TRACE = construct.Struct("TRACE",
                             # *** Line trace sequence number ***
                             construct.SBInt32("lineSeq"),
                             # Reel trace sequence number
                             construct.SBInt32("reelSeq"),
                             # *** Field record number ***
                             construct.SBInt32("event_number"),
                             # *** Field trace number ***
                             construct.SBInt32("channel_number"),
                             # Energy source point number
                             construct.SBInt32("energySourcePt"),
                             construct.SBInt32("cdpEns"),  # Ensemble number
                             construct.SBInt32(
                                 "traceInEnsemble"),  # Trace number
                             construct.SBInt16("traceID"),  # Trace ID code
                             # Number of vertically summed traces
                             construct.SBInt16("vertSum"),
                             # Number of horizontally summed traces
                             construct.SBInt16("horSum"),
                             construct.SBInt16("dataUse"),  # Data use
                             # Offset (distance)
                             construct.SBInt32("sourceToRecDist"),
                             # Receiver group elevation
                             construct.SBInt32("recElevation"),
                             # Source elevation
                             construct.SBInt32("sourceSurfaceElevation"),
                             construct.SBInt32("sourceDepth"),  # Source depth