src/services/route/src/routeSrvMgr.cpp
/**
 * @fn bool RouteNetworkMgr::getGatewayResults(char* gatewayResults, unsigned int messageLength)
 * @brief This function used IARM Bus call to get XUPNP device information and returns
 * the result as a string.
 *
 * @param[out] gatewayResults String to store discovery results.
 * @param[in] messageLength Unsigned integer variable representing buffer length.
 *
 * @return None.
 */
@fn bool RouteNetworkMgr::getGatewayResults(char* gatewayResults, unsigned int messageLength)
@brief This function used IARM Bus call to get XUPNP device information and returns
the result as a string.

@param[out] gatewayResults String to store discovery results.
@param[in] messageLength Unsigned integer variable representing buffer length.

@return None.
@fn bool RouteNetworkMgr :: getGatewayResults ( char * gatewayResults unsigned int messageLength ) @brief This function used IARM Bus call to get XUPNP device information and returns the result as a string . @param [ out ] gatewayResults String to store discovery results . @param [ in ] messageLength Unsigned integer variable representing buffer length . @return None .
bool RouteNetworkMgr::getGatewayResults(char* gatewayResults, unsigned int messageLength)
{
    IARM_Bus_SYSMGR_GetXUPNPDeviceInfo_Param_t *param = NULL;
    IARM_Result_t ret = IARM_RESULT_SUCCESS;
    bool returnStatus = FALSE;
    RDK_LOG( RDK_LOG_TRACE1, LOG_NMGR, "[%s:%s:%d] Enter\n", MODULE_NAME,__FUNCTION__, __LINE__ );
    ret = IARM_Malloc(IARM_MEMTYPE_PROCESSLOCAL, sizeof(IARM_Bus_SYSMGR_GetXUPNPDeviceInfo_Param_t) + messageLength + 1, (void**)&param);
    if(ret == IARM_RESULT_SUCCESS)
    {
        param->bufLength = messageLength;
        ret = IARM_Bus_Call(_IARM_XUPNP_NAME,IARM_BUS_XUPNP_API_GetXUPNPDeviceInfo,
                            (void *)param, sizeof(IARM_Bus_SYSMGR_GetXUPNPDeviceInfo_Param_t) + messageLength + 1);
        if(ret == IARM_RESULT_SUCCESS)
        {
            memcpy(gatewayResults, ((char *)param + sizeof(IARM_Bus_SYSMGR_GetXUPNPDeviceInfo_Param_t)), param->bufLength);
            gatewayResults[param->bufLength] = '\0';
            returnStatus =  TRUE;
        }
        else
        {
            RDK_LOG( RDK_LOG_ERROR, LOG_NMGR, "[%s:%s:%d] IARM_BUS_XUPNP_API_GetXUPNPDeviceInfo IARM failed in the fetch  \n", MODULE_NAME,__FUNCTION__, __LINE__);
        }
        RDK_LOG( RDK_LOG_TRACE1, LOG_NMGR, "[%s:%s:%d] gatewayResults %s \n", MODULE_NAME,__FUNCTION__, __LINE__,gatewayResults);
        IARM_Free(IARM_MEMTYPE_PROCESSLOCAL, param);
        RDK_LOG( RDK_LOG_TRACE1, LOG_NMGR, "[%s:%s:%d] Exit\n", MODULE_NAME,__FUNCTION__, __LINE__ );
    }
    else
    {
        RDK_LOG( RDK_LOG_ERROR, LOG_NMGR, "[%s:%s:%d] IARM_BUS_XUPNP_API_GetXUPNPDeviceInfo , IARM_Malloc Failed  \n", MODULE_NAME,__FUNCTION__, __LINE__);
    }
    return returnStatus;
}
bool RouteNetworkMgr :: getGatewayResults ( char * gatewayResults , unsigned int messageLength ) { IARM_Bus_SYSMGR_GetXUPNPDeviceInfo_Param_t * param = NULL ; IARM_Result_t ret = IARM_RESULT_SUCCESS ; bool returnStatus = FALSE ; RDK_LOG ( RDK_LOG_TRACE1 , LOG_NMGR , " \n " , MODULE_NAME , __FUNCTION__ , __LINE__ ) ; ret = IARM_Malloc ( IARM_MEMTYPE_PROCESSLOCAL , sizeof ( IARM_Bus_SYSMGR_GetXUPNPDeviceInfo_Param_t ) + messageLength + 1 , ( void * * ) & param ) ; if ( ret == IARM_RESULT_SUCCESS ) { param -> bufLength = messageLength ; ret = IARM_Bus_Call ( _IARM_XUPNP_NAME , IARM_BUS_XUPNP_API_GetXUPNPDeviceInfo , ( void * ) param , sizeof ( IARM_Bus_SYSMGR_GetXUPNPDeviceInfo_Param_t ) + messageLength + 1 ) ; if ( ret == IARM_RESULT_SUCCESS ) { memcpy ( gatewayResults , ( ( char * ) param + sizeof ( IARM_Bus_SYSMGR_GetXUPNPDeviceInfo_Param_t ) ) , param -> bufLength ) ; gatewayResults [ param -> bufLength ] = ' \0 ' ; returnStatus = TRUE ; } else { RDK_LOG ( RDK_LOG_ERROR , LOG_NMGR , " \n " , MODULE_NAME , __FUNCTION__ , __LINE__ ) ; } RDK_LOG ( RDK_LOG_TRACE1 , LOG_NMGR , " \n " , MODULE_NAME , __FUNCTION__ , __LINE__ , gatewayResults ) ; IARM_Free ( IARM_MEMTYPE_PROCESSLOCAL , param ) ; RDK_LOG ( RDK_LOG_TRACE1 , LOG_NMGR , " \n " , MODULE_NAME , __FUNCTION__ , __LINE__ ) ; } else { RDK_LOG ( RDK_LOG_ERROR , LOG_NMGR , " \n " , MODULE_NAME , __FUNCTION__ , __LINE__ ) ; } return returnStatus ; }
@fn bool RouteNetworkMgr::getGatewayResults(char* gatewayResults, unsigned int messageLength)
 @brief This function used IARM Bus call to get XUPNP device information and returns
 the result as a string.
@fn bool RouteNetworkMgr :: getGatewayResults ( char * gatewayResults unsigned int messageLength ) @brief This function used IARM Bus call to get XUPNP device information and returns the result as a string .