SparkFun Iridium 9604  v1.0.0
Library for the Iridium 9604 Hybrid LTE-M Cellular + Iridium Satellite (SBD) + GNSS IoT module
Loading...
Searching...
No Matches
urcUUGNMEA.h
Go to the documentation of this file.
1
23#pragma once
24
25#include "../urcHandler.h"
26
28{
29
31 class urcUUGNMEA : public urcHandler
32 {
33 public:
35
36 bool process(urcHandlerInterface &device, const char *params)
37 {
38 const char *start = strchr(params, '$'); // Find the start of the NMEA sentence
39 if (start == nullptr)
40 return false;
41
42 // Find the end of the sentence: the closing quote, or the end of the event
43 const char *end = strchr(start, '\"');
44 if (end == nullptr)
45 end = start + strlen(start);
46
47 device.urcProcessNMEA(start, (size_t)(end - start));
48 return true;
49 }
50 };
51
53
54} // namespace SparkFun_Iridium_9604
const char IRIDIUM_9604_GNSS_NMEA_URC[]
NMEA message URC (AT+UGNMEA <output> 2). New for the 9604.
Definition: Iridium_9604_AT_commands.h:159
The base class for the URC handlers. See the file description for how to add a new URC.
Definition: urcHandler.h:92
void addURC(const char *urcPrefix, bool keepInBacklog=true)
Register this handler's identity. Called once, from the subclass's own constructor.
Definition: urcHandler.h:108
urcHandlerInterface: the services DevIridium9604 provides to the URC handlers. DevIridium9604 inherit...
Definition: urcHandler.h:70
virtual void urcProcessNMEA(const char *sentence, size_t length)=0
Process one NMEA sentence.
The URC handler for +UUGNMEA: - GNSS NMEA message. See the file description for the callback(s).
Definition: urcUUGNMEA.h:32
urcUUGNMEA(void)
Definition: urcUUGNMEA.h:34
bool process(urcHandlerInterface &device, const char *params)
Parse the URC parameters and act on them.
Definition: urcUUGNMEA.h:36
Definition: nmeaMessage.h:30
#define urcRegisterHandler(kHandler)
Declare a file-scope static builder that self-registers a URC handler class.
Definition: urcHandler.h:238