当前位置: 首页>>代码示例>>C++>>正文


C++ AnscEqualString函数代码示例

本文整理汇总了C++中AnscEqualString函数的典型用法代码示例。如果您正苦于以下问题:C++ AnscEqualString函数的具体用法?C++ AnscEqualString怎么用?C++ AnscEqualString使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了AnscEqualString函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: CosaDmlUpnpDevEnable

/**********************************************************************  

    caller:     owner of this object 

    prototype: 

        BOOL
        Device_SetParamBoolValue
            (
                ANSC_HANDLE                 hInsContext,
                char*                       ParamName,
                BOOL                        bValue
            );

    description:

        This function is called to set BOOL parameter value; 

    argument:   ANSC_HANDLE                 hInsContext,
                The instance handle;

                char*                       ParamName,
                The parameter name;

                BOOL                        bValue
                The updated BOOL value;

    return:     TRUE if succeeded.

**********************************************************************/
BOOL
Device_SetParamBoolValue
    (
        ANSC_HANDLE                 hInsContext,
        char*                       ParamName,
        BOOL                        bValue
    )
{
    PCOSA_DATAMODEL_UPNP            pMyObject    = (PCOSA_DATAMODEL_UPNP)g_pCosaBEManager->hUpnp;
    
    /* check the parameter name and set the corresponding value */
    if( AnscEqualString(ParamName, "Enable", TRUE))
    {
        /* save update to backup */
        pMyObject->bUpnpDevEnable = bValue;
        CosaDmlUpnpDevEnable(NULL, pMyObject->bUpnpDevEnable);

        return TRUE;
    }

    if( AnscEqualString(ParamName, "UPnPIGD", TRUE))
    {
        /* save update to backup */
        pMyObject->bUpnpDevIgdEnable = bValue;
        CosaDmlUpnpDevEnableIgd(NULL, pMyObject->bUpnpDevIgdEnable);

        return TRUE;
    }


    /* CcspTraceWarning(("Unsupported parameter '%s'\n", ParamName)); */
    return FALSE;
}
开发者ID:davekimble,项目名称:CcspPandM,代码行数:63,代码来源:cosa_upnp_dml.c

示例2:

/**********************************************************************  

    caller:     owner of this object 

    prototype: 

        BOOL
        Device_GetParamBoolValue
            (
                ANSC_HANDLE                 hInsContext,
                char*                       ParamName,
                BOOL*                       pBool
            );

    description:

        This function is called to retrieve Boolean parameter value; 

    argument:   ANSC_HANDLE                 hInsContext,
                The instance handle;

                char*                       ParamName,
                The parameter name;

                BOOL*                       pBool
                The buffer of returned boolean value;

    return:     TRUE if succeeded.

**********************************************************************/
BOOL
Device_GetParamBoolValue
    (
        ANSC_HANDLE                 hInsContext,
        char*                       ParamName,
        BOOL*                       pBool
    )
{
    PCOSA_DATAMODEL_UPNP            pMyObject    = (PCOSA_DATAMODEL_UPNP)g_pCosaBEManager->hUpnp;
    
    /* check the parameter name and return the corresponding value */
    if( AnscEqualString(ParamName, "Enable", TRUE))
    {
        /* collect value */
        *pBool = pMyObject->bUpnpDevEnable;
        return TRUE;
    }

    if( AnscEqualString(ParamName, "UPnPIGD", TRUE))
    {
        /* collect value */
        *pBool = pMyObject->bUpnpDevIgdEnable;
        return TRUE;
    }


    /* CcspTraceWarning(("Unsupported parameter '%s'\n", ParamName)); */
    return FALSE;
}
开发者ID:davekimble,项目名称:CcspPandM,代码行数:59,代码来源:cosa_upnp_dml.c

示例3: CosaDmlUpnpDevGetAdvPeriod

