Output API
The SuperCROSS Output API lets programmers add new output formats to the SuperCROSS Save options. New output formats are described in Microsoft Windows DLLs called output plugins.
The plugins contain the functionality needed by SuperCROSS to present the format to the user and trigger the creation of an output file. The plugin gains access to the functionality via an OutputCallBackType
struct
whenever the user saves to one of the plugin formats.
- For a full listing of the variables and functions, see Variables and Functions.
- An example of an output plugin, is provided with SuperCROSS. If you have installed to the default location, this will be available in C:\Program Files (x86)\STR\SuperCROSS\Help\APIs\Example
Creating a Custom Output Plugin
To create a custom output plugin:
- Start a new Win32 Dynamic Link Library project.
- Include Output.h into your source of your SuperCROSS installation. This file is located in the C:\Program Files (x86)\STR\SuperCROSS\Help\APIs directory.
- Define a function based on the
typedef QueryNumFormatODLL
. This function must return the number of output formats your plugin supplies to SuperCROSS. - Define a function based on the
typedef QueryNameFormatODLL
. This function must supply SuperCROSS with the names and extensions of the available save formats. - Define a function based on the
typedef OutputFileODLL
. This function must produce the actual output file. - Compile the DLL as a single-threaded application.
Add a Custom Output Format to SuperCROSS
To add a custom output plug-in to SuperCROSS.
Open the SuperModule.ini configuration file in a text editor. In a default installation, this file is located in C:\ProgramData\STR\SuperCROSS.
Make a backup copy of this file before making any changes.
Locate the
[Output]
section:TEXT[Output] SaveHTML=SaveHTML.dll SaveXML=SaveXML.dll SaveExcel=ToExcel.dll ToPcAxis=ToPcAxis.dll ToPcAxis2000=ToPcAxis2000.dll ToSRD=ToSRD.dll ToText=ToTextualTable.dll ServerJobLog=ServerJobLog.dll
Add the name of the new output plugin. For example:
CODENewName = C:\path\custom.dll
Save your changes. The new save format will then be available in save and output dialogs.
(Optional) If you are going to produce a new output format that will be used in batch procĀessing, then you also need to make this change on the SuperCROSS Server and Client machines.
To display the custom output format at the top of the list in the Save As window:
Open the super.ini configuration file in a text editor. In a default installation, this file is located in C:\ProgramData\STR\SuperCROSS.
Make a backup copy of this file before making any changes.
- Locate the
[General]
section. Add the following line:
CODECustomSaveFormatFirst=1
Save your changes.
Remove a Custom Output Format from SuperCROSS
To remove a custom output plugin:
- Open the SuperModule.ini configuration file in a text editor. In a default installation, this file is located in C:\ProgramData\STR\SuperCROSS.
- Locate the
[Output]
section. - Remove the custom plugin from the list.
Save your changes.
Tables
The Output API lets you query everything you might want to know about the table the user created. To refer to an axis, use the AxisType enumeration values:
kWafer
kRow
kColumn
Each axis of the table contains zero or more fields:
- Zero fields means the user put no fields in the axis.
- More then one field means the axis contains nesting.
Use the following functions to query the table:
Function | Returns |
---|---|
QueryNumFields() | The total number of fields in the table. |
QueryNameField() | The name of a field. |
QueryAxisField() | Which axis the field is in. |
QueryLevelAxisField() | The level of its nesting. |
Each field contains entries numbered from 0 to QuerySizeField() - 1. The axis label can be retrieved with QueryNameValue(), and the unique identifier (which is needed by some other API functions) is retrieved with QueryUniqueValue().
The actual data cells along each axis are indexed from 0 to QuerySizeAxis() - 1. Passing a valid set of [wafer, row, column] indices to QueryDataCellAxisSpecial() lets you retrieve the cell data from the table, as well as any special string that displays in place of the data (such as the confidentiality string).
Derivations
Derivations are user created fields that are calculated based on other values in the database. For more information about derivations and how to create them, see Derivations.
Use the following functions to query derivations:
Function | Returns |
---|---|
QueryDerivationKindAxis() | Retrieves axis derivations. |
QueryDerivationKindField() | Retrieves field derivations. |
The Output API uses the following enumerated types for describing derivations:
Enumerated Type | Description |
---|---|
ValueType | Define the type of value within a field. Possible values:
|
EntryType | Define the type of value within an axis. Possible values:
|
DerivationKindType | Specifies the type of a derivation. Possible values:
|
Output API conventions
- All string values the Output API returns are null terminated ASCII strings. The Output API never returns strings greater then 32,768 characters in length.
- Output API functions that require a buffer to return values can be given a NULL buffer pointer or a buffer length of 0, and they will then return only the length of the data which was going to be provided (including null terminator, in the case of strings).
- In multilingual databases, text that is retrieved from queries may be intermediate metadata strings that need to be translated into appropriate language specific text. Passing all retrieved strings to
QueryTranslatedKeyword()
will result in any such strings being transĀlated for you.