WindowsRTX64UsingSTL

Description

This sample demonstrates data exchange between a real-time process and a Windows user-space process using C++ STL classes to manage the data that is exchanged via a shared memory region. There are three folders in this sample:

Source Files

Common

File Description
common.h Header file
DataOwner.cpp Implementation of class DataOwner, which manages a shared memory region used to transfer data between the real-time process and the Windows process.
DataOwner.h Header file for class DataOwner

RtConsumer

File Description
RealTimeConsumer.h Header file for class RealTimeConsumer.
RealTimeConsumer.cpp Implementation of class RealtimeConsumer, which waits on an event and when that event is signaled by the WinProducer application, consumes the data.
RtConsumer.h Header file.
RtConsumer.cpp A real-time application that instantiates class RealtimeConsumer and operates that instance.
RtConsumer_VS<Visual Studio Version>.vcxproj Project file for supported versions of Visual Studio.
RtConsumer_VS<Visual Studio Version>.vcxproj.filters Project filters file for supported versions of Visual Studio.
RtConsumer_VS<Visual Studio Version>.sln Solution file for supported versions of Visual Studio.

WinProducer

File Description
WinProducer.h Header file.
WinProducer.cpp A windows application that sends data and commands to the real-time consumer application using shared memory and an event.
WinProducer_VS<Visual Studio Version>.vcxproj Project file for supported versions of Visual Studio.
WinProducer_VS<Visual Studio Version>.vcxproj.filters Project filters file for supported versions of Visual Studio.
WinProducer_VS<Visual Studio Version>.sln Solution file for supported versions of Visual Studio.

Building the Sample

Open the solution in Visual Studio and build the RtConsumer and WinProducer projects as they are.

Running the Sample

Start the RtConsumer real-time application first, then start the WinProducer application.

APIs Referenced

RTAPI