CellularHelper
|
Common base class for response objects. More...
#include <CellularHelper.h>
Public Member Functions | |
virtual int | parse (int type, const char *buf, int len)=0 |
Method to parse the output from the modem. More... | |
void | logCellularDebug (int type, const char *buf, int len) const |
Used when enableDebug is true to log the Cellular.command callback data using Log.info. More... | |
Data Fields | |
int | resp = RESP_ERROR |
Response code from Cellular.command. More... | |
bool | enableDebug = false |
Enables debug mode (default: false) More... | |
Common base class for response objects.
All response objects inherit from this, so the parse() method can be called in the subclass, and also the resp and enableDebug members are always available.
void CellularHelperCommonResponse::logCellularDebug | ( | int | type, |
const char * | buf, | ||
int | len | ||
) | const |
Used when enableDebug is true to log the Cellular.command callback data using Log.info.
type | one of 13 different enumerated AT command response types. |
buf | a pointer to the character array containing the AT command response. |
len | length of the AT command response buf. |
|
pure virtual |
Method to parse the output from the modem.
type | one of 13 different enumerated AT command response types. |
buf | a pointer to the character array containing the AT command response. |
len | length of the AT command response buf. |
This is called from responseCallback, which is the callback to Cellular.command.
In the base class CellularHelperCommonResponse this is pure virtual and must be subclassed in your concrete subclass of CellularHelperCommonResponse.
Implemented in CellularHelperEnvironmentResponse, CellularHelperPlusStringResponse, and CellularHelperStringResponse.
bool CellularHelperCommonResponse::enableDebug = false |
Enables debug mode (default: false)
If you set this to true in your response object class, additional debugging logs (Log.info, etc.) will be generated to help troubleshoot problems.
int CellularHelperCommonResponse::resp = RESP_ERROR |
Response code from Cellular.command.
The typical return values are: