CellularHelper
Public Member Functions | Data Fields
CellularHelperStringResponse Class Reference

Things that return a simple string, like the manufacturer string, use this. More...

#include <CellularHelper.h>

Inheritance diagram for CellularHelperStringResponse:
CellularHelperCommonResponse

Public Member Functions

virtual int parse (int type, const char *buf, int len)
 Method to parse the output from the modem. More...
 
- Public Member Functions inherited from CellularHelperCommonResponse
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

String string
 Returned string is stored here.
 
- Data Fields inherited from CellularHelperCommonResponse
int resp = RESP_ERROR
 Response code from Cellular.command. More...
 
bool enableDebug = false
 Enables debug mode (default: false) More...
 

Detailed Description

Things that return a simple string, like the manufacturer string, use this.

Since it inherits from CellularHelperCommonResponse you can check resp == RESP_OK to make sure the call succeeded.

Member Function Documentation

◆ parse()

int CellularHelperStringResponse::parse ( int  type,
const char *  buf,
int  len 
)
virtual

Method to parse the output from the modem.

Parameters
typeone of 13 different enumerated AT command response types.
bufa pointer to the character array containing the AT command response.
lenlength of the AT command response buf.

This is called from responseCallback, which is the callback to Cellular.command.

This class just appends all TYPE_UNKNOWN data into string.

Implements CellularHelperCommonResponse.


The documentation for this class was generated from the following files: