C/C++ - Programming - Leica TPS1200 Series Reference Manual

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

Advertisement

GeoCOM Reference Manual
Note: Unnecessary parameters must not be sent.
Although the enclosed header file
they will not be supported. Hence, they have to be sent.
The ASCII Request to call this RPC with the value for
has the following form (note that the value 1 is used for the
TMC_AUTO_INC
counting of enumeration data types start at 0):
%R1Q,2108:1000,1^m
A possible reply can be as follows:
%R1P,0,0:0,0.9973260431694,1.613443448007,1.3581^m
Where the second and third value after the colon corresponds to the
and the fourth value corresponds to the variable
TMC_HZ_V_ANG
after the ':' is not a parameter but the return code value of the RPC).
3.2.2 ASCII Protocol Program Example
For getting a feeling of how requests and replies are build up and work see also the provided
samples directory. Please refer to Appendix C-1 Settings for Terminal Emulator for further information.
3.2.3 Modes of Operation Concerning Communication
Section 3.6 - TPS1200 Instrument Modes of Operation - explains the different modes of operation of GeoCOM
concerning communication. Similar to that the following is valid for the ASCII protocol.
Since the client has to remind which mode is active, no support can be given from the TPS1200 instrument. The only
way to distinguish between modes is to remind the actions an application has initiated and their resulting replies. So far
no other possibility exists to determine the current mode.
To switch on the instrument a single character is sufficient. It is recommended to ignore the subsequent reply (one or
two lines).

3.3 C/C++ - PROGRAMMING

Programming in C/C++ is based on the well-known DLL concept, defined by Microsoft Corp. To compile a project
successfully first you have to include the file
function prototypes. Second
DLL exported functions. To operate successfully the
hence it must be located in a directory, which the operating system looks up for the requested DLL file.
Project Options
Structure byte-alignment
Memory model
Special #defines (if not using MFC)
3.3.1 Data Types in C/C++
Since the main programming language of implementation of TPS1200 instruments Firmware is C/C++ all data types are
initially defined in C/C++. Therefore, no conversion of values or data types is necessary.
3.3.2 Basic GeoCOM Application Frame for C/C++
A C/C++ GeoCOM application consists at least of the following parts:
- Initialise GeoCOM
- Open a connection to the server
- One or more GeoCOM RPC's
- Close the active connection to the server
- Finalise GeoCOM
A sample implementation of above points could be:
// include standard system headers
#include "com_pub.hpp"
// include application headers
Leica TPS1200 / TS30 / TM30 – Version 1.50
com_pub.hpp
com_pub.hpp
has to be included in the project, which enables the linker to resolve the
geocoms2k.lib
geocoms2k.dll
GEOCOMS2K.lib
4 bytes
N/A
STRICT
Fundamentals of Programming GeoCOM
denotes default values for certain function parameters
= 1000 and the inclination measure mode
WaitTime
Mode
and
dHz
dV
dSlopeDistance
, which defines all necessary constants, data types and
file must be accessible for the operating system,
parameter because the
parts of the structure
. (Note that the first value
file in the
geocom.trm
12

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tm30Ts30Tps1200+

Table of Contents