GeoCOM Reference Manual
Communication Settings
Leica TPS1200 / TS30 / TM30 – Version 1.50
28
5.4.5
COM_GetBaudRate - getting the current baud rate
COM_GetBaudRate ...................................................................................................................................................................................................................................................................
C-Declaration
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ -
COM_GetBaudRate ( COM_BAUD_RATE &eRate )
VB-Declaration
VB_COM_GetBautRate( eRate As Long )
ASCII-Request
-
ASCII-Response
-
Remarks
Get the current baud rate of the serial line. It should be the setting of both client and server.
Parameters
eRate
Out
Baud rate of serial line.
Return-Code Names and Return-Code Values
GRC_OK
0 Execution
successful.
See Also
COM_OpenConnection
Example
void main()
{
GRC_TYPE
rc;
COM_BAUD_RATE
eRate;
// init GeoCOM
...
// get baud rate of active connection
rc = COM_GetBaudRate(eRate);
if (rc != GRC_OK)
{
COM_ViewError(rc, "Setup baud rate");
}
else
{
printf("Baudrate is %d Baud = " );
switch (eRate )
{
case COM_BAUD_115200:
printf("115200\n");
break ;
case COM_BAUD_57600:
printf("57600\n");
break ;
case COM_BAUD_38400:
printf("38400\n");
break ;
case COM_BAUD_19200:
printf("19200\n");
break ;
case COM_BAUD_9600:
printf("9600\n ");
break ;
case COM_BAUD_4800:
printf("4800\n ");
break ;
case COM_BAUD_2400:
printf("2400\n ");
break ;
default:
printf("illegal\n ");
break ;
}