Plug-in Capabilities

Top  Previous  Next

Plug-ins can extend the DigiView application in a number of ways:

Modify formatting

The 'echostate' example demonstrates a functional Plug-in in 24 lines of code.  It simply displays state fields in a different color.  This is the most basic operation a Plug-in could do; change the way the data looks.  A Plug-in could also change what is printed in the field as easily.  For example, it could easily substitute the text 'A/D' every time it sees the value '0x10' in a particular field.

Add parameters or control signals to an existing protocol

Plug-ins can extend an existing protocol by adding extra control signals or parameters.  The 'HalfDuplex' example demonstrates adding a direction line to the ASYNC parser.  This would extend the ASYNC parser to support a half-duplex bus (where a control signal switches the bus alternately between IN and OUT directions.)  Several of the Plug-in examples add a 'SHOW FIELD IDLE' parameter, controlling whether idle periods should be shown between fields.

Add Protocol Layers to existing parsers

Protocol layers can be very simple or complex.  A simple protocol layer might involve just adding framing.  Look at the 'FrameChar' for an example.  It adds a framing level to the basic built-in ASYNC parser.  Whenever it sees a specific character, it starts a new frame.  It also watches for an escape character to allow the start-of-frame character to occur in the data payload.  A more complex protocol layer might include interpreting the first field of the frame as a command and the balance as command-specific parameters.

Add entirely new protocols

Using a full Plug-in, you could implement new protocols from the link level up.  You have full access to everything captured (related to your Plug-in).  You can watch as many channels as you want and interpret them in any way you want.  For example, we currently do not have built-in CANbus interpreter, but it could be implemented as a Plug-in.  CANbus is different enough from the built-in parsers that it would have to be built as a full Plug-in.  The Plug-in would need to do the async bit timing to extract the link level bits and then combine the bits into CANbus specific fields.
 
The track2full and full-DAC8045 examples demonstrate simple protocols developed with full parsers.  These particular ones could have been based on built-in preparsers but we chose to implement them as full, raw parsers.

Analyze the data contents and/or timing

Plug-ins can evaluate the field values while it is generating field information.  It can generate text ('PARITY ERROR') in place of field values.  It can check protocol specific sequences and print errors for field values ('ILLEGAL NAK').  Plug-ins can verify timing (down to the logic analyzer's sample rate) and report the results as field values.
 
The ASYNCWD example demonstrates adding 'TIMEOUT' fields to the data stream when it detects too long of an idle between characters.

Control DigiView's run-time behavior

In addition to or instead of printing errors or timing information as field values, the Plug-in can send control fields to the DigiView application to force a save of this capture to disk, veto any default save, and/or halt an auto-run sequence.  This allows the plug-in to operate as a soft-trigger, operating at the protocol level and/or as a filter to automatically sort through a sequence of captures.
 
The ASYNCWD example demonstrates generating HALTs, FORCED-SAVES or VETO-SAVES when it detects too long of an idle between characters.