You are here: Overview > Structure of a Decoder > What You Need

What You Need

In order to write a decoder, you need these things:

  1. You need the protocol specification. The specification helps you identify how the protocol should work.
  2. You need data. Data can be captured live using your ComProbe Software protocol analyzer, or it can be created using CFA Maker, a utility for creating capture files. The raw material that the protocol analyzer works with is the captured data. We refer to the contents of a capture file as events. These events comprise not only the actual data bytes, but also start- and end-of-frame markers, and indications of changes in control signals (e.g. DTR, RTS, etc., in the RS-232 case). An event may contain several pieces of information including a timestamp and a record of errors (parity, framing, etc.).
  3. You need to be able to separate your data into frames. By "frame", we mean the fundamental protocol package that is sent and received. There are three ways to frame data:

    Alternative 1:

    Hardware can frame the data for you. In most cases where the hardware is able to frame the data, your protocol is likely not the lowest layer protocol in the stack, but is somewhere higher with other protocols beneath it. Examples of protocols with this scenario would be Ethernet and some kinds of synchronous serial data.

    Alternative 2

    A soft frame recognizer can also frame data. The recognizer inserts flags at the beginning and end of frames. Asynchronous and some synchronous serial data are examples of data that will need to use a frame recognizer. A frame recognizer is provided by the protocol analyzer

    Alternative 3

    If you need to write a custom recognizer, then you need Microsoft's Visual C++ 2008 (known also as Visual C++ 9.0) installed on your PC and a text editor in which to write your method. We strongly recommend that you use version 9.0 of MS Visual C++. This product uses the Visual C++ compiler to compile your recognizer ‐ you do not need to compile it yourself.

  4. Decode your data. You will need a text editor. We use a shareware tool called UltraEdit because it can do syntax highlighting and this makes DecoderScript much easier to read, but any program that lets you create text files will work. UltraEdit is available from www.ultraedit.com, and we have included ‘decoderscript.uew’ and ‘decoderscriptmethods.uew’ files with this product that will provide syntax highlighting for DecoderScript. If you use a different text editor that supports syntax highlighting, the list of keywords and method names are given in these two ‘.uew’ files.