Coupling NI Requirements Gateway with LabWindows™/CVI™

Publish Date: Jun 11, 2018 | 0 Ratings | 0.00 out of 5 | Print | Submit your review

Overview



TestStand


Coupling Series Home


MATRIXx


Note: This document applies to NI Requirements Gateway versions 1.1 and earlier. For information on newer Requirements Gateway versions, refer to the Coupling External Applications with NI Requirements Gateway topic in the NI Requirements Gateway help.

NI LabWindows/CVI is an ANSI C integrated development environment that was designed with engineers and scientists in mind. With a wide array of programming tools that assist in the creation of test and control applications, LabWindows/CVI combines the longevity and reusability of ANSI C with a set of tools that simplify instrument control, data acquisition, and analysis. NI Requirements Gateway can interface with LabWindows/CVI in order to parse references to requirements that you have implemented within your ANSI C code or LabWindows/CVI function panels.

Table of Contents

  1. Specifying Coverages in LabWindows/CVI
  2. Specifying Coverages in LabWindows/CVI
  3. Additional Resources

1. Specifying Coverages in LabWindows/CVI

LabWindows/CVI documents are traditionally used to implement requirements rather than specify requirements, therefore LabWindows/CVI documents will almost always be added to a project in the form of a covering document.

When adding a LabWindows/CVI document to your NI Requirements Gateway project, the Select Files to Include in Document dialog box allows you to specify different types of LabWindows/CVI files with one single document node.

Figure 1 - NI Requirements Gateway allows you to associate any number of source, include, or function panel files within one document node

When specifying multiple LabWindows/CVI files within one document node that covers a specification document, the requirements set forth in the specification document are not considered covered unless the combination of all files cover the requirements (Boolean OR functionality).

Within the Select Files to Include In Document dialog box, you have the option of associating NI Requirements Gateway with a directory in which your LabWindows/CVI files are located, in which case NI Requirements Gateway will include all source (*.c), include (*.h), and function panel (*.fp) files in the project.  Furthermore, the user can add one source, include, or function panel file, or even add a LabWindows/CVI project (*.prj) or workspace (*.cws) file to the NI Requirements Gateway project.  In the instance that the user adds a project or workspace file to the NI Requirements Gateway project, all source, include, and function panel files within the project or workspace will be analyzed.

Figure 2 - An example NI Requirements Gateway Management View with LabWindows/CVI covering documents

Back to Top

2. Specifying Coverages in LabWindows/CVI

References contained in LabWindows/CVI covering documents should use syntax to define coverage of requirements.  Coverages can be specified within comments of LabWindows/CVI source, include, or even function panel files. 

References in Source or Include Files

When specifying coverages within LabWindows/CVI source or include files, C or C++ style comments can be used, provided the user specifies the appropriate coverage string within the comment.  The default syntax for specification of coverages in LabWindows/CVI is as follows, where reqid is the requirement ID of the requirement being covered:

//Implements reqid

Or

If you have a particular covering document that implements multiple requirements, you must specify each coverage on a separate line.  For example:

//Implements REQ001
//Implements REQ007

When not using comment blocks (/* Comment Here */), you may place the coverage line immediately before or in a function in order to designate that function as implementing a particular requirement.  If placing the coverage before a function definition, you can optionally leave any number of commented lines in between the line of coverage and the function definition.  Non-commented lines with white space in between the coverage and function definition will cause the implementation to be associated with the source or include file as a whole, not the function.

When using comment blocks (/* Comment Here */), the line of coverage must immediately precede the function definition.  Lines with white space in between the coverage and function definition will cause the implementation to be associated with the source or include file as a whole, not the function.

Figure 3 - In each commenting case, the white space in between the coverage line and function definition will cause the reference to be associated with the source file as a whole, not the function

To simplify the coverage specification process, NI Requirements Gateway gives users the ability to copy requirements for coverage using LabWindows/CVI.   When you select Copy For » LabWindows/CVI Comment  from the right-click context menu, NI Requirements Gateway places the appropriate coverage string for the requirement in the system clipboard so that the user can simply paste the string into LabWindows/CVI source or include documents and no longer have to worry about the appropriate coverage string syntax.

Figure 4 - NI Requirements Gateway allows you to copy the LabWindows/CVI syntactically correct coverage string to the system clipboard for pasting in a LabWindows/CVI covering document

As with all types in NI Requirements Gateway, advanced users can customize the LabWindows/CVI type to read different syntactical requirements coverage specifications.

References in Function Panel Files

When specifying coverages within LabWindows/CVI function panel files, include commented references to the requirement implemented within the function panel help document.

The default syntax for specifying comments within LabWindows/CVI function panel help documents is as follows, where reqid is the requirement ID of the requirement being covered:

<!--$$ Implements reqid $$-->

If you have a particular function panel that implements multiple requirements, you must specify each coverage on a separate line.  For example:

<!--$$ Implements REQ001 $$-->
<!--$$ Implements REQ007 $$-->

Figure 5 - A requirement reference contained within the help file of a LabWindows/CVI function panel

Back to Top

3. Additional Resources

NI Requirements Gateway

NI LabWindows/CVI

Download Free Evaluation Software

 

Back to Top

Bookmark & Share


Ratings

Rate this document

Answered Your Question?
Yes No

Submit