/**********************************************************************  

    caller:     owner of this object 

    prototype: 

        BOOL
        Device_GetParamUlongValue
            (
                ANSC_HANDLE                 hInsContext,
                char*                       ParamName,
                ULONG*                      puLong
            );

    description:

        This function is called to retrieve ULONG parameter value; 

    argument:   ANSC_HANDLE                 hInsContext,
                The instance handle;

                char*                       ParamName,
                The parameter name;

                ULONG*                      puLong
                The buffer of returned ULONG value;

    return:     TRUE if succeeded.

**********************************************************************/
BOOL
Device_GetParamUlongValue
    (
        ANSC_HANDLE                 hInsContext,
        char*                       ParamName,
        ULONG*                      puLong
    )
{
    PCOSA_DATAMODEL_UPNP            pMyObject    = (PCOSA_DATAMODEL_UPNP)g_pCosaBEManager->hUpnp;

    /* check the parameter name and return the corresponding value */
    if( AnscEqualString(ParamName, "X_CISCO_COM_IGD_AdvertisementPeriod", TRUE) )
    {
        /* collect value */
        CosaDmlUpnpDevGetAdvPeriod(NULL, &pMyObject->AdvertisementPeriod);
        
        *puLong = pMyObject->AdvertisementPeriod;

        return TRUE;
    }

    if( AnscEqualString(ParamName, "X_CISCO_COM_IGD_TTL", TRUE) )
    {
        /* collect value */
        CosaDmlUpnpDevGetTTL(NULL, &pMyObject->TTL);
        
        *puLong = pMyObject->TTL;

        return TRUE;
    }

    /* CcspTraceWarning(("Unsupported parameter '%s'\n", ParamName)); */
    return FALSE;
}
开发者ID:davekimble,项目名称:CcspPandM,代码行数:64,代码来源:cosa_upnp_dml.c

示例4:

/**********************************************************************  

    caller:     owner of this object 

    prototype: 

        BOOL
        Time_SetParamBoolValue
            (
                ANSC_HANDLE                 hInsContext,
                char*                       ParamName,
                BOOL                        bValue
            );

    description:

        This function is called to set BOOL parameter value; 

    argument:   ANSC_HANDLE                 hInsContext,
                The instance handle;

                char*                       ParamName,
                The parameter name;

                BOOL                        bValue
                The updated BOOL value;

    return:     TRUE if succeeded.

**********************************************************************/
BOOL
Time_SetParamBoolValue
    (
        ANSC_HANDLE                 hInsContext,
        char*                       ParamName,
        BOOL                        bValue
    )
{
    PCOSA_DATAMODEL_TIME            pMyObject = (PCOSA_DATAMODEL_TIME)g_pCosaBEManager->hTime;

    /* check the parameter name and set the corresponding value */
    if( AnscEqualString(ParamName, "Enable", TRUE))
    {
        /* save update to backup */
        pMyObject->TimeCfg.bEnabled = bValue;
        return TRUE;
    }

    if( AnscEqualString(ParamName, "DaylightSaving", TRUE))
    {
        /* save update to backup */
        pMyObject->TimeCfg.bDaylightSaving = bValue;
        return TRUE;
    }

    /* CcspTraceWarning(("Unsupported parameter '%s'\n", ParamName)); */
    return FALSE;
}
开发者ID:davekimble,项目名称:CcspPandM,代码行数:58,代码来源:cosa_time_dml.c

示例5: CosaDmlTimeGetState

/**********************************************************************  

    caller:     owner of this object 

    prototype: 

        BOOL
        Time_GetParamUlongValue
            (
                ANSC_HANDLE                 hInsContext,
                char*                       ParamName,
                ULONG*                      puLong
            );

    description:

        This function is called to retrieve ULONG parameter value; 

    argument:   ANSC_HANDLE                 hInsContext,
                The instance handle;

                char*                       ParamName,
                The parameter name;

                ULONG*                      puLong
                The buffer of returned ULONG value;

    return:     TRUE if succeeded.

**********************************************************************/
BOOL
Time_GetParamUlongValue
    (
        ANSC_HANDLE                 hInsContext,
        char*                       ParamName,
        ULONG*                      puLong
    )
{
    PCOSA_DATAMODEL_TIME            pMyObject = (PCOSA_DATAMODEL_TIME)g_pCosaBEManager->hTime;
    
    /* check the parameter name and return the corresponding value */
    if( AnscEqualString(ParamName, "Status", TRUE))
    {
        /* collect value */
        CosaDmlTimeGetState(NULL, &pMyObject->TimeStatus, &pMyObject->CurrLocalTime);
        *puLong = pMyObject->TimeStatus;
        return TRUE;
    }

    /* check the parameter name and return the corresponding value */
    if( AnscEqualString(ParamName, "CityIndex", TRUE))
    {
        /* collect value */
        *puLong = pMyObject->TimeCfg.cityIndex;
        return TRUE;
    }

    /* CcspTraceWarning(("Unsupported parameter '%s'\n", ParamName)); */
    return FALSE;
}
开发者ID:davekimble,项目名称:CcspPandM,代码行数:60,代码来源:cosa_time_dml.c

示例6:

/**********************************************************************  

    caller:     owner of this object 

    prototype: 

        BOOL
        MemoryStatus_GetParamUlongValue
            (
                ANSC_HANDLE                 hInsContext,
                char*                       ParamName,
                ULONG*                      puLong
            );

    description:

        This function is called to retrieve ULONG parameter value; 

    argument:   ANSC_HANDLE                 hInsContext,
                The instance handle;

                char*                       ParamName,
                The parameter name;

                ULONG*                      puLong
                The buffer of returned ULONG value;

    return:     TRUE if succeeded.

**********************************************************************/
BOOL
MemoryStatus_GetParamUlongValue
    (
        ANSC_HANDLE                 hInsContext,
        char*                       ParamName,
        ULONG*                      puLong
    )
{
    /* check the parameter name and return the corresponding value */
    if( AnscEqualString(ParamName, "Total", TRUE))
    {
         /* collect value */
        *puLong = COSADmlGetMemoryStatus(ParamName);
        return TRUE;
    }

    if( AnscEqualString(ParamName, "Free", TRUE))
    {
        /* collect value */
        *puLong = COSADmlGetMemoryStatus(ParamName);
        return TRUE;
    }


    /* AnscTraceWarning(("Unsupported parameter '%s'\n", ParamName)); */
    return FALSE;
}
开发者ID:davekimble,项目名称:TestAndDiagnostic,代码行数:57,代码来源:cosa_apis_deviceinfo.c

示例7: CosaDmlUpnpDevSetAdvPeriod

/**********************************************************************  

    caller:     owner of this object 

    prototype: 

        BOOL
        Device_SetParamUlongValue
            (
                ANSC_HANDLE                 hInsContext,
                char*                       ParamName,
                ULONG                       uValue
            );

    description:

        This function is called to set ULONG parameter value; 

    argument:   ANSC_HANDLE                 hInsContext,
                The instance handle;

                char*                       ParamName,
                The parameter name;

                ULONG                       uValue
                The updated ULONG value;

    return:     TRUE if succeeded.

**********************************************************************/
BOOL
Device_SetParamUlongValue
    (
        ANSC_HANDLE                 hInsContext,
        char*                       ParamName,
        ULONG                       uValue
    )
{
    PCOSA_DATAMODEL_UPNP            pMyObject    = (PCOSA_DATAMODEL_UPNP)g_pCosaBEManager->hUpnp;

    /* check the parameter name and set the corresponding value */
    if( AnscEqualString(ParamName, "X_CISCO_COM_IGD_AdvertisementPeriod", TRUE) )
    {
        /* save update to backup */
        pMyObject->AdvertisementPeriod = uValue;
        CosaDmlUpnpDevSetAdvPeriod(NULL, pMyObject->AdvertisementPeriod);
        
        return TRUE;
    }

    if( AnscEqualString(ParamName, "X_CISCO_COM_IGD_TTL", TRUE) )
    {
        /* save update to backup */
        pMyObject->TTL = uValue;
        CosaDmlUpnpDevSetTTL(NULL, pMyObject->TTL);
        
        return TRUE;
    }

    /* CcspTraceWarning(("Unsupported parameter '%s'\n", ParamName)); */
    return FALSE;
}
开发者ID:davekimble,项目名称:CcspPandM,代码行数:62,代码来源:cosa_upnp_dml.c

示例8: if

/**********************************************************************

    caller:     owner of this object

    prototype:

        ANSC_STATUS
        CcspCwmpsoSaveCwmpEvent
            (
                ANSC_HANDLE                 hThisObject
            );

    description:

        This function is called to save Cwmp Events before reboot

    argument:   ANSC_HANDLE                 hThisObject
                This handle is actually the pointer of this object
                itself.

    return:     status of operation.

**********************************************************************/
BOOL
CcspCwmpIsUndiscardedEvent
    (
        char*                       eventName
    )
{
    /*
     *  According to WT151, the events "2 PERIODIC", "3 SCHEDULED", "7 TRANSFERCOMPLETE"
     *  and the ones start with "M" won't be discarded
     */
    if( AnscEqualString(eventName, CCSP_CWMP_INFORM_EVENT_NAME_Peroidic, TRUE))
    {
        return TRUE;
    }
    else if( AnscEqualString(eventName, CCSP_CWMP_INFORM_EVENT_NAME_Scheduled, TRUE))
    {
        return TRUE;
    }
    else if( AnscEqualString(eventName, CCSP_CWMP_INFORM_EVENT_NAME_TransferComplete, TRUE))
    {
        return TRUE;
    }
    else if( eventName[0] == 'M')
    {
        return TRUE;
    }

    return FALSE;
}
开发者ID:rdkcmf,项目名称:rdkb-CcspTr069Pa,代码行数:52,代码来源:ccsp_cwmp_sesso_management.c

示例9:

BOOL ANSC_EXPORT_API
COSA_IsObjSupported
    (
        char*                        pObjName
    )
{
    /* COSA XML file will be generated based on standard TR-xxx data model definition.
     * By default, all the objects are expected to supported in the libraray. 
     * Realistically, we will have certain ones cannot be supported at the early stage of development.
     * We can rule them out by return FALSE even if they're defined in COSA XML file.
     */

#if 0 

    if( AnscEqualString(pObjName, "InternetGatewayDevice.UserInterface.",TRUE))
    {
        /* all the objects/parameters under "UserInterface" will not be populated in Data Model Tree. */
        return FALSE;
    }

#endif

#if (defined(_COSA_DRG_CNS_))

    if(AnscEqualString(pObjName, "Device.DNS.Client.", TRUE))
    {
        return FALSE;
    }        

#endif

    return TRUE;
}
开发者ID:rdkcmf,项目名称:rdkb-CcspPandM,代码行数:33,代码来源:plugin_main.c

示例10:

/**********************************************************************  

    caller:     owner of this object 

    prototype: 

        BOOL
        Host_GetParamBoolValue
            (
                ANSC_HANDLE                 hInsContext,
                char*                       ParamName,
                BOOL*                       pBool
            );

    description:

        This function is called to retrieve Boolean parameter value; 

    argument:   ANSC_HANDLE                 hInsContext,
                The instance handle;

                char*                       ParamName,
                The parameter name;

                BOOL*                       pBool
                The buffer of returned boolean value;

    return:     TRUE if succeeded.

**********************************************************************/
BOOL
Host_GetParamBoolValue
    (
        ANSC_HANDLE                 hInsContext,
        char*                       ParamName,
        BOOL*                       pBool
    )
{
    //printf("Host_GetParamBoolValue %p, %s\n", hInsContext, ParamName);
    PLmObjectHost pHost = (PLmObjectHost) hInsContext;
    int i = 0;
    for(; i<LM_HOST_NumBoolPara; i++){
        if( AnscEqualString(ParamName, lmHosts.pHostBoolParaName[i], TRUE))
        {
            /* collect value */
            *pBool = pHost->bBoolParaValue[i];
            return TRUE;
        }
    }

    if( AnscEqualString(ParamName, "X_CISCO_COM_TrueStaticIPClient", TRUE))
    {
        /* collect value */
        *pBool = pHost->bTrueStaticIPClient;
        return TRUE;
    }

    /* AnscTraceWarning(("Unsupported parameter '%s'\n", ParamName)); */
    return FALSE;
}
开发者ID:rdkcmf,项目名称:rdkb-CcspPandM,代码行数:60,代码来源:cosa_hosts_dml.c

