## 5 Test Configurations  
The proposed architecture presented in Section 4 can be employed with all components within a LAN or it can be used over the Internet. A configuration of the measurement system, when components are connected over the Internet is shown in Figure 9. The components inside each LAN are connected by Gigabit Ethernet. As well as PCs, an IP camera and NTP servers, there are also two devices which feature on-board real-time processor and FPGA chips. The devices are of type cRIO-9034 from National Instruments with Intel Atom E3845 CPU running the 64-bit NI Linux real-time operating system. The on-board FPGA chip is of type Xilinx Kintex-7 7K325T and is connected to the CPU by PCI bus. As Figure 9 shows, nodes for data encryption and decryption run on the FPGA, while the camera server and camera client nodes run on the real-time processor. IP camera model Hikvision 2 CD2010F-I was used in all tests, with the following encoding parameters: resolution (\(640\times 480\)), bitrate type (variable), video quality (lowest), frame rate (25) and max bitrate (2048). As mentioned earlier, two options for encoding algorithms are possible: H264 and MJPEG. Video encoding is done on the transmitting end Dell inspiron 15 5000 series laptop PC with an intel core i7-8550U @ 1.80 GHZ processor and Intel UHD Graphics 6.20, while video decoding is done on the receiving end of the test setup by using a Dell Inspiron 7720 laptop PC with an Intel core i7-3630 QM @ 2.4 GHz Processor and an NVIDIA GeForce GT 650 M graphics card. During all the tests, IP camera was located at the University of Limerick, Ireland with Internet connection bandwidth of 100 Mbps for both upload and download. In cases when myRIO was used for decryption, it was located in Sarajevo (Bosnia and Herzegovina) with Internet connection bandwidth of 4 Mbps for download and 2 Mbps for upload. In another case, when both cRIO devices are located in Limerick, Ireland, receiving end of test setup was connected to the Internet with bandwidth 96.2 Mbps for download and 86.0 Mbps for upload. The configuration shown in Figure 10 was used for the case when no encryption is used. In comparison to Figure 9 the only difference in Figure 10 is the absence of encrypt/decrypt applications, which run on the FPGA target. The data is still routed through cRIO devices, but in this case, there is no transfer to the FPGA and processing of the data. Figure 9: Video latency measurement with encryption over the Internet. The flow of data in the experimental configuration with encryption is as follows:  
1. The timestamp sender application (PC1) generates periodic visual events. 2. The camera server (cRIO 1) opens an RTSP [44] connection to the IP camera. 3. The camera client (cRIO 2) opens an RTSP connection to the camera server. 4. The latency measurement application (PC2) opens a connection to the camera client. 5. The camera server generates a timestamp before data encryption. 6. The video data is encrypted on the FPGA and the data is streamed to the listening application. 7. The camera client receives and unpacks each TCP/UDP frame. 8. The FPGA decrypts the video data. 9. The camera client calculates the network delay for each packet. 10. The latency measurement application (PC2) receives visual event information from timestamp sender. 11. When an event is detected, video latency is calculated and stored. It is also worth noting that encryption/decryption functionality can be easily enabled or disabled by changing the state of a switch in the software. In addition, if there is a need to test the performance of different encryption algorithms, the test can be modified in a way that only the code on FPGA is replaced, while the rest of the system remains the same. Here, the test configurations are designed as \"offline\" tests of video and network latency. It means the system being tested, cannot do its normal functions until the test is completed. The reason for this is that there has to be a dedicated PC with display to run the timestamp sender application.