88 if (handler->amI(urcPrefix))
105 if (handler ==
nullptr)
117 if (handler->_keepInBacklog && (handler->match(event) !=
nullptr))
134 const char *params = handler->match(event);
135 if (params !=
nullptr)
137 if (handler->process(device, params))
Debug printing: replaces the SARA-R5 library _debugPort prints. A base class of DevIridium9604 and th...
Definition: sfe_debug.h:38
The base class for the URC handlers. See the file description for how to add a new URC.
Definition: urcHandler.h:92
bool setCallback(urcCallback_t callback, uint8_t index=0)
Set (or clear, with nullptr) callback 'index' for this URC.
Definition: urcHandler.h:152
urcHandlerInterface: the services DevIridium9604 provides to the URC handlers. DevIridium9604 inherit...
Definition: urcHandler.h:70
static urcHandlerRegistry & get(void)
Get the single, lazily-constructed urcHandlerRegistry instance.
Definition: urcHandler.h:182
void buildAll(std::vector< urcHandler * > &handlers) const
Construct one instance of every currently-registered URC handler class.
Definition: urcHandler.h:204
The collection of registered URC handlers. Replaces the SARA-R5 processURCEvent().
Definition: urcHandlerVector.h:61
bool processEvent(urcHandlerInterface &device, const char *event)
Pass an event to the handlers. The first handler which matches and decodes it, wins.
Definition: urcHandlerVector.h:130
urcHandlerVector(void)
Construct the vector and populate it with one instance of every registered URC handler.
Definition: urcHandlerVector.h:66
bool setCallback(const char *urcPrefix, urcCallback_t callback, uint8_t index=0)
Register (or clear) a user callback for a URC.
Definition: urcHandlerVector.h:102
~urcHandlerVector(void)
Destroy the vector, deleting every handler object it owns.
Definition: urcHandlerVector.h:72
urcHandler * find(const char *urcPrefix)
Find the registered handler for a URC prefix.
Definition: urcHandlerVector.h:84
std::vector< urcHandler * > urcHandlerVectors
The URC handler objects.
Definition: urcHandlerVector.h:63
bool isURC(const char *event)
Does this event contain a URC we want to keep in the backlog? Used by pruneBacklog().
Definition: urcHandlerVector.h:113
Definition: nmeaMessage.h:30
void(* urcCallback_t)(void)
The generic URC callback type. Cast your callback to this for setURCCallback().
Definition: urcHandler.h:59