SpecTcl Programming Guide. | ||
---|---|---|
Prev | Chapter 10. Interfacing SpecTcl with data from other data acquisition systems. | Next |
From the discussion in the previous section, we can derive a step by step recipe for adding support for a new data format to SpecTcl.
Write a buffer decoder that invokes appropriate methods of
the CAnalyzer
at appropriate times
given blocks of data from the data source.
Write a creator object for the buffer decoder we created in the first step.
In MySpecTclApp.cpp create an instance
of our creator and associate it with a new
attach -format
keyword
so that when that format is requested, the attach
command can make an instance of our buffer decoder and
attach it to the analyzer.
In the next section, we will write code to do this for a simple data acquisition system data format.