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
urcUUSORF.h
Go to the documentation of this file.
1
19#pragma once
20
21#include "../urcHandler.h"
22
24{
25
27 class urcUUSORF : public urcHandler
28 {
29 public:
31
32 bool process(urcHandlerInterface &device, const char *params)
33 {
34 int socket, length;
35 int ret = sscanf(params, "%d,%d", &socket, &length);
36 if (ret != 2)
37 return false;
38
39 if ((socket < 0) || (socket >= IRIDIUM_9604_NUM_SOCKETS))
40 return false;
41
42 device.urcDebug().debugPrintln("processURCEvent: UDP receive");
43 device.urcSocketReadIndicationUDP(socket, length);
44 return true;
45 }
46 };
47
49
50} // namespace SparkFun_Iridium_9604
const char IRIDIUM_9604_READ_UDP_SOCKET_URC[]
The +UUSORF: URC.
Definition: Iridium_9604_AT_commands.h:147
#define IRIDIUM_9604_NUM_SOCKETS
The number of sockets: 0-6 (9604 AT manual, <socket> range).
Definition: Iridium_9604_typedefs.h:55
void debugPrintln(const char *message, bool important=false)
Print a debug message followed by a newline, if debugging is enabled.
Definition: sfe_debug.cpp:76
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 IRIDIUM_9604_error_t urcSocketReadIndicationUDP(int socket, int length)=0
Read UDP data and pass it to the socket read callback(s)
virtual SfeDebugPrint & urcDebug(void)=0
The debug printer.
The URC handler for +UUSORF: - Receive From command (UDP only) notification. See the file description...
Definition: urcUUSORF.h:28
urcUUSORF(void)
Definition: urcUUSORF.h:30
bool process(urcHandlerInterface &device, const char *params)
Parse the URC parameters and act on them.
Definition: urcUUSORF.h:32
Definition: nmeaMessage.h:30
#define urcRegisterHandler(kHandler)
Declare a file-scope static builder that self-registers a URC handler class.
Definition: urcHandler.h:238