示例11: IPv6rdIF_GetParamBoolValue

BOOL
IPv6rdIF_GetParamBoolValue(
        ANSC_HANDLE hInsContext, 
        char *ParamName, 
        BOOL *pBool)
{
    PCOSA_CONTEXT_LINK_OBJECT       pLinkObject = (PCOSA_CONTEXT_LINK_OBJECT)hInsContext;
    PCOSA_DML_IPV6RD_IF             pEntry = (PCOSA_DML_IPV6RD_IF)pLinkObject->hContext;

    if (!pLinkObject || !pEntry)
        return FALSE;

    CosaDml_IPv6rdGetEntry(NULL, pEntry->InstanceNumber, pEntry);

    if (AnscEqualString(ParamName, "Enable", TRUE))
    {
        *pBool = pEntry->Enable;
        return TRUE;
    }
    else if (AnscEqualString(ParamName, "AllTrafficToBorderRelay", TRUE))
    {
        *pBool = pEntry->AllTrafficToBorderRelay;
        return TRUE;
    }

    return FALSE;
}
开发者ID:rdkcmf,项目名称:rdkb-CcspPandM,代码行数:27,代码来源:cosa_ipv6rd_dml.c

示例12: CcspLMLiteConsoleTrace

BOOL
NetworkDevicesTraffic_Default_GetParamUlongValue
    (
                ANSC_HANDLE                 hInsContext,
                char*                       ParamName,
                ULONG*                      puLong
    )
{
    CcspLMLiteConsoleTrace(("RDK_LOG_DEBUG, LMLite %s : ENTER \n", __FUNCTION__ ));

    if ( AnscEqualString(ParamName, "PollingPeriod", TRUE))
    {
        *puLong =  GetNDTPollingPeriodDefault();
        CcspLMLiteConsoleTrace(("RDK_LOG_DEBUG, LMLite %s : ParamName[%s] Value[%d] \n", __FUNCTION__ , ParamName, *puLong ));
        return TRUE;
    }

    if ( AnscEqualString(ParamName, "ReportingPeriod", TRUE))
    {
        *puLong =  GetNDTReportingPeriodDefault();
        CcspLMLiteConsoleTrace(("RDK_LOG_DEBUG, LMLite %s : ParamName[%s] Value[%d] \n", __FUNCTION__ , ParamName, *puLong ));
        return TRUE;
    }

    if ( AnscEqualString(ParamName, "OverrideTTL", TRUE))
    {
        *puLong =  GetNDTOverrideTTLDefault();
        CcspLMLiteConsoleTrace(("RDK_LOG_DEBUG, LMLite %s : ParamName[%s] Value[%d] \n", __FUNCTION__ , ParamName, *puLong ));
        return TRUE;
    }

    CcspLMLiteConsoleTrace(("RDK_LOG_DEBUG, LMLite %s : EXIT \n", __FUNCTION__ ));

    return FALSE;
}
开发者ID:rdkcmf,项目名称:rdkb-CcspLMLite,代码行数:35,代码来源:cosa_ndtraffic_dml.c

示例13: sizeof

