Parser Question from interviews

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • HIPE8743
    New Member
    • Sep 2017
    • 1

    Parser Question from interviews

    The file parser.log consists of a sensor with the following structure:

    0x7E 0x40 0x51 Data (17 bytes) FCS(CRC) 0x7E

    Inside the Data stream the speed is from the 9th bit to the 20th (including). The data is in little endian.
    Whenever 7E should have appeared in the data or FCS calculation it was replaced by “7D 5E” and 7D was replaced by “7D 5D”.
    FCS is calculated as follows 0XFF -Sum(header and data bytes)%0X100
    header and data bytes =all the message w/o starting and ending 0X7E and FCS.
    The speed has a factor of 0.1 between the data and real value( meaning a value of 456 is actually 45.6)

    Q:
    1. In one of the measures the speed sensor had a large error. Where?
    2. Find the wrong FCS
    Attached Files
Working...