Trimble Outdoors 44326-00-ENG GPS Receiver User Manual


 
FirstGPS Starter Kit User Guide
33
Software Integration
3
When GPS operation is not required, the library can be shut down to
decrease power consumption. To power down the library, the
application must call navGpsShutDown, page 79. In response to this
call, the NAV_READY_TO_SHUTDOWN event is generated as soon
as the library is completely shut down. It may take up to several
seconds before this event is generated.
3.3
Polled vs. Event-Driven Data Collection
The FirstGPS library provides facilities for both polled and event-
driven data collection.
Polled data collection involves the AppTask periodically calling
FirstGPS API functions to retrieve various data from the library
(position fix, almanac status, satellite data, and so on).
The AppTask assumes the responsibility of scheduling data
collection. This type of data collection is useful when
responding to manual requests for data, such as through a serial
cable, keyboard, or touch-screen interface. Polled data is also
useful when the AppTask has a timer-based scheduling
mechanism to periodically collect, store, and/or process the data
available through the API.
Event-driven data collection allows the AppTask to quickly
retrieve data through the API as soon as the data is generated by
FirstGPS. The library generates an event whenever significant
new data is available while the library is running. For example,
every time the library computes a new position/velocity fix, a
New Position Fix Available event is generated.
The library can generate several different types of events. The
Standard FirstGPS Events table on page 58 lists all of them. Based on
the type of event generated, the AppTask calls a corresponding API
function to retrieve data associated with the event. The Event vs. API
Table, page 35, lists FirstGPS events and the corresponding API
function calls.