GeoCOM Reference Manual
Communication Settings
Leica TPS1200 / TS30 / TM30 – Version 1.50
33
5.4.9
COM_SetComFormat - setting the transmission data format
COM_SetComFormat ................................................................................................................................................................................................................................................................
C-Declaration
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ -
COM_SetComFormat( COM_FORMAT eComFormat )
VB-Declaration
VB_COM_SetComFormat( ByVal eComFormat As Long )
ASCII-Request
-
ASCII-Response
-
Remarks
This function sets the transmission data format. Binary data format can only be set if it is supported by the
server. To check if the server supports binary data format RPC COM_GetBinaryAvailable is used.
One can force ASCII data format for special purposes, e.g. debugging.
The server always replies in the data-format that it has received the request.
Parameters
EComFormat Out
COM_ASCII
or
COM_BINARY
Return-Code Names and Return-Code Values
GRC_OK
0 Execution
successful.
GRC_COM_PORT_NOT_OPEN
3104
Port not open for transmission.
GRC_COM_NO_BINARY
3086
TPS Firmware does not support binary data transmission
format.
See Also
COM_GetComFormat
COM_OpenConnection
Example
GRC_TYPE
rc;
COM_FORMAT eFormat;
// change coding method
// eFormat is COM_ASCII or COM_BINARY
eFormat = COM_BINARY;
rc = COM_SetComFormat(eFormat);
if (rc == GRC_COM_PORT_NOT_OPEN)
{
rc = COM_SetComFormat(eFormat);
}
switch (rc)
{
case GRC_COM_PORT_NOT_OPEN:
printf("Port not open\n");
return (GRC_FATAL);
break;
case GRC_COM_NO_BINARY:
printf("Binary format not available "
"for this version.");
// continue in ASII-format
break;
} // end of switch (rc)
// continue in program