Trimble Inc. 10950 Benutzerhandbuch
Alloy GNSS reference receiver User Guide
113
How to use Programmatic Commands
In order to use the Programmatic Interface commands, the following must be available:
•
A GNSS Receiver on a TCP/IP link. This could be either an Ethernet connection or a PPP
connection over a serial port.
connection over a serial port.
•
A computer that can send HTTP requests over the TCP/IP link to the GNSS Receiver. This is
assured if a web-browser can communicate using the GNSS Receiver Browser-GUI interface.
assured if a web-browser can communicate using the GNSS Receiver Browser-GUI interface.
•
A programming tool that allows sending CGI requests, and receives the responses. On most
Unix/Linux systems this can be satisfied with the command-line utilities perl or curl.
Unix/Linux systems this can be satisfied with the command-line utilities perl or curl.
Programmatic commands have to be encoded as URL or CGI requests. This requires assembling
several pieces of information.
several pieces of information.
•
The desired protocol (http or https).
•
The DNS name or IP address of the target system.
•
The Verb, Object, and Parameters forming the command.
The URL will be of the form:
http://SystemName/prog/Verb?Object¶m=value¶m=value...
If any parameter values have special characters in them, like spaces or ampersands, these must be
encoded using %hex formatting. For example, each space must be replaced with the sequence
%20.
encoded using %hex formatting. For example, each space must be replaced with the sequence
%20.
Once the URL is determined, the CGI transmission tool is used to send a "GET" request, containing
the encoded command, to the target GNSS Receiver. The GNSS Receiver will respond by sending
back a document in one of the five response types. Almost all responses are simple ASCII text
which can then be displayed or parsed as the application requires.
the encoded command, to the target GNSS Receiver. The GNSS Receiver will respond by sending
back a document in one of the five response types. Almost all responses are simple ASCII text
which can then be displayed or parsed as the application requires.
One exception to the previous paragraph is the case of uploading a file to the GNSS Receiver.
Upload commands use a "POST" request instead of a "GET" request. See Uploading Files for details.
Upload commands use a "POST" request instead of a "GET" request. See Uploading Files for details.