src/apps/at_parser/at_parser.c
int AT_saveHandler( char *pCmd, T_AT_handler pHandler  )
{
    T_AT_storage cmd;

    if(!pHandler)
        pHandler = handlerStorage[0].handler;

    cmd.len = strlen(pCmd);
    if(cmd.len >= _AT_CMD_MAXSIZE)
        return 0;
    if(handlerIdx == handlerSize)
        return 0;
    if(findHandler(pCmd))
        return 0;
    cmd.hash        = makeHash(pCmd);
    cmd.handler     = pHandler;
    handlerStorage[handlerIdx] = cmd;
    handlerIdx++;
    return (handlerSize - handlerIdx);
}
/**
 * @brief Save AT Command to Storage
 *
 * @param[in] pCmd          command string
 * @param[in] pHandler      handler for provided command
 *
 * Saves handlers for the particular command.
 */
@brief Save AT Command to Storage
@param[in] pCmd          command string
@param[in] pHandler      handler for provided command

Saves handlers for the particular command.
@brief Save AT Command to Storage @param [ in ] pCmd command string @param [ in ] pHandler handler for provided command Saves handlers for the particular command .
int AT_saveHandler( char *pCmd, T_AT_handler pHandler  )
{
    T_AT_storage cmd;
    if(!pHandler)
        pHandler = handlerStorage[0].handler;
    cmd.len = strlen(pCmd);
    if(cmd.len >= _AT_CMD_MAXSIZE)
        return 0;
    if(handlerIdx == handlerSize)
        return 0;
    if(findHandler(pCmd))
        return 0;
    cmd.hash        = makeHash(pCmd);
    cmd.handler     = pHandler;
    handlerStorage[handlerIdx] = cmd;
    handlerIdx++;
    return (handlerSize - handlerIdx);
}
int AT_saveHandler ( char * pCmd , T_AT_handler pHandler ) { T_AT_storage cmd ; if ( ! pHandler ) pHandler = handlerStorage [ 0 ] . handler ; cmd . len = strlen ( pCmd ) ; if ( cmd . len >= _AT_CMD_MAXSIZE ) return 0 ; if ( handlerIdx == handlerSize ) return 0 ; if ( findHandler ( pCmd ) ) return 0 ; cmd . hash = makeHash ( pCmd ) ; cmd . handler = pHandler ; handlerStorage [ handlerIdx ] = cmd ; handlerIdx ++ ; return ( handlerSize - handlerIdx ) ; }
@brief Save AT Command to Storage
 @param[in] pCmd          command string
 @param[in] pHandler      handler for provided command
@brief Save AT Command to Storage @param [ in ] pCmd command string @param [ in ] pHandler handler for provided command