NUERA project template offers readily available data server, command server, PLC server, image server in
order to exchange different type of information through TCP Communication.
Follow simple steps given below to configure Image server.
Step 1: Enable Image Server (if not already enabled)
The image server can be enabled or disabled by using the definition IMG_SERVER_ENABLED in sys_constants.hpp.
Step 2: Configure data server (if needed)
In TCP, the server listens for connection requests from clients at a specific port. By default, the Port Number for the Image server is given in sys_constants.hpp. Navigate to file src >> system_configurations >> sys_constants.hpp. Many constants are defined in this header file. Find IMG_SERVER_PORT. By default, it is defined as 7891. This can be changed as per your requirement. Remember that in Step 4, we
will use this port number as the TCP client end to connect to this image server. The Buffer Size and Data Timeout of the data server can also be changed in this file.
Step 3: Add code to send image
Navigate to file src >> application>> application.cpp.
Call the send_image_tcp(), passing the image(Opencv Mat) which has to be sent to the TCP Client or the other device using TCP. The code needs to be added at the location shown below:
Step 4: Observing Output on TCP client
The application GUI which runs on the PC can be added with a TCP client to receive the image sent by NUERA and display the same.
For any further assistance, please contact our application engineer at firstname.lastname@example.org