Fundamentals Of Programming Geocom; Introduction; Ascii Protocol Programming - Leica TPS1200 Series Reference Manual

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

Advertisement

GeoCOM Reference Manual
3
F
UNDAMENTALS OF

3.1 INTRODUCTION

We will describe how programs can be written using the different protocols. Certainly, the type system, where the main
differences lie between the protocols, will be described in more detail.

3.2 ASCII PROTOCOL PROGRAMMING

Implementing an application, which uses the ASCII protocol, is based on simple data transfers using a serial line. The
programmer is responsible to set up the serial line parameters of the client such that they correspond to the settings of
the TPS1200 instrument. Then Remote calls are done by just sending the valid encoded requests and receiving and
decoding the replies of them.
For debugging purposes, it might be helpful to use a so-called Y-cable, which enables you to observe the
communication on the serial line using either a terminal or a terminal emulator. For further details see
Appendix B-2 Debugging Utility.
Note: If the settings of the active COM port will be set by any software part and if the server is online, then it is
strongly recommended to use a leading <LF> to clear the receiver buffer at the server side. This will reduce
unnecessary error messages of the next RPC.
3.2.1 Data Types in ASCII Protocol
Each parameter of a RPC has its own associated data type with it. There are varieties of different data types, which have
been defined for the set of published functions. The ASCII protocol supports simple data types only. All data types,
which are different from the base, types in name and aggregated data types are converted and reduced to their base
types. Conversion means to serialise the aggregated data into a comma-separated list of its elements. Therefore, the
programmer has the responsibility to interpret the values depending on the associated data type.
The supported base types and their value range are defined below:
Format Type
boolean
byte
string
double
long
short
unsigned long
unsigned short
Leica TPS1200 / TS30 / TM30 – Version 1.50
P
ROGRAMMING
Valid range
Len
0 = false
1
1 = true
0...255
2 (4)
-
<512
±2.225E-308...
17+3
±1.797E+308
31
31
11
(-2
)...(2
-1)
-32768...32767
6
32
10
0...(2
-1)
0...65535
5
Table 3-1: Communication Parameter Types

Fundamentals of Programming GeoCOM

G
COM
EO
Valid input
representations
0,1
'00','FF','ff','7a',
'A7'
"abc\x0d\x0a"
1, 1.0, 1.0e4,
-0.1e-07, -2
0x7FFFFFFF,
-54321
0, -1, -32700, 45,
56, 0x45e,
0X3AA
0xFFFFFFFF
0, 1, 34000, 65,
65535, 0x3a,
0x00, 0xFFFF
Typical output
representations
0,1
'00','FF','ff',
'7a','A7'
"abc\x0d\x0a"
-0.1234567+e67
15, -154836,
900000
0, -1, -32700, 45,
56
0, 1, 3400065,
95735
0, 1, 34000, 65,
65535
10

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tm30Ts30Tps1200+

Table of Contents