jhenderson Site Admin
Joined: 07 Mar 2006 Posts: 2267 Location: So. Cal. USA
|
Posted: Thu Apr 19, 2012 10:27 am Post subject: Use of VeloMergeParser |
|
|
| Quote: | In the X6 Stream example, does the VeloMergeParser output just the Vita packets?
If the code below was modified to use VMPLogger.Log(Event.Data); would the bin file just be raw adc samples with no headers, packing words etc?
| Code: | void ApplicationIo::VMPDataAvailable(VeloMergeParserDataAvailable & Event)
{
VMP_VeloCount++;
if (Settings.Rx.LoggerEnable)
if (FWordCount < WordsToLog)
{
// Log Data To VMP file - oops, use ceiling?
VMPLogger.LogWithHeader(Event.Data);
}
} |
|
The Merge Parser parses the original packets for Vita Packets, and then based off the SID, appends its data (only) to one of N buffers inside, data only. The PID of this new packet is the LSB of the SID. When one of the merge buffers fills, an event is called to deliver it to the application. A truncated buffer is output if the Vita Packet has a non-0 padding value. Also Flush() can output any remainder left after parsing the last regular vita packet.
The result (if all the packets are logged to the same file, with headers) is an “X5-like” file format, except the header size is 4 words, not 2. All Vita packet info is stripped off. So there are Velo Headers to identify the data source, but not Vitas. Also the larger buffer sizes might be more convenient for analysis (like big FFTs) than the smaller Vitas. This class was more important when BinView could not interpret the raw "X6 Format” of Vitas in Velos, which the latest versions can. This class also lets you split the data into individual files, or log some SIDs and not others relatively easily.
To view this MergeParse output file produced by the snippet you sent, you would call it a Velo file and Binview should channelize the data and skip the headers as in the X5 case. The only ‘natural’ format that is not supported by Binview is a file with just Vita packets with no enclosing Velos, such as you might get if logging packets extracted using the VitaPacketParser class. |
|