I'm trying to think out of the box but I need some help...

Problem:

The embedded system that I work on can generate MegaBytes of data per second. I am looking to automatically analyze the captured bus data for sequence errors.

For instance, one of the protocols is for file transfer which includes transactions between:

- clients
- file server
- storage device

Making the problem tougher is that:

- protocols can be complex, be recursive, and need to remember state data, i.e. reading file 1 block at a time
- transactions from multiple clients occur simultaneously.
- bus contains multiple protocols, i.e. file server, processor control, health statusing, etc. and then lots of data that is a dont care.

My first thought was to write explicit code to walk through state machines. Problem is that each state machine would be a small complex project in itself and probably could not be off loaded to other users on my team.

Next thought is to write a script that will parse a set of protocol rules and generate PERL for Parse::RecDescent. (Maybe a little slow but good for prototyping.)

Very simple non-recursive file transfer example might look like:

Msg : File_Request -- client to file server Type Read File_ID 44 Offset 0 Size 400 Program 50 Msg : File_Response -- file server to client Type Read File_ID 44 Program 50 Status Request_ACK Msg : Get_File -- server to storage device Type Read File_ID 44 Offset 0 Size 400 Address 1AF3000 Msg : File_Data -- server to client Data 0000 ... Data FEF2 Msg : Get_File_Response -- storage device to server File_ID 44 ACK_NACK Complete Msg : Get_File_Response -- server to client File_ID 44 ACK_NACK Complete Msg : File_Response -- file server to client Type Read File_ID 44 Program 50 Status Complete

Are there better technics for analyzing protocols and state machines?

Thanks,

Ronny


In reply to parsing protocol data : Is Parse::RecDescent the right tool? by rgloden

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.