BOOL
ConnectivityTest_GetParamIntValue
    (
        ANSC_HANDLE                 hInsContext,
        char*                       ParamName,
        int*                        pInt
    )
{
    PCOSA_DATAMODEL_SELFHEAL            pMyObject           = (PCOSA_DATAMODEL_SELFHEAL)g_pCosaBEManager->hSelfHeal;

    if( AnscEqualString(ParamName, "X_RDKCENTRAL-COM_RebootInterval", TRUE))
    {
        /* collect value */
	   *pInt = pMyObject->pConnTest->RouterRebootInterval ;
	   return TRUE;
    }

    if( AnscEqualString(ParamName, "X_RDKCENTRAL-COM_CurrentCount", TRUE))
    {
        /* collect value */
        char buf[16]={0};
        syscfg_get( NULL, "todays_reset_count", buf, sizeof(buf));
        if( buf[0] != '\0' )
        {
                    *pInt = atoi(buf);
                     return TRUE;
        }
    }
    
    return FALSE;
}
开发者ID:rdkcmf,项目名称:rdkb-TestAndDiagnostic,代码行数:31,代码来源:cosa_selfheal_dml.c

示例14:

/**********************************************************************

    caller:     owner of this object

    prototype

        BOOL
        ResourceMonitor_GetParamUlongValue
            (
                ANSC_HANDLE                 hInsContext,
                char*                       ParamName,
                ULONG*                      puLong
            );

    description:

        This function is called to retrieve ULONG parameter value;

    argument:   ANSC_HANDLE                 hInsContext,
                The instance handle;

                char*                       ParamName,
                The parameter name;

                ULONG*                      puLong
                The buffer of returned ULONG value;

    return:     TRUE if succeeded.

**********************************************************************/
BOOL
ResourceMonitor_GetParamUlongValue
    (
        ANSC_HANDLE                 hInsContext,
        char*                       ParamName,
        ULONG*                      puLong
    )
{
    PCOSA_DATAMODEL_SELFHEAL            pMyObject    = (PCOSA_DATAMODEL_SELFHEAL)g_pCosaBEManager->hSelfHeal; 
    PCOSA_DML_RESOUCE_MONITOR           pRescMonitor = pMyObject->pResMonitor;
    if( AnscEqualString(ParamName, "X_RDKCENTRAL-COM_UsageComputeWindow", TRUE))
    {
        *puLong = pRescMonitor->MonIntervalTime;
        return TRUE;
    }

    if( AnscEqualString(ParamName, "X_RDKCENTRAL-COM_AvgCPUThreshold", TRUE))
    {
        *puLong = pRescMonitor->AvgCpuThreshold;
        return TRUE;
    }

    if( AnscEqualString(ParamName, "X_RDKCENTRAL-COM_AvgMemoryThreshold", TRUE))
    {
        *puLong = pRescMonitor->AvgMemThreshold;
        return TRUE;
    }
    return FALSE;
}
开发者ID:rdkcmf,项目名称:rdkb-TestAndDiagnostic,代码行数:59,代码来源:cosa_selfheal_dml.c

示例15: IPv6rdIF_SetParamBoolValue

BOOL
IPv6rdIF_SetParamBoolValue(
        ANSC_HANDLE hInsContext,
        char        *ParamName,
        BOOL        bValue
        )
{
    PCOSA_CONTEXT_LINK_OBJECT       pLinkObject = (PCOSA_CONTEXT_LINK_OBJECT)hInsContext;
    PCOSA_DML_IPV6RD_IF             pEntry = (PCOSA_DML_IPV6RD_IF)pLinkObject->hContext;

    if (!pLinkObject || !pEntry)
        return FALSE;

    if (AnscEqualString(ParamName, "Enable", TRUE))
    {
        pEntry->Enable = bValue;
        return TRUE;
    }
    else if (AnscEqualString(ParamName, "AllTrafficToBorderRelay", TRUE))
    {
        pEntry->AllTrafficToBorderRelay = bValue;
        return TRUE;
    }

    return FALSE;
}
开发者ID:rdkcmf,项目名称:rdkb-CcspPandM,代码行数:26,代码来源:cosa_ipv6rd_dml.c


注:本文中的AnscEqualString函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。