Function Call Protocol - C/C - Leica TPS1200 Series Reference Manual

Geodetic measurement instruments
Hide thumbs Also See for TPS1200 Series:
Table of Contents

Advertisement

GeoCOM Reference Manual
Example:
The following example uses the RPC CSV GetDateTime to query the current date and time of the instrument:
%R1R,5008:1^m (1^m denotes the terminator)
Note: Additional characters at the beginning of a request, between parameters or at the end are not allowed. They
might lead to errors during interpretation.
Syntax of an ASCII reply:
%R1P,<RC_COM>[,<TrId>]:<RC>[,<P0>,<P1>, ...]<Term>
Optional items are in brackets []. The angled-brackets <> surround names or descriptions. These names have variable
values as described in the types they have. The angled-brackets themselves are not a part of the communication text.
Characters not surrounded by angled-brackets are literal text and are part of the GeoCOM protocol.
%R1P
<RC_COM>
<TrId>
:
<RC>
<P0>,<P1>,...
<Term>
Example:
The following example shows the reply to the RPC 5008 -
%R1P,0,0:0,1996,'07','19','10','13','2f'^m
¦ ¦ ¦ ----------------------------
¦ ¦ ¦
¦ ¦ ¦
¦ ¦ ¦
¦ ¦ ¦
¦ ¦ +------
¦ ¦
¦ +-----
¦
Return code from GeoCOM: 0 means no error (see
+----
GeoCOM return codes for further information)

2.4 FUNCTION CALL PROTOCOL - C/C++

The implementation of GeoCOM for C/C++ conforms to normal function calls. GeoCOM itself handles all necessary
communication. No intervention of the programmer in respect to the communication is necessary with one exception. If
the GeoCOM reports a communication error the programmer has to make sure that either the problem will be solved -
by calling GeoCOM support functions - or no further RPC's will be called - by terminating the running task.
Nevertheless, the programmer has to initialise GeoCOM and set up the port's settings to make sure that communication
can take place. Moreover the user has to make sure that the TPS1200 instrument is well connected.
Example:
An example code fragment for using
initialisation and set up of GeoCOM here. Please refer to chapter 3.2.3 Basic GeoCOM Application Frame for C/C++
for this information.
Leica TPS1200 / TS30 / TM30 – Version 1.50
terminator). As a common shortcut '^m' will be used in examples.
GeoCOM reply type 1.
GeoCOM return code. This value denotes the success of the communication.
= 0 means the communication was successful.
GRC_OK
Refer to '3.7 Common Communication Errors' for further information.
Transaction ID - identical to that of the request. If the request had no
Transaction ID then it will be 0.
Separator between protocol header and following parameters.
Return code from the called RPC and denotes the successful completion if it is
set to 0 (see table 'RPC return codes' in the appendix for further information).
Parameter 0, Parameter 1, ... These parameters will be valid only if
equal to 0 (GRC_OK).
Terminator string (default CR/LF, use
terminator).
The values for month, day, hour,
¦
minute and second are replied in the byte-
+---
format (see table communication parameter
for further information)
Return code from the RPC: 0 means no error
(see RPC return codes for further information)
The Transaction ID of the request. If there was no ID
the value returned is 0.
TMC_GetSimpleMea
General Concepts of Using GeoCOM
COM_SetTerminator
CSV_GetDateTime.
could be the following. We do not take care of the necessary
is
<GRC>
to change the
8

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tm30Ts30Tps1200+

Table of Contents