Image Tester
Description
Image Tester is a simple Java application that can connect to a running USARSim image server and request images at a specified interval. It is a simple way to test that an image server is running correctly and compliantly.
Requirements
- Java 6 JRE
- Java Web Start
Web Start Launcher
Image Tester is available through Java Web Start.
Source code
The Java source code for this application is available as a NetBeans 6 project (nominally under BSD license).
Instructions
When Image Tester is launched, it will open a window with several parts. At the top are the server options, and at the bottom are the request options.
To connect to a server:
- Enter the hostname or IP address of the server in the address box at the top.
- Enter the port number (note that the default port of 5003 is the default port for the USARSim Image Server).
- Press the
Connect toggle button.
The application will try to open a socket to the specified machine. If the connection fails, the toggle will unclick itself after 2 seconds. If the connection is successful, the toggle button will stay depressed. Some version of the USARSim Image Server send an image as soon as a client connects. If this is the case, the Image Tester will receive and display this initial image.
To request an image stream, we must set up the request settings at the bottom of the window.
- Enter the string to transmit to the USARSim Image Server into the Command box.
- Enter the period, in milliseconds, between requests into the Refresh box.
- To begin sending requests, press the
Request toggle button.
The server will begin streaming requests until the connection is closed or the
Request toggle button is clicked again.
Warning: The Image Tester will not wait for an incoming frame to send a new request. It will send new requests at a constant rate. If the period is set too low, this can cause the USARSim Image Server to queue up a large number of requests and continue sending frames even after the Request button is unchecked.
The Image Tester also allows the transmission of binary encoded data using a simple string format. Binary commands can be specified in the form:
\[# of bytes]x[decimal value]
This will transmit the specified value in the specified # of bytes in Big-Endian format. For example, to encode an unsigned integer with a value of 2034, one would enter the string
\4x2034. This can be used to insert binary bytes into the request strings.