Changeset 1314 for proto/FIX/fix.py


Ignore:
Timestamp:
Aug 17, 2011, 6:19:54 PM (8 years ago)
Author:
cameron
Message:

Fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/FIX/fix.py

    r1313 r1314  
    2222
    2323class Fix_callout():
    24         Header_end
     24        Header_end = 0
    2525
    2626def Classify_bytes(basis_bits, fix_lex): 
     
    3131        temp5 = (basis_bits.bit_7 &~ basis_bits.bit_6)
    3232        temp6 = (temp5 &~ temp4)
    33         SOH = (temp6 &~ temp3)
     33        fix_lex.SOH = (temp6 &~ temp3)
    3434        temp7 = (basis_bits.bit_2 & basis_bits.bit_3)
    3535        temp8 = (temp7 &~ temp1)
    3636        temp9 = (basis_bits.bit_4 & basis_bits.bit_5)
    3737        temp10 = (temp9 & temp5)
    38         Equals = (temp8 & temp10)
     38        fix_lex.Equals = (temp8 & temp10)
    3939        temp11 = (basis_bits.bit_5 | basis_bits.bit_6)
    4040        temp12 = (basis_bits.bit_4 & temp11)
    41         Digit = (temp8 &~ temp12)
     41        fix_lex.Digit = (temp8 &~ temp12)
    4242        temp13 = (basis_bits.bit_6 | basis_bits.bit_7)
    4343        temp14 = (temp4 | temp13)
    44         Zero = (temp8 &~ temp14)
     44        fix_lex.Zero = (temp8 &~ temp14)
    4545
    46 def parse_fields(fix_lex, fix_callout):
     46def Parse_fields(fix_lex, fix_callout):
    4747        # Assume for now that all SOHs are field separators, not data.
    48         marker = SOH
     48        marker = fix_lex.SOH
    4949        header1 = bitutil.Advance(marker)
    50         header2 = bitutil.ScanThru(marker, Digit)
    51         error1 = header1 & Zero
     50        header2 = bitutil.ScanThru(marker, fix_lex.Digit)
     51        error1 = header1 & fix_lex.Zero
    5252        error2 = header1 & header2
    53         error3 = header2 &~ Equals
     53        error3 = header2 &~ fix_lex.Equals
    5454        error = error1 | error2 | error3
    5555        if error:
    56                 error_tracker.Note_error("Potential error in header field", error)
     56                error_tracker.NoteError("Potential error in header field", error)
    5757        fix_callout.Header_end = header2
    5858
     
    6060        Classify_bytes(basis_bits, fix_lex)
    6161
    62         parse_fields(fix_lex, fix_callout)
     62        Parse_fields(fix_lex, fix_callout)
    6363
    6464
Note: See TracChangeset for help on using the changeset viewer.