다음을 통해 공유


GPS Intermediate Driver Benefits (Windows Embedded CE 6.0)

1/6/2010

The GPS Intermediate Driver provides benefits to applications that use GPS devices as well as to GPS hardware manufacturers. It does this by providing an intermediate layer that abstracts the actual GPS device from application developers. This intermediate layer also abstracts applications from GPS device manufacturers. Ideally, this enables application developers to write code that works with any GPS hardware, and GPS device manufacturers to produce hardware that works with any application.

GPS Without the GPS Intermediate Driver

Without the GPS Intermediate Driver, applications generally access GPS hardware directly through a COM port. Depending on the hardware in the target device, this COM port may be an actual serial port, to which GPS hardware is attached using a serial cable. It can also be a virtual serial port that maps to hardware attached to a Compact Flash, SDIO, Bluetooth, or other peripheral interface.

Applications interact directly with the GPS hardware by calling CreateFile to obtain a handle to the device. With most GPS devices, this connection is exclusive, so only one application at a time can interact with the GPS hardware.

Applications then call ReadFile repeatedly to retrieve GPS location data encoded using the National Marine Electronics Association (NMEA) standard. The NMEA standard is a common interchange format used throughout the GPS industry. Each application then parses the NMEA strings into meaningful data, like the current latitude and longitude of the GPS hardware. For more information about the NMEA standard, see this NMEA Web site.

Benefits of the GPS Intermediate Driver

With the GPS Intermediate Driver, applications use the GPS Intermediate Driver instead of interacting with the GPS hardware directly. The GPS Intermediate Driver is the only code that interacts directly with GPS hardware.

The GPS Intermediate Driver provides two main advantages:

  • Enable multiple applications to use GPS hardware at the same time. The GPS Intermediate Driver makes it appear that each application has its own dedicated GPS hardware.
  • Remove the need for applications to parse NMEA strings to obtain meaningful data. The GPS Intermediate Driver internally parses the NMEA strings obtained from the GPS hardware and makes the parsed information available through a friendly API that contains structures like GPS_POSITION and calls like GPSGetLocation. Applications can also use a backward-compatible stream/ReadFile interface. This ability provides an easy way for existing applications to use the GPS Intermediate Driver without requiring modification.

The GPS Intermediate Driver is built with backward-compatibility in mind. This means that, for most applications and GPS hardware, the GPS Intermediate Driver can be injected transparently. From the perspective of the application, it is still communicating with actual GPS hardware, through CreateFile, ReadFile, and CloseHandle calls. Similarly, the GPS hardware still has a single client, but this client is now the GPS Intermediate Driver, instead of a single application that directly uses GPS data.

See Also

Concepts

GPS Intermediate Driver Architecture

Other Resources

GPS Intermediate Driver
GPS Intermediate Driver Application Development