VisualizationStreamer with C++/Proxy
This example shows how to easily send data to the VisualizationStreamer service from a C++ application without needing to directly use gRPC. It uses the vsp::VizStreamerProxyGrpc class which handles all the gRPC details.
Note
The example uses CMake as the build system. CMake can be downloaded from https://cmake.org. You can also manually setup the build in the build system of your choice.
Configuring the Build
Go to the server/VsServer/Examples/Cpp/MinimalGrpcProxy folder in the distribution.
Run cmake to create the build files.
Example:
mkdir build
cd build
cmake ..
Note
You will have to copy the shared libraries (.dll/.so/.dylib) from the server/VsServer/bin folder into the build folder.
Build the Example
make
Running the Example
Assumes that VisualizationStreamer service (VsServiceGrpc) is already running.
./MinimalAppGrpcProxy
If everything is ok, you should see output like this:
Running MinimalAppGrpcProxy
Trying to connect to service at: localhost:50051
- Proxy has connected to service
- Alive response: Server is alive at: 2025-01-31 12:16:55
- Pushing a quad and triangle to the server...
- Create a frame and publish it...
- Done!
Press any key to shutdown the proxy and exit