Remove the urcParseToken function. Manipulate allocated string in function scope in _processUrcPacket only.
Use different variable name for different URC pattern to help reader understanding the handling flow.
URC with prefix : _atParseGetHandler( pContext, pTokenPtr, pSavePtr );
pInputLine will be splited into the following format
pIntputLine = "+" pTokenPtr + " : " + pSavePtr
pTokenPtr is used to search URC handler with prefix and pSavePtr is the input parameter to the URC handler.
URC without prefix : _atParseGetHandler( pContext, pInputLine, pInputLine );
pInputLine will be used to search URC handler and pInputLine will also be used as input parameter to the URC handler.
URC handler not found : _Cellular_GenericCallback( pContext, pInputLine );
CellularUrcGenericCallback_t will be called. pInputLine is the input parameter to the function.
This PR is related issue #130.
_atParseGetHandler( pContext, pTokenPtr, pSavePtr );
pInputLine will be splited into the following formatpIntputLine = "+" pTokenPtr + " : " + pSavePtr
pTokenPtr is used to search URC handler with prefix and pSavePtr is the input parameter to the URC handler._atParseGetHandler( pContext, pInputLine, pInputLine );
pInputLine will be used to search URC handler and pInputLine will also be used as input parameter to the URC handler._Cellular_GenericCallback( pContext, pInputLine );
CellularUrcGenericCallback_t will be called. pInputLine is the input parameter to the function.