Trimble Outdoors 44326-00-ENG GPS Receiver User Manual


 
FirstGPS Starter Kit User Guide
63
Using the FirstGPS API
A
1.7.5
navGetEvent
Retrieve a FirstGPS event.
Description
The events are queued up internally inside the FirstGPS library. To
retrieve the events in the FIFO order (First In First Out), pass
EVENT_GET_FIRST for ucGetFlag. Otherwise, use
EVENT_GET_LAST. This retrieves the most recent event.
If no events have been generated at the time when this function is
called, the calling task will be suspended until an event has been
generated. Pass the ID of the calling task in pvTaskId. This must be an
RTOS-specific pointer to a type of the task control block used by the
RTOS. This pointer will be cast to a task type relevant to the RTOS
which will allow the FirstGPS library to suspend the calling task.
lTimeOut specifies the timeout value in milliseconds after which the
suspended task will be resumed. If the task times out and no event has
been generated yet, NAV_ERROR is returned.
If some event has been generated before this function was called, the
event will be retrieved as specified by the ucGetFlag value and the
function will return immediately. Otherwise, the function will suspend
the calling task until either an event has been generated or the timeout
(lTimeOut) expired.
If an event has been retrieved successfully, the function returns
NAV_OK and updates pulEvent and pvEventData pointers with the
retrieved event and its data.