All Cadcorp SIS API Methods

ConnectGps Method

Description

Establishes a connection with the GPS device attached to the computer. SIS starts reading the input immediately.

Syntax

Visual Basic
Public Function ConnectGps( _
   ByVal port As String, _
   ByVal baudrate As Long, _
   ByVal databits As Long, _
   ByVal parity As Long, _
   ByVal stopbits As Long, _
   ByVal flags As Long _
) As Integer

Parameters

port
The name of the port on which the GPS device is attached. Should be "COMx", where x is in the range 1 to 255 inclusive.

baudrate
The baudrate (bits/second) at which SIS will communicate with the GPS device.

databits
The databit setting to be used in the communication with this GPS device.

parity
The parity setting to be used in the communication with this GPS device.
The possible settings are:

0 - NOPARITY
1 - ODDPARITY
2 - EVENPARITY
3 - MARKPARITY
4 - SPACEPARITY

For more information refer to the on-line help for the DCB structure in the Windows serial communication API.

stopbits
The number of stop bits to be used in the communication with this GPS device.

The possible settings are:

0 - ONESTOPBIT
1 - ONE5STOPBITS (the stop bit is transferred for 150% of the normal time used to transfer one bit)
2 - TWOSTOPBITS

For more information refer to the on-line help for the DCB structure in the Windows serial communication API.

flags
Flags setting the NMEA options for receiving data from the GPS device. There are three NMEA sentences of interest: GGA, GLL and RMC, and a checksum which can be checked. These are controlled with public constants which can be combined with "OR" to form a single value. The constants are:

SIS_GPS_NMEA_GGA
SIS_GPS_NMEA_GLL
SIS_GPS_NMEA_RMC
SIS_GPS_NMEA_CHECKSUM

At least one of the first three must be included.

Remarks

It is not permissible to connect to a GPS device whilst a GPS log file is being replayed.

Available: D OD OM

Group:

Example

sis.ConnectGps ("COM4", 4800, 8, 2, 0, SIS_GPS_NMEA_GGA or SIS_GPS_NMEA_RMC or SIS_GPS_NMEA_CHECKSUM)