Leica TPS1200 Series Reference Manual page 13

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

Advertisement

GeoCOM Reference Manual
#define NUM_OF_RETRIES 1
GRC_TYPE
RetCode;
BOOLE
bOpenAndRunning = FALSE;
// initialize GeoCOM
RetCode = COM_Init();
if (RetCode == GRC_OK)
{
// open a connection to the TPS1200 instrument
RetCode = COM_OpenConnection (COM_1, COM_BAUD_19200,
if (RetCode == GRC_OK)
{
bOpenAndRunning = TRUE;
}
}
// optionally set up other comm. parameters here
if (RetCode == GRC_OK)
{
// -- functionality of the application --
// here we just test if communication is up
RetCode = COM_NullProc();
if (RetCode != GRC_OK)
{
// handle error
}
}
// close channel
if (bOpenAndRunning)
{
RetCode = COM_CloseConnection ();
if (RetCode != GRC_OK)
{
// handle error
}
}
// anytime finalize and reset GeoCOM
RetCode = COM_End();
if (RetCode != GRC_OK)
{
// handle error
}
3.3.3 C/C++ Development System Support
GeoCOM system files have been developed using Microsoft Visual C/C++ 6.0. Although this development
environment were the basis for the current GeoCOM implementation, it has been emphasised that it is independent of it,
hence other development environments can be used too. But please notice that it has not been tested thoroughly so far.
3.3.4 Programming Hints
Order of Include Statements
Since GeoCOM redefines
1. Include system headers like
2. Include
com_pub.hpp
3. Include the current project headers
BOOLE Definition
GeoCOM defines its own Boolean type as an enumeration type of
exception, this does not produce any problems. Only if a
parameter the compiler (MS-VisualC/C++) generates an error. To solve this problem the expression, which will be
assigned to, has to be converted by a
Leica TPS1200 / TS30 / TM30 – Version 1.50
NUM_OF_RETRIES);
,
and
we recommend the following include order:
TRUE
FALSE
NULL
or
stdio.h
stdafx.hpp
statement to
CAST
Fundamentals of Programming GeoCOM
and
FALSE
TRUE
type value will be assigned to a
BOOL
.
BOOLE
. It is called
. With one
BOOLE
type variable or
BOOLE
13

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tm30Ts30Tps1200+

Table of Contents