The Visualization Toolkit
- 更新时间2023-02-17
- 阅读时长6分钟
The Visualization Toolkit
Refer to the following topics to learn how to use the Data Record AD Visualization Toolkit.
UI Plug-Ins Overview
By default, the Data Record AD User Interface loads UI plug-ins from the following file location: %Public%\Documents\National Instruments\ADAS\Plugins\UI Plugins.
Every UI plug-in comes with its own front panel, the style of which is specified within the plug-in LabVIEW source code rather than the UI. Plug-in parameters exposed in your LabVIEW project can be configured in the Data Record AD UI Configurator. You can modify these to change the behavior or visual appearance of the plug-in.
The UI configuration file, which configures the layout of the Data Record AD User Interface, is generated from the Data Record AD UI Configurator and loaded by the Data Record AD User Interface.
NI-provided plug-ins come pre-built. Once the UI plug-ins are built, the UI configuration file you select is applied and each plug-in front panel is resized to fit into the Data Record AD User Interface panel that the UI configuration file assigns it to.
Included UI Plug-Ins
The Visualization Toolkit comes with several basic UI plug-ins to support your out-of-box experience. Refer to the Data Record AD GitHub Repository at https://www.ni.com/r/datarecord-devguide for information about included plug-ins.
Communication Between the Data Record AD User Interface and Data Record AD
Out-of-the-box communication between the Data Record AD User Interface and Data Record AD takes place through a gRPC server and gRPC client interface with a fixed proto file. The gRPC server runs as a service in the Data Record AD application. A gRPC client can run alongside the Data Record AD application or remotely on a separate machine with network access to the Data Record System.
NI provides the tooling to build UI and I/O plug-ins that communicate over gRPC through a LabVIEW API for the gRPC interface. Navigate to <vi.lib>\DatastreamGrpc\DataStreamGrpc.lvlib to locate server and client LabVIEW APIs. You can use the LabVIEW API to create new clients or servers in LabVIEW, or you can recompile the proto file in the language of your choice for custom clients to send messages to the datalogger. Refer to the Data Record AD GitHub Repository at https://www.ni.com/r/datarecord-devguide to access these tools and view instructions for communicating through the built-in gRPC server.
You can enable additional inter-process gRPC communication, such as between an I/O plug-in and a client UI, by using the datalogger gRPC server as a gateway or by implementing a custom gRPC server and client from a new proto file and then incorporating required functionality into an I/O plug-in in LabVIEW. Refer to the Data Record AD GitHub Repository at https://www.ni.com/r/datarecord-devguide for gRPC communication examples.
You can use the DataStreamGrpc API to configure the gRPC server to only respond to messages from authenticated clients. The DatastreamGrpc.lvlib:LVStartServer VI accepts file path inputs for an SSL certificate (.crt) file and SSL key (.key) file. On the client side, the DatastreamGrpc.lvlib:LVCreateServerChannel VI accepts a file path input for the SSL certificate file. If a server is configured to use a certificate and the client is not authorized (either no certificate exists or the key file is invalid), the client API generates an error the first time that data is requested.
Refer to the Data Record AD GitHub Repository at https://www.ni.com/r/datarecord-devguide for examples of gRPC communication with non-LabVIEW UIs. You can use any messaging schema as long as you provide the communication interface in both your UI plug-ins and I/O plug-ins.
Modifying the Layout of the Data Record AD User Interface
The Data Record AD User Interface is built in LabVIEW, and the source code is provided as part of the Visualization Toolkit. The Delacor Queued Message Handler (DQMH) template provides the architecture of the UI.
- The number of UI panel cells, which should be adjusted in conjunction with modifying the UIPanelLayouts.json file next to the Data Record AD UI Configurator executable
- Background and foreground colors, such as night mode versus day mode
- Startup behaviors, such as asking an operator for credentials
- Presenting UI panels as floating windows
For more information about the DQMH tool and how you can use it to modify the layout of your UI, refer to DQMH Documentation on https://www.delacor.com.
Visualizing Sensor Data
Refer to the following topics for information about visualizing data from your sensors.
Adding and Linking UI Plug-Ins to Cells in the Data Record AD User Interface
- Launch the Data Record AD UI Configurator.
-
Add the UI plug-ins for your application.
- Select the UI Plugins tab.
- Click the + symbol.
- Select a plug-in from the Plugin Type drop-down menu.
- (Optional) Rename the plug-in in the Instance Name field.
-
Set up the UI configuration.
- Configure any plug-in-specific parameters.
-
If there are any message topics to subscribe to, ensure that the gRPC
message topic name of any I/O plug-ins that publish to a UI element
matches the name in the plug-in parameter of the corresponding UI
topic.
You can set these names in the Configuration Editor and the Data Record AD UI Configurator, respectively.
- Select the UI Layout tab.
- Click the + symbol.
- Select the plug-in you want from the left drop-down menu.
- Select the UI cell in which you want that plug-in to appear from the right drop-down menu.
- (Optional) Fill in the Display Name field to populate the title bar for the UI cell.
-
Select to save the configuration in the following default file location:
%Public%\Documents\National Instruments\ADAS\UI
App\UIConfiguration.json. Select to save the configuration in a different file location or to
change the name of the configuration.
Note You can reconfigure the UI at any time in order to load configuration files saved somewhere besides the default file location.
Changing Data Record AD User Interface Data Display Views
You can toggle between data display views in the Data Record AD User Interface by selecting the Operator or Engineer tabs at the top of the UI window. In addition to a multiple-cell grid display, the Engineer view contains tabs for a detailed cell display or for debugging the UI and datalogger console output.
You can access the Detail window by clicking the grid panel title bar above the UI cell you want to examine, or you can click the Detail tab at the top of the Engineer view window and use the arrows on the left and right of the detailed view to index through the available UI cells. You can access the Debug window by clicking the Debug tab at the top of the Engineer view window.
Refer to the following figures to see the data display view options:

- Operator UI
- Status Panel
- Configuration Menu Button

- Grid Panel 1
- Grid Panel 2
- Grid Panel 3
- Grid Panel 4
- Grid Panel 5
- Grid Panel 6
- Status Panel
- Engineering Toolbar
- Configuration Menu Button
- Grid Tab
- Detail Tab
- Debug Tab
- Grid Panel Title Bar

