Customizing Config Store Registration
When an IVI driver is installed on an end user system, a number of entries for the driver must be created in the IVI Configuration Store. Information such as the driver's repeated capability physical names, and supported IVI instrument classes is all required by the IVI specifications to be placed in the IVI Configuration Store by the IVI driver installer.
During the build process of the driver project, Nimbus automatically emits a special XML file based on declarations and attributes within the driver source code itself. This file is named located in the intermediate output folder and is named ConfigStore.g.xml. This file does not appear as a project item in Solution Explorer. It contains all of the information that the Nimbus driver installer will use when the IVI driver is deployed on the end user system. This ConfigStore.g.xml is actually a complete "mini" IVI Configuration Store, with all of the requisite formatting and entries. The driver installer merges the contents of this file with the end-user's IVI Configuration Store file.
There are two ways to customize the Configuration Store entries for a specific driver:
Adding attributes to the ConfigStore.cs file in the driver project.
Adding a custom ConfigStore.xml file to the driver project.
The first technique should be preferred when the requisite control is available via the special Configuration Store attributes available in the Nimbus Class Library. The attributes that can be added to the ConfigStore.cs file include the following:
Example usage of these attributes is available directly in the ConfigStore.g.cs file for any Nimbus-generated IVI.NET driver.
When greater control is required than can be achieved with the Nimbus Class Library Configuration Store attributes, a custom ConfigStore.xml file can be added directly to the driver project. If a ConfigStore.xml is added to the driver project as a project item, Nimbus will not generate the ConfigStore.g.cs file and the driver developer's custom ConfigStore.xml file will be used instead.
If you add a custom ConfigStore.xml file by directly editing it, you must take great care to produce a valid XML file, else the driver installer will fail on the end user system (often with a non-intuitive error message).
One effective technique for producing a valid ConfigStore.xml file is to start with the ConfigStore.g.xml produced from the normal Nimbus build process. Then, edit the resulting file in one of two ways:
Directly editing the file with a text editor.
Using a 3rd-party IVI Configuration Store editor.
One of the chief benefits of the Nimbus ConfigStore.g.xml file being a complete IVI Configuration Store is that it can be edited using any available IVI Configuration Store editor, such as NI-MAX® from National Instruments®. The advantages of this approach are that there is far less danger of corrupting the format of the ConfigStore.g.xml file and that the customization can be performed without having to understand the details of the IVI Configuration Store file format.
Download a complete CHM version of this documentation here.