Plug-in Developers Kit
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.
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.
Download the PDK... (registration not required)
View On-Line Developer's Guide
DigiView supports 3 types of plug-ins:
Mini Plug-InsMini 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.
Full Plug-InsA 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.
Hybrid Plug-InsA 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 formattingThe '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 protocolPlug-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 parsersProtocol 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 protocolsUsing 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 timingPlug-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 behaviorIn 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.