beautypg.com

B.1 modules, Module functions, Appendix b:bluetooth – Teledyne LeCroy Protocol Analyzers File-Based Decoding User Manual User Manual

Page 73: Appendix b: bluetooth

background image

File-based Decoding User Manual

LeCroy Corporation

67

Appendix B: Bluetooth

The information in this appendix is specific to the Bluetooth analyzer.

B.1 Modules

Modules are collections of functions and global data dedicated to decoding a certain type
of transaction. Each module consists of one primary file (.dec), and possibly several

included files (.inc).

Module Functions

Three functions are used as entry-points into a decoding module. They are called by the
application and are used both in the initial transaction decoding phase and each time that
a transaction needs to be displayed.

ProcessData()

Called repeatedly with input contexts representing transactions of the specified input
types. Decides if input transaction is a member of this transaction or if it begins a new
transaction. This function is called first using incomplete output transactions. If the input
transaction is not accepted into any of the pending transactions, it is called with an empty
output transaction to see if it starts a new transaction.

CollectData()

Called with each input transaction that was previously accepted by the function
ProcessData. Generates all output context data that would be required for input into a

higher level transaction.

BuildCellList()

Called with the output context generated by the call to CollectData, and no input

context. This function is responsible for adding display cells based on the data collected
by CollectData.
Note that there is some flexibility in the use of these functions. For example, if it is easier
for a particular protocol to build cells in CollectData, cells could be generated there,

and BuildCellList could be left empty. Another approach would be to have
ProcessData do everything (generate output data, and build cell lists) and then

implement CollectData as a pass-thru to ProcessData. This is less efficient in the

decoding phase but may reduce some repetition of code. These decisions are dependent
on the protocol to be decoded.