Plug-in Developers Kit
Plug-Ins are user created extensions to the DigiView application. They allow the user to modify the formatting of DigiView's built in interpreters, implement entirely new custom protocols and/or control the run-time behavior of the application.
Plug-ins are fully integrated into the DigiView application. Signals based on plug-ins can be searched, exported, and printed in all the same manners as built-in types. All snaps, scrolls, lists, waveform views, searches, auto-searches, etc work in exactly the same way as built-ins. In fact, the internal protocol interpreters use the same framework as the plug-ins, ensuring equal functionality.
Custom parsers (plug-ins) have the additional power of controlling when to stop Auto Capture or when to save a capture to the Capture History.
Our Free Plug-in Developers Kit provides everything you need to develop your own custom Protocol Analyzers or other signal decoders:
- A tutorial to walk you through developing a functional plug-in
- Full source to several example plug-ins
- A framework provides all of the low level interactions with the main program so that you can focus on the decoding itself; not the mechanics.
DigiView supports 3 types of plug-ins:
Mini Plug-Ins use one of the built-in parsers as a pre-parser, simplifying your work. The preparser handles the low level details of extracting the link level information. Your Plug-In can concentrate on higher level issues like formatting, adding another level of protocol, soft triggering or filtering. The Plug-In depends on the pre-parser supplied user options for the basic protocol configuration.
The mini Plug-In can add additional options if needed (see the I2C Plug-In example) but can not add new channelselect options. For example, if you have a custom protocol implemented over an ASYNC link, you could write a mini-Plug-In based on the internal ASYNC pre-parser. The pre-parser will extract the ASYNC characters for you (like a UART would). Your Plug-In would inspect the characters and look for your protocol's commands, parameters and any framing indications. Your Plug-In would then display the protocol as you see fit.
A full Plug-In is based on the RAW data pre-processor. The RAW pre-processor simple filters out all data samples that do not involve a transition on one of the channels your Plug-In is monitoring.It does not provide any user configurable options. All user options for the protocol (including channel-selects) are specified by the Plug-In. The Plug-In is responsible for all low level interpretations of the signal changes. It looks for bit timing, enable levels, clock edges, etc. and determines what they mean.
A hybrid Plug-In is based on an internal pre-parser like the mini-Plug-In. However, it also specifies additional channels to watch and assumes all responsibility for them. In this configuration, DigiView sends the Plug-In all of the events generated by the pre-parser as well as raw data events whenever one of the additional monitored channels transition. The pre-parser events and raw data events are properly time sequenced.
A possible use for a hybrid Plug-In might be to add a unique framing signal or additional control signals to an existing built-in protocol. For example, you might be sending ASYNC characters across a half-duplex bus. Your Plug-In could monitor the DIRECTION control line and adjust the display formatting to differentiate which end of the link sent the message. The 'HalfDuplex' example Plug-In demonstrates this.
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. 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 to demonstrate the concept.
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.