RtGigEVision Sample
This sample demonstrates how to use RtGigEVision APIs to control and receive data from a GigE Vision Camera.
Setup and Configuration
Before running the sample, set up the sample environment as follows:
- Connect the camera and the Vision NIC to the same Power-over-Ethernet (PoE) switch.
Note: Ensure that the NIC being used is assigned to the wRTOS Subsystem.
- Configure the NL2 Interface:
- Create an NL2 interface in wRTOS Settings with the name RtGigE_01_Nic.
- Assign the IP address and subnet mask that matches your camera’s network. These values must allow the camera and NIC to communicate.
- Configure the interface’s first receive queue to use the wRTOS GigE Vision filter.
- Set the filter path to C:\Program Files\IntervalZero\MaxRT\wRTOS\bin\RtgvFilter.rtdll
- Enable the filter.
Note: Once everything is configured, your camera should be discoverable by this sample or any other wRTOS GigE Vision tool.
- Optionally enable verbose output in the NL2 console to confirm that the filter has started.
Source Files
| File | Description |
|---|---|
| RtGigEVisionSample.cpp | The main source code for this sample. |
| RtGigEVisionSample.h | The header file for this sample. |
Building the Sample
Build the sample in any of the four available configurations: Debug, Release (to build RtGigEVisionSample.exe) or RTSSDebug, RTSSRelease (to build RtGigEVisionSample.rtss).
Running the Sample
Run the compiled binary with no command-line arguments on a system where the NIC and camera are configured as instructed above.
RTSSrun RtGigEVisionSample.rtss
Expected Results
- The camera is detected.
- The stream starts successfully.
- Frames are grabbed without errors.
- The sample shuts down cleanly.
Example Output
Camera 0: manufacturer name: FLIR model name: Oryx ORX-10G-51S5C device version: 1710.0.0.0 Initialized Control of Camera 0: Manufacturer Name: FLIR Max Width: 2448 Max Height: 2048 Width: 1104 Height: 898OffsetX: 0 OffsetY: 0 Pixel Format: 1080009 Acquisition Mode: Continuous Payload Size: 991392 Successfully started stream for camera 0, on NIC RtGigE_01_Nic and Port 4500 Done Grabbing Frames Close Stream for camera 0 Close Camera Control for camera 0 RtgvClose
Unexpected Results
- No cameras are discovered.
- The IP address is incorrect.
Remarks
- The sample requires the NIC to be properly configured with a compatible IP address and connected to the PoE switch powering the camera.
- The camera discovery uses the configured NIC IP to enumerate available cameras on the network.
- Software-triggered acquisition mode is supported and will send triggers before grabbing frames if enabled on the camera.
- Stream errors are handled at different times by a dedicated thread.