Printable versions
This Page
All Pages
PDF (2.0MB)

Index

Component
GpsToolsNET

Class
NmeaParser

Properties
PortEnabled
BaudRate
ComPort
GpsDatum
NoEvents
Parent
AllEventsGeneric
ChecksumMandatory

Events
OnGpsFix
OnSatellites
OnMovement
OnQuality
OnComStatus

Generic
GGA
GLL
RMC

Methods
Dispose
EventInterval
Parse
GetGpsFix
GetSatellites
GetMovement
GetQuality
GetComStatus
WriteData

NmeaParser.PortEnabled GpsTools v1.30 and later

When set to False the receiving of data is stopped. When set to True, NmeaParser starts searching for a GPS. This will be done in one of four ways:

1. Auto detection.
Set NmeaParser.ComPort to 0 (default value).

In auto detection mode that GpsTools will open (and close) all serial ports in search for a connected GPS. If this is not desired it is recommended you should use some of the methods presented below instead. NOTE! Auto detection works poorly with some BlueTooth drivers since they tend to display a message box when nothing is available at a virtual serial port! You can in most cases avoid this by pairing the devices, or by using GpsGate.

GpsTools 2.20 and later: GpsTools will first try to start GpsGate and connect to GpsGate (using GpsGate API) if that fails it will open and look for a GPS on all available COM ports.

GpsTools 2.30 and later: On WM 5.0 (Pocket PC) and later GpsTools will try to connect to the Microsoft GPS Intermediate driver before searching the COM ports.

Example 1, Auto detection:
(GpsTools 1.33 and later)
objParser.PortEnabled = True ' Starts searching for a NMEA GPS

2. Auto baudrate detection.
Set NmeaParser.ComPort to the port number were the GPS is located.
Set NmeaParser.BaudRate to 0.

The baud rate is automatically detected. This mode works best with BlueTooth GPS receivers since it reconnects to GPS receivers that goes in and out of reach of the BlueTooth pico network.

Example 2, Auto baudrate detection:
(GpsTools 1.33d and later)
objParser.ComPort = 1 ' Serial port 1 (COM1:)
objParser.BaudRate = 0
objParser.PortEnabled = True ' Starts listening

3. Specified mode.
Set NmeaParser.ComPort to the port number were the GPS is located.
Set NmeaParser.BaudRate to the baud rate the GPS is using (default 4800).

Example 3, Specified mode:
(GpsTools 1.30 and later)
objParser.ComPort = 1 ' Serial port 1 (COM1:)
objParser.BaudRate = 4800 ' 4800 baud
objParser.PortEnabled = True ' Starts listening

4. Using GpsGate
GpsTools 2.20 and later: If you set NmeaParser.ComPort to -1 GpsTools will try to start and connect to GpsGate, using GpsGate API, if this fails an exception will be thrown.

5. Using Microsoft GPS Intermediate driver
GpsTools 2.30 and later: On WM 5.0 and later GpsTools can be configured to use Microsoft GPS Intermediate driver only.
objParser.ComPort = -2 ' Use GPS Intermediate driver
objParser.PortEnabled = True ' Starts listening

See also NmeaParser.BaudRate, NmeaParser.ComPort and NmeaParser.OnComStatus.

Syntax
object.PortEnabled = Value

Part Type Description
object GpsToolsNET.NmeaParser An object that evaluates to an GpsToolsNET.NmeaParser object.
Value bool Enables or disables receiving of data from the serial port.



100% managed code
© 2016 Franson Technology AB, All rights reserved, Contact | | Affiliate | Login