Skip to content

Commit

Permalink
Documentation change only: improve description of uGnssMsgReceiveStar…
Browse files Browse the repository at this point in the history
…t().
  • Loading branch information
RobMeades committed Feb 21, 2024
1 parent e46ddee commit 9694ef9
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions gnss/api/u_gnss_msg.h
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,23 @@ int32_t uGnssMsgReceive(uDeviceHandle_t gnssHandle,
* transport, please instead open a Virtual Serial connection for
* that case (see uCellMuxAddChannel()).
*
* Note: if you wish to capture multiple message IDs, e.g. "G?GGA"
* and "G?RMC", then you should make a call to uGnssMsgReceiveStart()
* for both message IDs, which could be with the same pCallback, (don't
* worry about resources, internally the same monitoring task will be
* used for both) and either call uGnssMsgReceiveStop() for both when
* done or call uGnssMsgReceiveStopAll() to stop both of them.
* Alternatively, you could set a wider filter (in this case
* messageId.type = #U_GNSS_PROTOCOL_NMEA; messageId.id.pNmea = "";
* (i.e. all NMEA messages)) and do the filtering yourself in your
* #uGnssMsgReceiveCallback_t callback by checking the contents of
* the pMessageId pointer it is passed, e.g. with uGnssMsgIdIsWanted()
* in a loop for a list of wanted message IDs, or by hand in your
* own way if you prefer: this might be a very slightly higher
* processor load but, in the end, the filtering is always going to
* be in C code on this MCU and so whether you do it in your
* application or this API does it internally is a moot point.
*
* @param gnssHandle the handle of the GNSS instance.
* @param[in] pMessageId a pointer to the message ID to capture;
* a copy will be taken so this may be
Expand Down

0 comments on commit 9694ef9

Please sign in to comment.