How to create records

Nov 4, 2011 at 4:46 PM

I'm now starting to spend some time with LinqToStdf. For my first experiment, I want to create a valid STDF file with dummy data, then I want to read this file again. So I created a StdfFileWriter object and other objects for the main records to be written into the file.

This is the code I started with:

StdfFileWriter fw = new StdfFileWriter(@"F:\MyWorkSpace\STDF\stdfFile.std");
Far far = new Far(); // File Attribute Record
Mir mir = new Mir(); // Master Information Record
Pcr pcr = new Pcr(); // Part Count Record
Mrr mrr = new Mrr(); // Master Results Record

Now I want to put some information in those records and read them. But I want to put valid values for records like the FAR CPU_TYPE and all that fun stuff.

What would be exceptional if someone could point me to a document that explains the fields a tad bit more than the spec document.



Nov 4, 2011 at 11:32 PM

Do you have specific questions about specific fields?  I consider the spec to be the most specific authority on the fields.

As far as CPU_TYP, the spec says the following:

Indicates which type of CPU wrote this STDF file. This information is useful for determining the CPU-dependent data representation of the integer and floating point fields in the file’s records. The valid values are:

0 = DEC PDP-11 and VAX processors. F and D floating point formats will be used. G and H floating point formats will not be used.

1 = Sun 1, 2, 3, and 4 computers.

2 = Sun 386i computers, and IBM PC, IBM PC-AT, and IBM PC-XT computers.

3-127 = Reserved for future use by Teradyne.

128-255 = Reserved for use by customers.

A code defined here may also be valid for other CPU types whose data formats are fully compatible with that of the type listed here. Before using one of these codes for a CPU type not listed here, please check with the Teradyne hotline, which can provide additional information on CPU compatibility.

Generally, these days, this means 2 for little endian (PC-based), and 1 for big-endian (sun-based).  The floating point considerations are not typically useful for modern machines.  In fact, endianness is the only consideration LinqToStdf makes for this field.

You can find more on this in the "Note on Data Representation" section of the spec.  It's a little silly in the modern era when this is not a general problem.