05-01-2017 03:06 PM - last edited on 10-26-2017 01:40 PM by MattP
Link DCAF items to Linux shared memory.
Writes latest value to, and reads latest value from, Linux shared memory on the same NI Linux RT target as the engine in which the module resides.
Configuration of the Shared Memory Module
Steps before Configuration
Left-click on the Shared Memory module. In the "Channel Configuration" tab, select desired "Available Tags," then move them to/from the shared memory mapping.
note: tag direction (read/write) will determine which shared memory mapping is possible (example: From Shared Memory).
Save the configuration. If shared memory will be used to communicate tag data with a C/C++ application, a C header file can be generated to facilitate future configuration changes. It is recommended to download the Linux Shared Memory and DCAF Example (available on LabVIEW Tools Network) as a starting point for C and LabVIEW IPC.
Source Code Design
The DCAF Shared Memory module maps Linux shared memory to the DCAF tag data engine. It relies on DCAF for memory allocation and data dictionary indexing in LabVIEW, and relies on the NI Linux RT IPC, NI Linux RT Utilities, and NI Linux Errno LabVIEW Libraries for Linux shared memory, timing, and Linux error translation duties. These libraries are available as open source collaborations on the NI Systems Engineering GitHub at:
Figure 1. Generate Memory Allocation.vi: Translating DCAF configuration channels by data type and channel classification.
Figure 2. initialize runtime lines.vi: Pass DCAF configuration channels' data dictionary indices to shared memory runtime.
Figure 3. init data cluster.vi: Create Linux shared memory and bundle pointer and configuration information.
Install the Shared Memory Module directly from VI Package Manager.
Please report any issues with this module on our Github repository.
You may also post here with questions.
Visit Collaborating on the Development of DCAF to learn how to contribute your own improvements to this module directly.