8 Sending OPC Commands to PolarFire SoC Video Kit

After establishing the connection between the client and server through the OPC UA channel, perform the following steps to start or stop the streaming on the Video Kit.

  1. From the Address Space pane, drag and drop the Camera Controls object into the Data Access View pane as shown in the following figure.
    Figure 8-1. UAExpert Window
    Important: A Recursive Add Notes dialog appears. Click Yes and continue with the next steps.
  2. All the functionality exported by the Video Kit such as video streaming start, video streaming stop, and so on are made visible in the Data Access View pane as shown in the following figure.
    Figure 8-2. Data Access View

The following table lists the Video OPC UA exported APIs and features.

Table 8-1. OPC UA Exported APIs and Features
Display NameValid Values
Streaming StartSet the Streaming Start value to 1111 to start the streaming. The default is 0.
Streaming StopSet the Streaming Stop to 1111 to stop the streaming. The default is 0.
Vision Command ControlSet the Vision Command Control to 1111 to update everything else. The default is 0.
Camera - Green Gain [0-255]Any value between 0-255. The default is 102.
Camera - Red Gain [0-255]Any value between 0-255. The default is 122.
Camera - Blue Gain [0-255]Any value between 0-255. The default is 138.
Camera - Contrast Control [0-255]Any value between 0-255. The default is 154.
Camera - Brightness Control [0-255]Any value between 0-255. The default value is 137.
Camera Gain - Horizontal ResolutionThe valid possible screen resolutions are: 432, 640, 960, 1280 or 1920
Camera - Vertical ResolutionThe valid possible screen resolutions are: 240, 480, 544, 720 or 1072
Camera - Quality FactorAny value between 25-50. The default is 30.

Examples

  1. To start the streaming in the VLC media player running on a machine with the IP address 192.168.2.100.
    1. Change the IP address in the Data Access View pane to 192.168.2.100.
    2. Change the Stream Start value from 0 to 1111. Streaming starts on the Video Kit for the IP Address 192.168.2.100.
    3. Open the VLC media player and load the video.sdp file. For more information on downloading the files, see Demo Prerequisites. The live video stream is displayed in the VLC media player.
  2. To stop the live stream, change the Stream Stop value from 0 to 1111. The video stream from the Video Kit is stopped.
  3. To change the Red Gain value from 122 to 222 and the Contrast value from 154 to 254.
    1. Ensure that the live stream is running.
    2. Change the Contrast Control value to 254.
    3. Change the Red Gain value to 222.
    4. Change the Vision Command Control value to 1111. The contrast and red gain values are restored in the live video steam and is displayed in the VLC media player.
  4. To restore the Red Gain value from 222 to 122 and the Contrast value from 254 to 154.
    1. Change the Contrast Control value to 154.
    2. Change the Red Gain value to 122.
    3. Change the Vision Command Control value to 1111. The new contrast and red gain changes are applied in the live stream and is displayed in the VLC media player.
  5. To change the video Resolution to 640x480.
    1. Ensure that the live stream is running.
    2. Change the Horizontal Resolution value to 640.
    3. Change the Vertical Resolution value to 480.
    4. Change the Vision Command Control to 1111. The new video resolution changes are applied to the live stream and is displayed in the VLC media player.
Important:
  • The VLC media player video.sdp file can be downloaded from the website.
  • Ensure to change the IP Address mentioned in the SDP file with the local computer’s IP address where the VLC media player is installed.